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 176875 - NullPointerException at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl$5.run
Summary: NullPointerException at org.netbeans.modules.debugger.jpda.projects.EditorCon...
Status: VERIFIED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal (vote)
Assignee: Daniel Prusa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-16 03:26 UTC by Jindrich Sedek
Modified: 2009-11-18 03:20 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 162027


Attachments
stacktrace (1.39 KB, text/plain)
2009-11-16 03:26 UTC, Jindrich Sedek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jindrich Sedek 2009-11-16 03:26:00 UTC
Build: NetBeans IDE Dev (Build 200911160201)
VM: Java HotSpot(TM) 64-Bit Server VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Linux, 2.6.27.38-170.2.113.fc10.x86_64, amd64

User Comments:
jsedek: I just placed a break point at method declaration line

rogerrhody: Changed to an open jsf 2 page (xhtml) by selecting the tab in the editor.  Seem to get these NullPointerExceptions every time I change pages in the editor, I am primarily writing jsf 2 but I also have some persistence classes open and some managed beans.



Stacktrace: 
java.lang.NullPointerException
        at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl$5.run(EditorContextImpl.java:836)
        at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:129)
        at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:113)
        at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:190)
        at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:99)
        at org.netbeans.modules.debugger.jpda.projects.EditorContextImpl.getMethodLineNumbers(EditorContextImpl.java:831)
Comment 1 Jindrich Sedek 2009-11-16 03:26:04 UTC
Created attachment 91071 [details]
stacktrace
Comment 2 Daniel Prusa 2009-11-16 04:02:29 UTC
This is a regression caused by
http://hg.netbeans.org/main-silver?cmd=changeset;node=16b5c55166cb

We have to fix it in 6.8, the NPE could be thrown often and be quite annoying. The fix is not difficult, methods in EditorContextImpl should check whether a given file object is a java source.
Comment 3 Exceptions Reporter 2009-11-16 07:31:45 UTC
This issue already has 6 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=162027
Comment 4 Daniel Prusa 2009-11-16 08:32:31 UTC
Fixed in changeset 153771:236e034e97bd
http://hg.netbeans.org/main/rev/236e034e97bd
Comment 5 Quality Engineering 2009-11-17 03:04:26 UTC
Integrated into 'main-golden', will be available in build *200911170201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/236e034e97bd
User: Daniel Prusa <dprusa@netbeans.org>
Log: #176875, #176887: Check if the passed file object is Java source.
Comment 6 Martin Entlicher 2009-11-17 03:28:12 UTC
Fix reviewed, also verified in trunk that no exception is thrown.
Comment 7 Jindrich Sedek 2009-11-18 03:20:50 UTC
verified.
NetBeans IDE Dev (Build 200911171401)