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 107538

Summary: NullPointerException when gdb's not found
Product: cnd Reporter: htt <htt>
Component: DebuggerAssignee: _ gordonp <gordonp>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P1    
Version: 6.x   
Hardware: Sun   
OS: Solaris   
Issue Type: DEFECT Exception Reporter:

Description htt 2007-06-20 23:03:04 UTC
With the latest NB6.0 nightly bits...

Without compilers/gdb included in the PATH, 
  launch the IDE and create a sample Quote project.
  Build
  Debug
A popup with the "gdb: not found" msg appears as expected; click OK.
=> java.lang.NullPointerException
    at 
org.netbeans.modules.cnd.debugger.gdb.GdbDebuggerImpl.finish(GdbDebuggerImpl.java:253)
    at 
org.netbeans.modules.cnd.debugger.gdb.actions.KillActionProvider.runAction(KillActionProvider.java:90)
    at 
org.netbeans.modules.cnd.debugger.gdb.actions.KillActionProvider.doAction(KillActionProvider.java:78)
    at 
org.netbeans.api.debugger.ActionsManager.doAction(ActionsManager.java:136)
    at org.netbeans.api.debugger.Session.kill(Session.java:256)
    at 
org.netbeans.modules.cnd.debugger.gdb.GdbDebuggerImpl.startDebugger(GdbDebuggerImpl.java:147)
    at 
org.netbeans.modules.cnd.debugger.gdb.actions.StartActionProvider.doAction(StartActionProvider.java:73)
    at 
org.netbeans.modules.cnd.debugger.gdb.actions.StartActionProvider$1.run(StartActionProvider.java:117)
    at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:539)
[catch] at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:964)

Per gordonp, this is a known problem that needs to be documented.
Comment 1 _ gordonp 2007-07-04 00:10:10 UTC
Fixed. Check for null object and skip dereferencing it if null. Also use Build Tools
to ensure a gdb command is available.
Comment 2 Alexander Pepin 2007-10-23 16:51:30 UTC
Verified in nightly build 20071023