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 122573 - Method.bytecodes() might be an unsupported operation
Summary: Method.bytecodes() might be an unsupported operation
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-22 10:30 UTC by Martin Entlicher
Modified: 2007-11-27 09:35 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The patch (807 bytes, text/plain)
2007-11-26 09:07 UTC, Martin Entlicher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2007-11-22 10:30:16 UTC
Some virtual machines do not support Method.bytecodes():

java.lang.UnsupportedOperationException
    at com.sun.tools.jdi.JDWPException.toJDIException(JDWPException.java:38)
    at com.sun.tools.jdi.ConcreteMethodImpl.bytecodes(ConcreteMethodImpl.java:241)
    at org.netbeans.modules.debugger.jpda.ExpressionPool.createExpressionAt(ExpressionPool.java:135)
    at org.netbeans.modules.debugger.jpda.ExpressionPool.getExpressionAt(ExpressionPool.java:87)
    at org.netbeans.modules.debugger.jpda.actions.StepActionProvider.setLastOperation(StepActionProvider.java:349)
    at org.netbeans.modules.debugger.jpda.actions.StepActionProvider.exec(StepActionProvider.java:264)
    at org.netbeans.modules.debugger.jpda.util.Operator$1.run(Operator.java:265)
[catch] at java.lang.Thread.run(Thread.java:619)
Comment 1 Martin Entlicher 2007-11-22 15:29:27 UTC
We need to check VirtualMachine.canGetBytecodes().
Comment 2 Martin Entlicher 2007-11-23 10:37:53 UTC
The problem is fixed in trunk:

/shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/ExpressionPool.java,v  <-- 
ExpressionPool.java
new revision: 1.5; previous revision: 1.4
Comment 3 Richard Gregor 2007-11-25 07:29:20 UTC
Increasing priority to P1 since this is important issue that should be fixed in NB 6.0 otherwise users will need to use
older version to debug the latest phone stack delivered by Sun.
Comment 5 Marian Mirilovic 2007-11-25 16:49:11 UTC
Agreed with WTK team - this is stopper for NB 6.0.

mentlicher, 
please prepare the patch for release60 branch and ask for review. Thanks in advance.
Comment 6 Martin Entlicher 2007-11-26 09:07:50 UTC
Created attachment 53473 [details]
The patch
Comment 7 Jan Stola 2007-11-26 13:28:03 UTC
I reviewed the patch. The patch is simple and seems to solve the described problem without any side effect.
Comment 8 Martin Entlicher 2007-11-26 13:37:25 UTC
Thanks for the review, the fix is merged into release60 branch:

/shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/ExpressionPool.java,v  <-- 
ExpressionPool.java
new revision: 1.4.4.1; previous revision: 1.4
Comment 9 Richard Gregor 2007-11-27 09:35:42 UTC
Thank you Martin for your fast and professional solution.