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 230104 - com.sun.jdi.InvocationException: Exception occurred in target VM
Summary: com.sun.jdi.InvocationException: Exception occurred in target VM
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-22 11:26 UTC by Roman Svitanic
Modified: 2013-05-31 01:21 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 200831


Attachments
stacktrace (1.51 KB, text/plain)
2013-05-22 11:26 UTC, Roman Svitanic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Svitanic 2013-05-22 11:26:28 UTC
This bug was originally marked as duplicate of bug 223671, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 20130520-105f71f9c423)
VM: Java HotSpot(TM) 64-Bit Server VM, 23.21-b01, Java(TM) SE Runtime Environment, 1.7.0_21-b11
OS: Windows 7

User Comments:
rsvitanic: Started debug in Java FX project (Web start or in Browser)

alainvitry: Step by step debugging a Java project.
Currently in a groovy source file
Inspecting a member Hasmap value

Make a modification: remove "" in the map accessor, so from this.conditions["HAUTEUR"] to this.conditions[HAUTEUR], where HAUTEUR is a final String, and apply code changes make it crash




Stacktrace: 
com.sun.jdi.InvocationException: Exception occurred in target VM
   at com.sun.tools.jdi.ObjectReferenceImpl.invokeMethod(ObjectReferenceImpl.java:410)
   at org.netbeans.modules.debugger.jpda.jdi.ObjectReferenceWrapper.invokeMethod(ObjectReferenceWrapper.java:510)
   at org.netbeans.modules.debugger.jpda.visual.RemoteServices.uploadBasicClasses(RemoteServices.java:291)
   at org.netbeans.modules.debugger.jpda.visual.VisualDebuggerListener.initDebuggerRemoteService(VisualDebuggerListener.java:257)
   at org.netbeans.modules.debugger.jpda.visual.VisualDebuggerListener.access$100(VisualDebuggerListener.java:116)
   at org.netbeans.modules.debugger.jpda.visual.VisualDebuggerListener$3.breakpointReached(VisualDebuggerListener.java:199)
Comment 1 Roman Svitanic 2013-05-22 11:26:29 UTC
Created attachment 134734 [details]
stacktrace
Comment 2 Martin Entlicher 2013-05-30 15:19:19 UTC
I've added the cause throwable to the exception translation
http://hg.netbeans.org/core-main/rev/8da35d05d4fa
which reveals the original problem:

Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "modifyThreadGroup")
        at java.security.AccessControlContext.checkPermission(AccessControlContext.java:366)
        at java.security.AccessController.checkPermission(AccessController.java:560)
        at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
        at sun.plugin2.applet.SecurityManagerHelper.checkAccessHelper(Unknown Source)
        at sun.plugin2.applet.FXAppletSecurityManager.checkAccess(Unknown Source)
        at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:315)
        at java.lang.Thread.init(Thread.java:376)
        at java.lang.Thread.<init>(Thread.java:525)
        at org.netbeans.modules.debugger.jpda.visual.remote.RemoteFXService.<clinit>(RemoteFXService.java:95)

Therefore we need to catch a SecurityException, that can be thrown when a new thread is created.
Fixed by changeset:   255110:6ea0e4b6e6d8
http://hg.netbeans.org/core-main/rev/6ea0e4b6e6d8
Comment 3 Quality Engineering 2013-05-31 01:21:28 UTC
Integrated into 'main-golden', will be available in build *201305302301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6ea0e4b6e6d8
User: mentlicher@netbeans.org
Log: #230104: Catch SecurityException that can occur when creating a new Thread.