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 195306 - NPE on switching watches in Variables
Summary: NPE on switching watches in Variables
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Debugger (show other bugs)
Version: 7.0
Hardware: PC All
: P2 normal (vote)
Assignee: Egor Ushakov
URL:
Keywords:
: 195328 (view as bug list)
Depends on: 195087
Blocks:
  Show dependency tree
 
Reported: 2011-02-10 17:49 UTC by Alexander Pepin
Modified: 2011-02-16 11:32 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 176600


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pepin 2011-02-10 17:49:47 UTC
Steps to reproduce:
- create remote Welcome sample project
- do step into
- as soon as "green cursor" appears in the editor open Variables
- press "Show Watches inside Variables view" while Variables view is empty, please notice that Variables remains empty during pretty long period of time (~5 sec) and it looks like a regression in debugger performance

Result: NPE occurs

java.lang.NullPointerException
	at org.netbeans.modules.debugger.ui.views.ViewModelListener$2.getChildren(ViewModelListener.java:357)
	at org.netbeans.modules.viewmodel.TreeModelHyperNode$HyperModelChildren.getModelChildren(TreeModelHyperNode.java:241)
[catch] at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.run(TreeModelNode.java:1269)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)



Debugger console shows:
~"GNU gdb 6.8\n"
~"Copyright (C) 2008 Free Software Foundation, Inc.\n"
~"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n"
~"This is free software: you are free to change and redistribute it.\n"
~"There is NO WARRANTY, to the extent permitted by law.  Type \"show copying\"\n"
~"and \"show warranty\" for details.\n"
~"This GDB was configured as \"sparc-sun-solaris2.10\".\n"
&"/home/ap153252/.gdbinit: No such file or directory.\n"
(gdb) 
2-gdb-set print repeat 0
3-gdb-set backtrace limit 1024
4-file-exec-and-symbols  "/export/hudson/home/.netbeans/remote/spb-nero/outback-Linux-x86/home/ap153252/NetBeansProjects/Welcome_36/dist/Debug/GNU-Solaris-Sparc/welcome_36"
2^done
(gdb) 
3^done
(gdb) 
4^done
(gdb) 
5-file-list-exec-source-file
6cd /export/hudson/home/.netbeans/remote/spb-nero/outback-Linux-x86/home/ap153252/NetBeansProjects/Welcome_36
7-exec-arguments "arg 1" "arg 2" "arg 3" "arg 4"
8-gdb-set environment OMP_NUM_THREADS=2
5^done,line="26",file="welcome.cc",fullname="/export/hudson/home/.netbeans/remote/spb-nero/outback-Linux-x86/home/ap153252/NetBeansProjects/Welcome_36/welcome.cc",macro-info="0"
(gdb) 
9-break-insert -t main
10-exec-run
11info proc
&"cd /export/hudson/home/.netbeans/remote/spb-nero/outback-Linux-x86/home/ap153252/NetBeansProjects/Welcome_36\n"
~"Working directory /export/hudson/home/.netbeans/remote/spb-nero/outback-Linux-x86/home/ap153252/NetBeansProjects/Welcome_36.\n"
6^done
(gdb) 
7^done
(gdb) 
8^done
(gdb) 
9^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x00010c9c",func="main",file="welcome.cc",fullname="/export/hudson/home/.netbeans/remote/spb-nero/outback-Linux-x86/home/ap153252/NetBeansProjects/Welcome_36/welcome.cc",line="35",times="0"}
(gdb) 
10^running
(gdb) 
10*stopped,thread-id="0",frame={addr="0x00010c9c",func="main",args=[{name="argc",value="5"},{name="argv",value="0xffbffc64"}],file="welcome.cc",fullname="/export/hudson/home/.netbeans/remote/spb-nero/outback-Linux-x86/home/ap153252/NetBeansProjects/Welcome_36/welcome.cc",line="35"}
(gdb) 
12-stack-list-frames
&"info proc\n"
~"process 16579 flags:\n"
PR_STOPPED Process (LWP) is stopped
PR_ISTOP Stopped on an event of interest
PR_RLC Run-on-last-close is in effect
PR_MSACCT Microstate accounting enabled
PR_PCOMPAT Micro-state accounting inherited on fork
PR_FAULTED : Incurred a traced hardware fault FLTBPT: Breakpoint trap

