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 140833 - NullPointerException at org.netbeans.lib.profiler.ui.components.SnippetPanel$TitleUI.getPreferredSize
Summary: NullPointerException at org.netbeans.lib.profiler.ui.components.SnippetPanel$...
Status: RESOLVED WONTFIX
Alias: None
Product: profiler
Classification: Unclassified
Component: Base (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jiri Sedlacek
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-18 21:58 UTC by chrisxaustin
Modified: 2008-07-25 16:41 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 22313


Attachments
stacktrace (7.33 KB, text/plain)
2008-07-18 21:58 UTC, chrisxaustin
Details
messages.log (363.73 KB, text/plain)
2008-07-22 13:44 UTC, chrisxaustin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description chrisxaustin 2008-07-18 21:58:35 UTC
Build: NetBeans IDE 6.1 (Build 200804211638)
VM: Java HotSpot(TM) Client VM, 1.6.0-b105, Java(TM) SE Runtime Environment, 1.6.0-b105
OS: Windows XP, 5.1, x86

User Comments: 
Loading netbeans after an update
Comment 1 chrisxaustin 2008-07-18 21:58:39 UTC
Created attachment 65000 [details]
stacktrace
Comment 2 Jiri Sedlacek 2008-07-22 13:02:03 UTC
Is there any chance you could provide some steps to reproduce? Have you experienced this problem more than once? By
analyzing the sources I'm not able to find any potential cause of this problem.
Comment 3 chrisxaustin 2008-07-22 13:44:27 UTC
Created attachment 65236 [details]
messages.log
Comment 4 chrisxaustin 2008-07-22 13:48:30 UTC
Attached the messages.log file which has some other exceptions, including:
java.lang.NoClassDefFoundError: org/nbheaven/sqe/bridge/checkstyle/CheckstyleQualityProvider


java.lang.NullPointerException

	at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.getProjectFor(AntBasedProjectFactorySingleton.java:230)

	at org.netbeans.spi.project.support.ant.SourcesHelper.getProject(SourcesHelper.java:465)

	at org.netbeans.spi.project.support.ant.SourcesHelper.remarkExternalRoots(SourcesHelper.java:523)

	at org.netbeans.spi.project.support.ant.SourcesHelper.registerExternalRoots(SourcesHelper.java:516)

	at org.netbeans.modules.java.j2seproject.J2SESources$2.run(J2SESources.java:163)



java.lang.NullPointerException

	at org.netbeans.lib.profiler.ui.components.SnippetPanel$TitleUI.getPreferredSize(SnippetPanel.java:122)



java.lang.ArrayIndexOutOfBoundsException: 3 >= 1

	at java.util.Vector.elementAt(Vector.java:427)

	at javax.swing.tree.DefaultMutableTreeNode.getChildAt(DefaultMutableTreeNode.java:230)

	at javax.swing.tree.VariableHeightLayoutCache.treeNodesRemoved(VariableHeightLayoutCache.java:543)

	at javax.swing.plaf.basic.BasicTreeUI$Handler.treeNodesRemoved(BasicTreeUI.java:3917)

	at javax.swing.tree.DefaultTreeModel.fireTreeNodesRemoved(DefaultTreeModel.java:530)

	at javax.swing.tree.DefaultTreeModel.nodesWereRemoved(DefaultTreeModel.java:310)

	at org.openide.explorer.view.NodeTreeModel$Listener.removed(NodeTreeModel.java:197)

	at org.openide.explorer.view.VisualizerChildren.removed(VisualizerChildren.java:165)

	at org.openide.explorer.view.VisualizerEvent$Removed.run(VisualizerEvent.java:145)

	at org.openide.util.Mutex.readAccess(Mutex.java:362)

	at org.openide.explorer.view.VisualizerNode$QP.run(VisualizerNode.java:661)

Comment 5 Jiri Sedlacek 2008-07-24 10:36:41 UTC
Unfortunately there's no information in the logfile that would help me to identify the cause. However, looking at the
other exceptions the IDE seems to be kind of broken in various areas, it could be caused by a broken userdir.

I'd like to ask you for more cooperation - could you please check if one of the following fixes the NPE from
SnippetPanel$TitleUI?

 - Closing the Profiler window, restarting the IDE and opening the Profiler window again
 - Using a fresh userdir to run the IDE: start the IDE using for example nb.exe --userdir "C:\testnbuserdir"

In every case closing the Profiler window should work as a workaround to prevent the NPE from SnippetPanel$TitleUI.

If the above steps don't resolve the problem, could you please let me know whether you are using some non-standard
configuration that could cause the problem - I mean some customized Windows theme, NetBeans look and feel etc.

Thanks.
Comment 6 chrisxaustin 2008-07-25 16:14:18 UTC
When netbeans starts none of the windows are open.
Just the title bar, menu bar, toolbar, and the bottom bar with the error indicator. 
No projects/files/profiler at all.
Attempting to add the any window fails.

Running with a new userdir worked though
Comment 7 Jiri Sedlacek 2008-07-25 16:41:54 UTC
Based on this information, I have to close this issue as WONTFIX since it looks like the userdir is broken in the way
that prevents also other parts of the IDE to be displayed - probably not related just to the profiler. I was unable to
reproduce the problem so its hopefully just a cornercase which is easy to fix/workaround by deleting the current userdir
or using a different one.

Please feel free to reopen this issue if the problem occurs again for a fresh userdir and/or you are able to provide
exact steps reproducing the problem. Thanks for your help!