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.
[ BUILD # : 200808051401 ] [ JDK VERSION : 1.6.0_04 ] No matter what expression I select, I always get this error, making debugging useless for me. I am using a Java freeform project.
Error 502 means ALREADY_INVOKING - Previous invoke not complete. Restart of debugging session should fix this problem. Can you attach the whole stack trace of the exception? Steps to reproduce are necessary in order to either fix our code or submit a bug for JDI.
Can you also attach the exception stacktrace, please?
No stack trace was shown when it happened. Was it supposed to be in messages.log or something?
Where was this error displayed? Yes, it should be in the message.log file. But the stack trace alone is not sufficient to fix this. We need to know how it happened, some steps to reproduce.
> Where was this error displayed? In the tooltip, instead of the value of the expression. > Yes, it should be in the message.log file. The only snippet I can find is: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.netbeans.modules.debugger.jpda.projects.ToolTipAnnotation.run(ToolTipAnnotation.java:159) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:572) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:997) Caused by: org.netbeans.api.debugger.jpda.InvalidExpressionException: Unexpected JDWP Error: 502 at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.invokeMethod(JPDADebuggerImpl.java:905) at org.netbeans.modules.debugger.jpda.JPDADebuggerImpl.invokeMethod(JPDADebuggerImpl.java:848) at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getToStringValue(AbstractObjectVariable.java:316) at org.netbeans.modules.debugger.jpda.models.AbstractObjectVariable.getToStringValue(AbstractObjectVariable.java:297) ... 7 more > But the stack trace alone is not sufficient to fix this. We need to know how it happened, some steps to reproduce. I don't think my steps to reproduce will be very helpful, but: 1. Use a freeform project with a external project dir; 2. Create a breakpoint in a return statement with several logical operators; 3. Attach to the VM using socket attach with suspend=n; 4. When the breakpoint gets hit, try to see the value of some of the logical operations. Let me know if I can provide more information to help you with this.
O.K. the message was just wrapped in InvalidExpressionException, the original exception is not propagated. This is not good, I've attached the original InternalException to the InvalidExpressionException now. I'll push it later, my Mercurial repository just got broken because of some Mercurial errors. Well, your steps to reproduce do not mention any methods, but there must be some methods invoked for this error to occur. The best would be to have some sample test-case. I did not manage to reproduce this yet. How often does this happen for you?
Well, when it occurs, it is first time the breakpoint is hit. Nothing special has been done, but it fails consistently for the whole IDE session - even if I stop the session and attach again. I just tried it again and it decided to work, but I have changed the code since - pretty extensively, shall I say. So I will have to wait for another occurrence to provide more info.
The original InternalException is now added as a cause to InvalidExpressionException so that we can see where was it thrown from: http://hg.netbeans.org/main/rev/c36589519815 The fact that it fails even when you attach debugger again indicates that it's most probably some inconsistent state inside JDI or JDWP layer, therefore a JDK problem. In order to submit that as a defect for JDK we need reproducible steps. It looks like it's essential to know what you did just before this error occurred for the first time.
Integrated into 'main-golden', available in build *200808201401* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/c36589519815 User: mentlicher@netbeans.org Log: #144316 - Set the InternalException as a cause to InvalidExpressionException so that we get the stack trace when something in JDWP goes wrong.
Since requested additional information haven't been provided this issue was closed as INVALID. However, we still consider your report important for next development. Therefore, please, if you experience this issue again feel free to reopen it and submit additional information as well. Thank you for your support.
FYI: Since this was submitted again as issue #162041, I'll catch this exception in the code.
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.