Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 191503 - [ActivityMgmt] NPE from "Identifier Update Job"
Summary: [ActivityMgmt] NPE from "Identifier Update Job"
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M5   Edit
Assignee: Kim Horne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-07 11:26 EDT by Kevin McGuire CLA
Modified: 2008-02-15 19:03 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin McGuire CLA 2007-06-07 11:26:27 EDT
No idea what this is or where it came from.  Was looking at some doc plugins and had one html editor open in the workbench.

!SESSION 2007-06-07 11:14:48.921 -----------------------------------------------
eclipse.buildId=I20070606-0010
java.version=1.5.0_06
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.core.jobs 4 2 2007-06-07 11:23:54.937
!MESSAGE An internal error occurred during: "Identifier Update Job".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.ui.internal.activities.Identifier.fireIdentifierChanged(Identifier.java:111)
	at org.eclipse.ui.internal.activities.MutableActivityManager.notifyIdentifiers(MutableActivityManager.java:240)
	at org.eclipse.ui.internal.activities.MutableActivityManager.access$3(MutableActivityManager.java:229)
	at org.eclipse.ui.internal.activities.MutableActivityManager$2.run(MutableActivityManager.java:781)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Kim Horne CLA 2007-06-07 12:04:19 EDT
Looking closer at this code (ie: with my eyes open) I see that we do indeed do
a null check for listeners.  I dont see any way this can be happening unless
modifying an ArrayList concurently (ie: removing a node) can result in a state
where we somehow have a null element.  I will approach this from a
pooched-up-threading perspective.
Comment 2 Martin Oberhuber CLA 2007-07-17 12:12:49 EDT
I just got the same exception while starting up Eclipse on my existing workspace -- perhaps my information can help:

Eclipse SDK 3.3.0 (I20070625-1500) on WinXP SP1, Sun 1.6.0_01 JVM
EMF 2.3.0, CDT 4.0.0, DSDP-TM 2.0.0.1, Subclipse 1.1.9 installed

Perspective on startup is PDE Perspective
Active Views: Package Explorer, PDE Manifest Editor for a Fragment, Search
Selection in the Package Explorer is the MANIFEST.MF file of my fragment.
Comment 3 Kim Horne CLA 2008-01-07 11:20:48 EST
This was probably caused by the fix for bug 93364.  
Comment 4 Kim Horne CLA 2008-01-07 13:26:39 EST
I believe the fix is now in HEAD.  The optimization mentioned previously causes certain identifier enablement to happen in a background job and Identifiers (much like most of our workbench apis) assume that they're being run on the UI thread.  I've factored out the actual event firing to be once again on the right thread.  
Comment 5 Kim Horne CLA 2008-02-05 10:35:29 EST
I've verified that the code is in I20080205-0010 but I can't think of a consistent way to reproduce this bug to verify the behaviour.  The code is pretty foolproof, however, so I am inclined to mark this as verified. 
Comment 6 Simon Archer CLA 2008-02-15 19:03:23 EST
I just got this too, using Eclipse 3.3.  It happened while changing to the Team Synchronizing perspective, but I am unsure if it is related.  What I would call a "spurious NPE".  Very strange indeed.  Glad to see it's fixed in 3.4, thanks.