Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 132160 - ClassCastException on root node inside Evaluate Expression Result tree
ClassCastException on root node inside Evaluate Expression Result tree
Status: VERIFIED FIXED
Product: debugger
Classification: Unclassified
Component: Java
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Martin Entlicher
issues@debugger
61fixes2-fixed
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-07 09:57 UTC by Jiri Vagner
Modified: 2008-07-10 17:38 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
:


Attachments
exc.txt (2.82 KB, text/plain)
2008-04-07 09:59 UTC, Jiri Vagner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Vagner 2008-04-07 09:57:21 UTC
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)
Comment 1 Jiri Vagner 2008-04-07 09:59:23 UTC
Created attachment 59757 [details]
exc.txt
Comment 2 Martin Entlicher 2008-04-07 13:29:45 UTC
Reproduced.
The problem is that selected node happens to be the last selected node in the IDE before Evaluate Expression dialog was
invoked.
Comment 3 rbalada 2008-06-05 12:02:44 UTC
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
Comment 4 Quality Engineering 2008-06-05 15:50:18 UTC
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
Comment 5 Peter Pis 2008-06-06 09:36:40 UTC
Fixed.
Comment 6 Peter Pis 2008-06-06 09:37:02 UTC
Verified for both 1.5 and 1.6 in Product Version: NetBeans IDE Dev (Build 200806060005)
Comment 7 jinb 2008-06-09 16:31:58 UTC
fix backported into release61_fixes branch
http://hg.netbeans.org/release61_fixes/rev/8c1c9ba079f6
Comment 8 Peter Pis 2008-06-19 09:48:52 UTC
Verified with patch2.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo