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 45707 - debug-single fails because NPE is thrown
Summary: debug-single fails because NPE is thrown
Status: CLOSED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 4.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: issues@debugger
URL:
Keywords: T9Y
Depends on:
Blocks:
 
Reported: 2004-06-30 07:22 UTC by Jiri Skrivanek
Modified: 2006-03-24 09:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Stack trace (10.24 KB, text/plain)
2004-06-30 07:22 UTC, Jiri Skrivanek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2004-06-30 07:22:03 UTC
Sometimes it happens that commit validation suite
fails because NullPointerException (see attached)
is thrown when the test starts debug-single
target. There are two breakpoints in a simple java
class.

Last time occured in build 20040629-1814, JDK1.4.2_03.
Comment 1 Jiri Skrivanek 2004-06-30 07:22:45 UTC
Created attachment 16067 [details]
Stack trace
Comment 2 Jan Jancura 2004-07-01 09:57:57 UTC
Looks like som openide problem. I do not understand how its possible
to get NPE from NodeTableModel.java:122!
Comment 3 Jiri Skrivanek 2004-07-01 11:26:54 UTC
I temporarily removed testDebugging test case from the suite. To run
commit validation in debug mode run:

cd nb_all/ide/test
and -Dxtest.attribs=validation -Dxtest.debug.port=8765
Comment 4 Marian Mirilovic 2004-07-12 13:14:13 UTC
P2 for all fix-in-40 issues
Comment 5 _ tboudreau 2004-07-21 15:07:33 UTC
> I do not understand how its possible to get NPE from NodeTableModel.java:122!

Line 122:
allPropertyColumns[ia].setProperty( props[i] );

All you need to do is pass null for the Property[] props argument.  Don't do that, it's not 
legal.
Comment 6 Maros Sandor 2004-07-27 07:00:17 UTC
If props was null, NPE would be thrown at line 98, wouldn't it? 
However, I can image that allPropertyColumns[ia] can change to null 
in between lines 121 and 122 because setProperties method is not 
synchronized.
Comment 7 Jan Jancura 2004-07-27 09:27:16 UTC
Should be fixed by this change:

RCS file:
/cvs/debuggercore/viewmodel/src/org/netbeans/spi/viewmodel/Models.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -r1.5 -r1.6
27a28
> import javax.swing.SwingUtilities;
116c117
<         JComponent view,
---
>         final JComponent view,
162c163
<         CompoundModel cm = new CompoundModel (
---
>         final CompoundModel cm = new CompoundModel (
169c170,174
<         ((TreeTable) view).setModel (cm);
---
>         SwingUtilities.invokeLater (new Runnable () {
>             public void run () {
>                 ((TreeTable) view).setModel (cm);
>             }
>         });
Comment 8 Jiri Skrivanek 2004-08-03 09:56:50 UTC
Verifying - issue not seen in automated tests for a long time after fix.