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 196318

Summary: [70cat] NullPointerException: Null child at index 7, parent: Root, model: org.netbeans.spi.viewmodel.Models$CompoundModel@14d7a8e TreeModel = org.netbeans.spi.viewmodel.Models$DelegatingTreeModel@191c9a
Product: cnd Reporter: tbrunhoff <tbrunhoff>
Component: DebuggerAssignee: Egor Ushakov <gorrus>
Status: VERIFIED FIXED    
Severity: normal CC: aldobrucale, artisan, emiddio, mentlicher, milinkp, mmirilovic, narve, phill84, sebglon
Priority: P1    
Version: 7.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter: 177450
Attachments: stacktrace

Description tbrunhoff 2011-03-04 17:21:43 UTC
This bug was originally marked as duplicate of bug 186297, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 201103040000)
VM: Java HotSpot(TM) Client VM, 19.0-b09, Java(TM) SE Runtime Environment, 1.6.0_23-b05
OS: Linux

User Comments:
GUEST: trying to debug .. debug failing to stop at breakpoints

GUEST: Don't know exactly when the problem occured.

GUEST: debugging

GUEST: was viewing variables and then stopped debugging

GUEST: Debugging to wrong remote host.

GUEST: Debuging web application

GUEST: simply stopped debugging now -.-

artisan: running a unit test

phill84: deploying a webapp in tomcat

narve: Debugging my Swing GUI

GUEST: I was debugging and clicked the "STOP"-button when this error occured

GUEST: Stop debug program and see problem.

GUEST: debuging

milinkp: I dont know when its comes.. Its happened when i try to execute the program ,

tbrunhoff: stepping through code (stepping out of a method).

mmirilovic: Switch to Loaded classes

GUEST: Hi, during a "Clean and build" the system showed me this problem... fortunately it hasn't crush the system.

GUEST: stopped debugging

GUEST: Noticed this after debugging my program

artisan: This happens once in while during testing. 

Don't know to reproduce.

mmirilovic: Steps to reproduce:
- I had opened MemoryView project
- CLass breakpoint in group 'xxxx' and another line breakpoint inside constructor
- started debugger
- slected Breakpoint's group node 'xxx' and pushed 'Delete All' from context menu
- continue in debugging




Stacktrace: 
java.lang.NullPointerException: Null child at index 7, parent: Root, model: org.netbeans.spi.viewmodel.Models$CompoundModel@14d7a8e
  TreeModel = org.netbeans.spi.viewmodel.Models$DelegatingTreeModel@191c9a
    org.netbeans.modules.cnd.debugger.common2.debugger.StackModel@1824964
  NodeModel =     org.netbeans.modules.cnd.debugger.common2.debugger.StackModel@1824964
  TableModel = org.netbeans.spi.viewmodel.Models$DelegatingTableModel@186ef82
    org.netbeans.modules.cnd.debugger.common2.debugger.StackModel@1824964
  NodeActionsProvider = org.netbeans.spi.viewmodel.Models$DelegatingNodeActionsProvider@a4e97e
    org.netbeans.modules.cnd.debugger.common2.debugger.StackModel@1824964
  ColumnsModel = [org.netbeans.modules.cnd.debugger.common2.debugger.StackColumnModels$Number@a0849b, org.netbeans.modules.cnd.debugger.common2.debugger.StackColumnModels$Optimized@6217ee, org.netbeans.modules.cnd.debugger.common2.debugger.StackColumnModels$CurrentPC@113690, org.netbeans.modules.cnd.debugger.common2.debugger.StackCo
   at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.applyChildren(TreeModelNode.java:1418)
   at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.refreshLazyChildren(TreeModelNode.java:1395)
   at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.refreshChildren(TreeModelNode.java:1250)
   at org.netbeans.modules.viewmodel.TreeModelNode.refreshTheChildren(TreeModelNode.java:857)
   at org.netbeans.modules.viewmodel.TreeModelNode.refreshTheChildren(TreeModelNode.java:840)
   at org.netbeans.modules.viewmodel.TreeModelNode$5.run(TreeModelNode.java:587)
Comment 1 tbrunhoff 2011-03-04 17:21:49 UTC
Created attachment 106724 [details]
stacktrace
Comment 2 Martin Entlicher 2011-03-07 10:49:06 UTC
This looks like org.netbeans.modules.cnd.debugger.common2.debugger.StackModel.getChildren() returned an array with a null element.
This could happen only when GdbDebuggerImpl.getStack() returns an array with a null element.
guiStackFrames array is initialized in setStackWithArgs() method and this method is called in a RequestProcessor thread. getStack() is called in AWT and there's no synchronization. Therefore it's possible that the AWT thread gets a partially initialized array in getStack() method.
Comment 3 Egor Ushakov 2011-03-10 16:01:19 UTC
*** Bug 196552 has been marked as a duplicate of this bug. ***
Comment 4 Egor Ushakov 2011-03-10 16:12:06 UTC
fixed in trunk:
http://hg.netbeans.org/cnd-main/rev/94f144614857
Comment 5 Egor Ushakov 2011-03-10 16:19:45 UTC
showstopper, please verify fix in trunk
Comment 6 Marian Mirilovic 2011-03-10 21:02:51 UTC
just my two cents - look at issue 196553 - it's similar and it's already fixed in 7.0
Comment 7 Egor Ushakov 2011-03-11 04:59:01 UTC
should not be marked as fixed until it is in release branch
Comment 8 Quality Engineering 2011-03-11 09:40:36 UTC
Integrated into 'main-golden', will be available in build *201103110400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/94f144614857
User: Egor Ushakov <gorrus@netbeans.org>
Log: fixed #196318 (NPE in Stack view)
Comment 9 Alexander Pepin 2011-03-14 18:01:46 UTC
As nobody can verify the fix or reproduce a bug we can consider the fix as successful and push it into RC branch.
Comment 10 Egor Ushakov 2011-03-15 10:07:53 UTC
integrated into release70:
http://hg.netbeans.org/releases/rev/baa49f912246
Comment 11 Alexander Pepin 2011-03-22 13:55:52 UTC
can not reproduce NPE in RC1 build 20110322.