This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 224860 - java.lang.IllegalStateException: Toolkit not initialized
Summary: java.lang.IllegalStateException: Toolkit not initialized
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.3
Hardware: All All
: P1 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-14 17:12 UTC by Martin Entlicher
Modified: 2013-01-25 11:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2013-01-14 17:12:15 UTC
When debugging a JavaFX application, an agent that is necessary for visual FX debugger, is being uploaded into the running JVM.

However, it ends up with following exception:

java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.netbeans.modules.debugger.jpda.visual.remote.RemoteFXService$FXAccessLoop.run(RemoteFXService.java:122)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalStateException: Toolkit not initialized
        at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:153)
        at com.sun.javafx.application.PlatformImpl.runLater(PlatformImpl.java:148)
        at javafx.application.Platform.runLater(Platform.java:52)
        ... 6 more

This exception is thrown by the debugging program, since the agent is not able to contact the toolkit.

As a result, visual debugging of FX applications is not possible.

To reproduce:
- Create Brick Breaker sample application
- Press Debug Project
- After the application starts, press Take GUI Snapshot
- See the error in the Output Window
Comment 1 Martin Entlicher 2013-01-14 17:29:36 UTC
Fixed in trunk by changeset:   244382:258d3f30f7e0
http://hg.netbeans.org/core-main/rev/258d3f30f7e0

Can someone please verify, after it's propagated to a build? Thanks.
Comment 2 Quality Engineering 2013-01-15 07:28:59 UTC
Integrated into 'main-golden', will be available in build *201301150001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/258d3f30f7e0
User: mentlicher@netbeans.org
Log: #224860: Load FX service agent by the QuantumToolkit's class loader.
Comment 3 Stepan Zebra 2013-01-15 11:31:30 UTC
verified in trunk
Comment 4 Jaroslav Havlin 2013-01-15 13:14:04 UTC
(In reply to comment #2)
> Changeset: http://hg.netbeans.org/main-golden/rev/258d3f30f7e0
The changeset seems fine to me.
Comment 5 Martin Entlicher 2013-01-16 09:55:18 UTC
Transplanted into release73 branch by changeset:   251745:460e3d1d6bc7
http://hg.netbeans.org/releases/rev/460e3d1d6bc7
Comment 6 Quality Engineering 2013-01-17 00:01:08 UTC
Integrated into 'releases', will be available in build *201301162100* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/460e3d1d6bc7
User: mentlicher@netbeans.org
Log: #224860: Load FX service agent by the QuantumToolkit's class loader.
(transplanted from 258d3f30f7e04e81ffb9e530421fa4dc95eb7de9)
Comment 7 Stepan Zebra 2013-01-25 11:09:06 UTC
verified in 7.3 RC1