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 144316 - [65cat] Unexpected JDWP Error: 502 while trying to see expression value
Summary: [65cat] Unexpected JDWP Error: 502 while trying to see expression value
Status: CLOSED INVALID
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker with 1 vote (vote)
Assignee: issues@debugger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-18 21:36 UTC by misterm
Modified: 2010-04-29 09:43 UTC (History)
0 users

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 misterm 2008-08-18 21:36:50 UTC
[ 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.
Comment 1 Martin Entlicher 2008-08-19 07:33:34 UTC
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.
Comment 2 Daniel Prusa 2008-08-19 10:21:41 UTC
Can you also attach the exception stacktrace, please?
Comment 3 misterm 2008-08-19 14:52:00 UTC
No stack trace was shown when it happened. Was it supposed to be in messages.log or something?
Comment 4 Martin Entlicher 2008-08-19 15:08:49 UTC
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.
Comment 5 misterm 2008-08-19 15:18:21 UTC
> 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.
Comment 6 Martin Entlicher 2008-08-19 16:57:17 UTC
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?
Comment 7 misterm 2008-08-19 17:58:07 UTC
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.
Comment 8 Martin Entlicher 2008-08-20 12:56:28 UTC
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.
Comment 9 Quality Engineering 2008-08-20 17:30:34 UTC
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.
Comment 10 Filip Zamboj 2008-12-09 17:32:38 UTC
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. 
Comment 11 Martin Entlicher 2009-04-15 09:48:09 UTC
FYI: Since this was submitted again as issue #162041, I'll catch this exception in the code.
Comment 12 Quality Engineering 2010-04-29 09:43:02 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.