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 208712 - NullPointerException at org.netbeans.modules.ant.debugger.Utils.getLine
Summary: NullPointerException at org.netbeans.modules.ant.debugger.Utils.getLine
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Ant (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-21 18:17 UTC by javydreamercsw
Modified: 2012-05-01 09:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 185261


Attachments
stacktrace (2.14 KB, text/plain)
2012-02-21 18:17 UTC, javydreamercsw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description javydreamercsw 2012-02-21 18:17:31 UTC
Build: NetBeans IDE Dev (Build 201202140400)
VM: Java HotSpot(TM) Client VM, 22.1-b02, Java(TM) SE Runtime Environment, 1.7.0_03-b05
OS: Windows 7

User Comments:
javydreamercsw: Using next on an antcall call (the called target is on an imported xml file)




Stacktrace: 
java.lang.NullPointerException
   at org.netbeans.modules.ant.debugger.Utils.getLine(Utils.java:272)
   at org.netbeans.modules.ant.debugger.AntDebugger.onBreakpoint(AntDebugger.java:545)
   at org.netbeans.modules.ant.debugger.AntDebugger.elementStarted(AntDebugger.java:244)
   at org.netbeans.modules.ant.debugger.AntDebugger.targetStarted(AntDebugger.java:394)
   at org.netbeans.modules.ant.debugger.DebuggerAntLogger.targetStarted(DebuggerAntLogger.java:150)
   at org.apache.tools.ant.module.bridge.impl.NbBuildLogger.targetStarted(NbBuildLogger.java:436)
Comment 1 javydreamercsw 2012-02-21 18:17:34 UTC
Created attachment 115993 [details]
stacktrace
Comment 2 Martin Entlicher 2012-03-09 11:14:20 UTC
The target is likely null, because
((TargetOriginating) frame).getOriginatingTarget() can return null.
Comment 3 Martin Entlicher 2012-04-26 16:33:37 UTC
Fixed NPE and added some logging in changeset:   220361:1f7bb7a51971
http://hg.netbeans.org/main/rev/1f7bb7a51971
Comment 4 Quality Engineering 2012-05-01 09:55:05 UTC
Integrated into 'main-golden', will be available in build *201205010400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/1f7bb7a51971
User: mentlicher@netbeans.org
Log: #208712: Prevent from NPE and report the case when we're not able to find the event's target so that we can explore it later...