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 116866 - NPE pointing at selected string
Summary: NPE pointing at selected string
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks: 108873
  Show dependency tree
 
Reported: 2007-09-26 19:03 UTC by _ gordonp
Modified: 2010-04-29 09:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace (2.06 KB, text/plain)
2007-09-26 19:04 UTC, _ gordonp
Details
Source file being debugged (3.46 KB, text/plain)
2007-09-26 19:05 UTC, _ gordonp
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ gordonp 2007-09-26 19:03:19 UTC
I'm writing a CharsetDecoder and repeatedly get NPEs trying to use a tooltip on a highlighted
expression. I'll attach both the stack trace and java file in a moment. I have 2 breakpoints
set, one at line 85 and one at 96. I've run to the one at 85.

Steps to duplicate:
1. Set line breakpoints at lines 85 and 96.
2. Run the project (project will stop at bp on line 85).
3. Highlight "Character.isDigit(bytes[i + 1])" and move the mouse over the selected text

I get a repeatable NPE from the jpda evaluator.
Comment 1 _ gordonp 2007-09-26 19:04:11 UTC
Created attachment 49601 [details]
Stack trace
Comment 2 _ gordonp 2007-09-26 19:05:13 UTC
Created attachment 49602 [details]
Source file being debugged
Comment 3 _ gordonp 2007-09-26 19:06:37 UTC
FYI, I'm using a private build which was updated and freshly compiled last night. I'm
using JDK 1.5.0_12 on Solaris x86.
Comment 4 Martin Entlicher 2007-09-26 20:39:58 UTC
Reproduced. This is not really a regression from prior versions, trying the same in NB 5.5.1 does not throw an
exception, but writes: Cannot call method "isDigit" in class "java.lang.Character". The call is ambigous.
The evaluator algorithm seems to be confused by two methods: Character.isDigit(int) and Character.isDigit(char).
Looking at Evaluator.java:1053, the "fix" to get the behavior of NB 5.5.1 is easy. However proper fix if this is more
complicated.

Since there are many more situations in which the evaluator does not work, I've created an umbrella issue #108873 and I
would like to solve them all by a complete rewrite of the evaluator algorithm. However, this does not seem to be doable
into NB 6.0, unfortunately.

Changing to P3, since this is on the same level with other evaluator issues listed at
http://www.netbeans.org/issues/showdependencytree.cgi?id=108873
Comment 5 Martin Entlicher 2007-09-26 20:47:02 UTC
The NPE is fixed, however it still does not evaluate the expression. :-(

/shared/data/ccvs/repository/debuggerjpda/src/org/netbeans/modules/debugger/jpda/expr/Evaluator.java,v  <--  Evaluator.java
new revision: 1.37; previous revision: 1.36
Comment 6 Martin Entlicher 2007-12-13 17:17:43 UTC
Fixed in the new evaluator algorithm - see issue #108873.
Comment 7 Quality Engineering 2010-04-29 09:35:26 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.