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.
Steps to reproduce: - open MemoryView project - open LongArrays.java file - set line breakpoin on line 38 and debug file - run Run > Evaluete Expression - type "a" inside textfield and press enter key - click left mouse on "a" node inside Result tree java.lang.ClassCastException: org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj cannot be cast to org.netbeans.api.debugger.jpda.ObjectVariable at org.netbeans.modules.debugger.jpda.heapwalk.models.HeapActionsFilter$1.isEnabled(HeapActionsFilter.java:113) at org.netbeans.spi.viewmodel.Models$ActionSupport.isEnabled(Models.java:505) at org.openide.awt.Actions$MenuBridge.updateState(Actions.java:902) at org.openide.awt.Actions.connect(Actions.java:196) ... Product Version: NetBeans IDE Dev (Build 200804032041) Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11 System: Windows XP version 5.1 running on x86; Cp1250; cs_CZ (nb)
Created attachment 59757 [details] exc.txt
Reproduced. The problem is that selected node happens to be the last selected node in the IDE before Evaluate Expression dialog was invoked.
I was able to reproduce it only on JDK 1.6.x . I was unable to reproduce when using JDK 1.5.x. Added "instanceof" check before type conversion. Fix integrated into main as http://hg.netbeans.org/main/rev/023dc55cea5d
Integrated into 'main-golden', available in NB_Trunk_Production #239 build Changeset: http://hg.netbeans.org/main/rev/023dc55cea5d User: Rudolf Balada <rbalada@netbeans.org> Log: #132160: ClassCastException on root node inside Evaluate Expression Result tree
Fixed.
Verified for both 1.5 and 1.6 in Product Version: NetBeans IDE Dev (Build 200806060005)
fix backported into release61_fixes branch http://hg.netbeans.org/release61_fixes/rev/8c1c9ba079f6
Verified with patch2.