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 33072 - IDE throws non-stop NullPointerExceptions
Summary: IDE throws non-stop NullPointerExceptions
Status: VERIFIED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P3 blocker (vote)
Assignee: Tomas Pavek
URL:
Keywords:
: 42860 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-04-19 01:39 UTC by greenbee
Modified: 2005-07-11 13:17 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Log file for S1Studio 4.1 (114.72 KB, patch)
2003-04-19 01:40 UTC, greenbee
Details | Diff
Netbeans 3.5beta log file (530.00 KB, patch)
2003-04-19 01:43 UTC, greenbee
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description greenbee 2003-04-19 01:39:04 UTC
I suspect that one of the settings file got
corrupted, but
both S1Studio 4.1 and Netbeans 3.5beta start
throwing NullPointerExceptions right after startup
when I click on the component in the component
inspector window. Clicking on OK button causes
another Exception to be thrown, which process
keeps going until main window is closed and IDE is
terminated.
Here is Stack trace from the ide.log
==>
java.lang.NullPointerException
	at
java.beans.Introspector.addMethod(Introspector.java:991)
	at
java.beans.Introspector.getTargetMethodInfo(Introspector.java:958)
	at
java.beans.Introspector.getBeanInfo(Introspector.java:370)
	at
java.beans.Introspector.getBeanInfo(Introspector.java:144)
	at
java.beans.Introspector.getBeanInfo(Introspector.java:205)
	at
java.beans.Introspector.<init>(Introspector.java:351)
	at
java.beans.Introspector.getBeanInfo(Introspector.java:144)
	at
org.openide.util.Utilities.getBeanInfo(Utilities.java:293)
	at
org.netbeans.modules.form.BeanSupport.createBeanInfo(BeanSupport.java:78)
	at
org.netbeans.modules.form.RADComponent.getBeanInfo(RADComponent.java:317)
	at
org.netbeans.modules.form.RADComponent.createBeanProperties(RADComponent.java:950)
	at
org.netbeans.modules.form.RADComponent.createPropertySets(RADComponent.java:895)
	at
org.netbeans.modules.form.RADVisualComponent.createPropertySets(RADVisualComponent.java:128)
	at
org.netbeans.modules.form.RADComponent.getProperties(RADComponent.java:528)
	at
org.netbeans.modules.form.RADComponentNode.getPropertySets(RADComponentNode.java:132)
	at
org.openide.explorer.propertysheet.PropertySheet.detachFromNode(PropertySheet.java:493)
	at
org.openide.explorer.propertysheet.PropertySheet.removeNotify(PropertySheet.java:538)
	at
org.openide.explorer.propertysheet.PropertySheetView.removeNotify(PropertySheetView.java:68)
	at
java.awt.Container.removeNotify(Container.java:2064)
	at
javax.swing.JComponent.removeNotify(JComponent.java:4299)
	at
java.awt.Container.removeNotify(Container.java:2064)
	at
javax.swing.JComponent.removeNotify(JComponent.java:4299)
	at
java.awt.Container.removeNotify(Container.java:2064)
	at
javax.swing.JComponent.removeNotify(JComponent.java:4299)
	at
java.awt.Container.removeNotify(Container.java:2064)
	at
javax.swing.JComponent.removeNotify(JComponent.java:4299)
	at
java.awt.Container.removeNotify(Container.java:2064)
	at
javax.swing.JComponent.removeNotify(JComponent.java:4299)
	at
java.awt.Container.removeNotify(Container.java:2064)
	at
javax.swing.JComponent.removeNotify(JComponent.java:4299)
	at
javax.swing.JRootPane.removeNotify(JRootPane.java:688)
	at
java.awt.Container.removeNotify(Container.java:2064)
	at
javax.swing.JComponent.removeNotify(JComponent.java:4299)
	at java.awt.Container.remove(Container.java:713)
	at
javax.swing.JLayeredPane.remove(JLayeredPane.java:217)
	at java.awt.Container.remove(Container.java:766)
	at
org.netbeans.core.windows.frames.DesktopPane.removeFrameType(DesktopPane.java:211)
	at