11^done
(gdb) 
12^done,stack=[frame={level="0",addr="0x00010c9c",func="main",file="welcome.cc",fullname="/export/hudson/home/.netbeans/remote/spb-nero/outback-Linux-x86/home/ap153252/NetBeansProjects/Welcome_36/welcome.cc",line="35"}]
(gdb) 
13-stack-list-arguments 1
13^done,stack-args=[frame={level="0",args=[{name="argc",value="5"},{name="argv",value="0xffbffc64"}]}]
(gdb) 
14-var-update * 
15-stack-list-locals --simple-values
14^done,changelist=[]
(gdb) 
15^done,locals=[]
(gdb) 
16-stack-list-locals --simple-values
16^done,locals=[]
(gdb) 
17-var-create - * argc
18-var-create - * argv
19-var-create - * argc
20-var-create - * argv
17^done,name="var1",numchild="0",value="5",type="int"
(gdb) 
21-var-show-attributes var1
18^done,name="var2",numchild="1",value="0xffbffc64",type="char **"
(gdb) 
19^done,name="var3",numchild="0",value="5",type="int"
(gdb) 
20^done,name="var4",numchild="1",value="0xffbffc64",type="char **"
(gdb) 
22-var-show-attributes var2
23-var-show-attributes var3
21^done,attr="editable"
(gdb) 
24-var-show-attributes var4
25-var-evaluate-expression var1
22^done,attr="editable"
(gdb) 
23^done,attr="editable"
(gdb) 
26-var-evaluate-expression var2
24^done,attr="editable"
(gdb) 
25^done,value="5"
(gdb) 
27-var-evaluate-expression var3
28-var-evaluate-expression var4
26^done,value="0xffbffc64"
(gdb) 
27^done,value="5"
(gdb) 
28^done,value="0xffbffc64"
(gdb)
Comment 1 Egor Ushakov 2011-02-11 12:53:43 UTC
latest exception with more details:
java.lang.NullPointerException: Null child at index 1, parent: Root, model: org.netbeans.spi.viewmodel.Models$CompoundModel@111d6d
  TreeModel = org.netbeans.spi.viewmodel.Models$DelegatingTreeModel@1a31895
    org.netbeans.modules.cnd.debugger.common2.debugger.LocalModel@d86fa8
  NodeModel = org.netbeans.spi.viewmodel.Models$CompoundNodeModel@f94ca
    org.netbeans.modules.cnd.debugger.common2.debugger.LocalModel@d86fa8

  TableModel = org.netbeans.spi.viewmodel.Models$DelegatingTableModel@1aa004f
    org.netbeans.modules.cnd.debugger.common2.debugger.LocalModel@d86fa8
  NodeActionsProvider = org.netbeans.spi.viewmodel.Models$DelegatingNodeActionsProvider@a31982
    org.netbeans.modules.cnd.debugger.common2.debugger.LocalModel@d86fa8
    org.netbeans.modules.debugger.ui.models.VariablesActionsProvider@1b111eb
  ColumnsModel = [org.netbeans.modules.cnd.debugger.common2.debugger.VariableColumnModels$ValueColumn@1c9c421, org.netbeans.modules.cnd.debugger.common2.debugger.VariableColumnModels$TypeColumn@40c8a4, org.netbeans.modules.debugger.ui.models.ColumnModels$AbstractColumn@113982e]
	at org.netbeans.modules.debugger.ui.views.ViewModelListener$2.getChildren(ViewModelListener.java:360)
	at org.netbeans.modules.viewmodel.TreeModelHyperNode$HyperModelChildren.getModelChildren(TreeModelHyperNode.java:241)
	at org.netbeans.modules.viewmodel.TreeModelNode$TreeModelChildren.run(TreeModelNode.java:1269)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1424)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1968)
Comment 2 Egor Ushakov 2011-02-11 13:05:19 UTC
*** Bug 195328 has been marked as a duplicate of this bug. ***
Comment 3 Egor Ushakov 2011-02-11 13:28:05 UTC
fixed in:
http://hg.netbeans.org/cnd-main/rev/16d080f19401
Comment 4 Quality Engineering 2011-02-16 11:32:15 UTC
Integrated into 'main-golden', will be available in build *201102160501* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/16d080f19401
User: Egor Ushakov <gorrus@netbeans.org>
Log: fixed #195306 (NPE on switching watches in Variables)