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 75647 - not risilient to addModelListener failures
Summary: not risilient to addModelListener failures
Status: CLOSED WONTFIX
Alias: None
Product: debugger
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: issues@debugger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-27 20:41 UTC by ivan
Modified: 2010-04-29 09:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ivan 2006-04-27 20:41:19 UTC
While playing around with IZ 50761 I noticed that if addModelListener fails
at startup, as follows:

java.lang.NullPointerException
        at
com.sun.tools.debugger.dbxgui.debugger.DbxDebuggerImpl.registerStackModel(DbxDebuggerImpl.java:1893)
        at
com.sun.tools.debugger.dbxgui.debugger.StackModel.addModelListener(StackModel.java:245)
        at
org.netbeans.spi.viewmodel.Models$DelegatingTreeModel.addModelListener(Models.java:1065)
        at
org.netbeans.spi.viewmodel.Models$CompoundModel.addModelListener(Models.java:2363)
        at
org.netbeans.modules.viewmodel.TreeModelRoot.<init>(TreeModelRoot.java:58)
        at org.netbeans.modules.viewmodel.TreeTable.setModel(TreeTable.java:113)
        at org.netbeans.spi.viewmodel.Models$1.run(Models.java:109)

Then upon shutdown we get corresponding AIOOBs:
java.lang.ArrayIndexOutOfBoundsException: 1 >= 1
        at java.util.Vector.elementAt(Vector.java:432)
        at
javax.swing.table.DefaultTableColumnModel.getColumn(DefaultTableColumnModel.java:280)
        at org.netbeans.modules.viewmodel.TreeTable.saveWidths(TreeTable.java:265)
        at org.netbeans.modules.viewmodel.TreeTable.setModel(TreeTable.java:101)
        at org.netbeans.spi.viewmodel.Models$1.run(Models.java:109)
Comment 1 Martin Entlicher 2006-04-28 16:17:47 UTC
We're not super robust against defects in clients that we call. IMHO most parts
of the IDE can be broken when threads are interrupted with exceptions.
Comment 2 Martin Entlicher 2006-10-18 17:35:31 UTC
Marking as wontfix - there are *lot* of places where client code is called
through listeners or lookup. We do not put try/catch blocks around every call to
the client code in NetBeans and it would be an overkill to add it everywhere.

We're not building a mission-critical application, so when a problem like this
occurs, it should be fixed in the client code.
Comment 3 ivan 2006-10-18 19:52:27 UTC
OK
Comment 4 Quality Engineering 2010-04-29 09:29:01 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.