org.netbeans.core.windows.ModeImpl.setVisible(ModeImpl.java:1353)
	at
org.netbeans.core.windows.WorkspaceVisibilityManager.setModesVisibility(WorkspaceVisibilityManager.java:481)
	at
org.netbeans.core.windows.WorkspaceVisibilityManager.processModes(WorkspaceVisibilityManager.java:402)
	at
org.netbeans.core.windows.WorkspaceVisibilityManager.doSetVisible(WorkspaceVisibilityManager.java:187)
	at
org.netbeans.core.windows.WorkspaceVisibilityManager.setVisible(WorkspaceVisibilityManager.java:101)
	at
org.netbeans.core.windows.WorkspaceImpl.setVisible(WorkspaceImpl.java:864)
	at
org.netbeans.core.windows.WorkspaceImpl.setVisible(WorkspaceImpl.java:854)
	at
org.netbeans.core.windows.WindowManagerImpl$ProjectSwitchListener$AWT.run_close(WindowManagerImpl.java:1419)
	at
org.netbeans.core.windows.WindowManagerImpl$ProjectSwitchListener$AWT.run(WindowManagerImpl.java:1407)
	at
java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:171)
	at
java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
	at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
[catch] at
java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
Comment 1 greenbee 2003-04-19 01:40:58 UTC
Created attachment 10039 [details]
Log file for S1Studio 4.1
Comment 2 greenbee 2003-04-19 01:43:01 UTC
Created attachment 10040 [details]
Netbeans 3.5beta log file
Comment 3 Tomas Pavek 2003-04-22 17:33:49 UTC
There seems to be a problem with a BeanInfo of some component. It was
probably generated by the BeanInfo editor, then the original component
changed - and some descriptors in the BeanInfo became null...

The problem for NetBeans is only in handling this error - it should
not render the IDE unusable. This particular kind of error was not
anticipated, so is not handled well. We should make NetBeans (4.0)
more robust in this area. However, I don't consider this to be P1
defect - you would have not your job done either if the BeanInfo was
invalid... but please speak up if you don't agree.
Comment 4 Tomas Pavek 2003-04-22 17:37:17 UTC
See also issue 32753.
Comment 5 Stroboskop 2003-08-04 12:29:33 UTC
I get a lot of these Exception, usually causing half a day of
debugging on our project. So i'd certainly say this needs to be taken
care of.

I think there're two ways to do it:
1. (the comfortable way) closer binding between a class and its
BeanInfo. Meaning, by default the BeanInfo is automatically updated
when the source changes. This will hopefully prevent most inconsistencies.

But that will not prevent the same NullPointerExceptions if a
superclass changes! And that's why i'd prefer...
2. (the we're-all-programmers-anyway solution) have this
NullPointerException print some more usefull information, like the
name of the inspected class or the name of the method!

The current stack trace output is pretty much useless, if you're using
a lot of gui beans...
Comment 6 smilla0 2003-08-29 21:13:14 UTC
I've been making custom components, and anytime it tries to 
access the associated document, which is null during form 
editing, it causes this. I suggest that the form editor 
disable the display of the form (or the individual errant 
components) until the error is corrected. In version 3.5 
the exception window was modeless, and I could switch to 
the source code view, and edit the code. Unforunately, this 
did not solve the problem because that version did not 
update the class properly, as it still was throwing 
exceptions on lines that were commented out. In version 
3.5.1, the exception window is modal, and I cannot change 
the view. Even when I shut down and restart the IDE it goes 
right back into the infinite loop of exceptions as soon as 
it loads! I had to delete the class file manually before I 
could even continue using the IDE for anything.
Comment 7 Tomas Pavek 2004-06-14 12:25:55 UTC
BeanInfo creation was moved to component initialization (where the
bean instance is created). This part is handled well for possible
errors. If the BeanInfo cannot be created, the component is created
neither - so it cannot cause problems when PropertySheet tries to get
its properties. This should fix the problem.
Comment 8 Tomas Pavek 2004-06-14 18:08:37 UTC
*** Issue 42860 has been marked as a duplicate of this issue. ***
Comment 9 Marek Grummich 2005-07-11 13:17:34 UTC
Verified