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 71706 - NullPointerException @ FindActionMapKey
Summary: NullPointerException @ FindActionMapKey
Status: RESOLVED WONTFIX
Alias: None
Product: obsolete
Classification: Unclassified
Component: vcscore (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker with 1 vote (vote)
Assignee: issues@obsolete
URL:
Keywords:
: 82372 101545 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-01-21 18:30 UTC by dhinojosa
Modified: 2009-12-21 07:44 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
var/log from my .netbeans dir (30.84 KB, text/plain)
2006-01-21 18:31 UTC, dhinojosa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dhinojosa 2006-01-21 18:30:42 UTC
I really don't have a way to recreate the problem, all I did was open up
NetBeans 5.0 RC2 with a project that was an existing project with an ant script.
Right at NetBeans startup I got the following trace:

java.lang.NullPointerException
	at
org.netbeans.modules.search.FindActionManager.getFindActionMapKey(FindActionManager.java:192)
	at
org.netbeans.modules.search.FindActionManager.someoneActivated(FindActionManager.java:164)
	at
org.netbeans.modules.search.FindActionManager.propertyChange(FindActionManager.java:180)
	at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
	at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
	at
org.netbeans.core.windows.RegistryImpl.doFirePropertyChange(RegistryImpl.java:249)
	at org.netbeans.core.windows.RegistryImpl.access$100(RegistryImpl.java:36)
[catch] at org.netbeans.core.windows.RegistryImpl$1.run(RegistryImpl.java:134)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
	at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

I will attach a log from my .netbeans/var/log dir momentarily.
Comment 1 dhinojosa 2006-01-21 18:31:38 UTC
Created attachment 28515 [details]
var/log from my .netbeans dir
Comment 2 Marian Petras 2006-01-23 11:47:15 UTC
The critical part of code follows:
    ...
    188        SharedClassObject findAction =
    189                SharedClassObject.findObject(FindAction.class);
    190        assert findAction != null;
    191                                                                        
                                                      
    192        findActionMapKey = ((FindAction) findAction).getActionMapKey();
    ...
The NullPointerException occured at line 192 which means that there was no Find
action installed in the system at the moment of the cast to the FindAction
class. From the log, it is apparent that the exception was called early during
NetBeans startup.

The log also shows that this exception occured just after another exception:

    java.lang.IllegalStateException:
                    Creating default editor mode. It shouldn't happen this way
        at o.n.core.windows.WindowManagerImpl.getDefaultEditorMode(...)
        at o.n.core.windows.WindowManagerImpl.topComponentOpen(...)
	at org.openide.windows.TopComponent.open(TopComponent.java:312)
	at org.openide.windows.TopComponent.open(TopComponent.java:304)
	at o.n.m.vcscore.commands.CommandOutputTopComponent.open(....java:221)
	at o.n.m.vcscore.cmdline.UserCommandTask$9.run(....java:635)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        ...

I think that this exception from vcscore is the primary cause of the reported
exception. The 'vcscore' module creates a mode before all modules get loaded.
The created mode gets activated which triggers the FindActionManager. But
because it is too early during startup, the FindAction does not exist yet and
hence the NullPointerException.

Anyway, I think it is not a P2 bug - it does not cause loss of data and it is
hardly reproducible. Priority lowered to P3.

Reassigned to 'vcscore' for further evaluation.
Comment 3 Martin Entlicher 2006-02-10 16:36:12 UTC
The creation of the VCS Output Window needs to be postponed after the Win sys is
started up...
Comment 4 emlope 2006-06-02 17:32:09 UTC
I got the same exception (except it's an assertion error instead of a null 
pointer), but in a different way. I have a module suite that includes all of 
platform6, nb5.0 branding and ide6 Classfile Reader, User Utilities and 
Experimental Search API. If I try to hide the FindAction in the Edit Toolbars 
section and the following exception is thrown. Hiding the FindAction in the 
Edit menu works fine. Hiding the whole Edit Toolbar also causes the exception.

*********** Exception occurred ************ at 10:28 AM on Jun 2, 2006
java.lang.AssertionError
        at org.netbeans.modules.search.FindActionManager.getFindActionMapKey
(FindActionManager.java:190)
        at org.netbeans.modules.search.FindActionManager.someoneActivated
(FindActionManager.java:164)
        at org.netbeans.modules.search.FindActionManager.propertyChange
(FindActionManager.java:180)
        at java.beans.PropertyChangeSupport.firePropertyChange
(PropertyChangeSupport.java:333)
        at java.beans.PropertyChangeSupport.firePropertyChange
(PropertyChangeSupport.java:270)
        at org.netbeans.core.windows.RegistryImpl.doFirePropertyChange
(RegistryImpl.java:249)
        at org.netbeans.core.windows.RegistryImpl.access$100
(RegistryImpl.java:36)
        at org.netbeans.core.windows.RegistryImpl$1.run(RegistryImpl.java:134)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
[catch] at java.awt.EventDispatchThread.pumpOneEventForHierarchy
(EventDispatchThread.java:242)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy
(EventDispatchThread.java:163)
        at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:157)
        at java.awt.EventDispatchThread.pumpEvents
(EventDispatchThread.java:149)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 5 emlope 2006-06-02 17:33:31 UTC
I just submitted additional comments, but maybe this should be a new issue? I 
don't think it has anything to do with vcscore.
Comment 6 Max Sauer 2006-08-22 16:08:25 UTC
*** Issue 82372 has been marked as a duplicate of this issue. ***
Comment 7 Peter Pis 2007-04-22 17:37:56 UTC
*** Issue 101545 has been marked as a duplicate of this issue. ***
Comment 8 Quality Engineering 2009-12-21 07:44:27 UTC
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. 

We apologize for any inconvenience.


Thank you.
The NetBeans Team