Community
Participate
Working Groups
I noticed the following in my system console. It appears that sometimes Xtend does not handle well either a) the creation of a marker or b) its update. I'm sorry but I can't think of a good way to reproduce this. 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] java.lang.NullPointerException 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.xtend.shared.ui.Activator.getId(Activator.java:174) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.xtend.shared.ui.core.builder.XtendXpandMarkerManager.getMARKER_TYPE(XtendXpandMarkerManager.java:38) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.xtend.shared.ui.core.builder.XtendXpandMarkerManager$2.execute(XtendXpandMarkerManager.java:134) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1975) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.xtend.shared.ui.core.builder.XtendXpandMarkerManager.deleteMarkers(XtendXpandMarkerManager.java:137) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.xtend.shared.ui.core.AbstractResource.analyze(AbstractResource.java:92) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.xtend.shared.ui.core.internal.XtendXpandProject.analyze(XtendXpandProject.java:338) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.xtend.shared.ui.core.builder.XtendXpandBuilder.build(XtendXpandBuilder.java:201) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:629) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:172) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:203) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:255) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:258) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:311) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:343) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:144) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:242) 1/14/11 1:04:12 PM [0x0-0x2c92c9].org.eclipse.eclipse[8314] at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Under normal circumstances the observed NPE can never occur. Very strange that this happened. The plugin is configured to be activated when one class is loaded. This starts the Activator of this class. When the Activator was started, the call of getId() cannot cause a NullPointerException. public static String getId() { return getDefault().getBundle().getSymbolicName(); } getDefault() returns the Activator instance, so cannot be null when the plugin was started. getBundle() can also be not result in null then. Anyway, thanks for reporting. Open it again if you could reproduce it again.
I think that this can happen in the case where there is a failure in initialization of the bundle plugin... but I haven't been inolved in the same use cases since I reported this, so I have no idea if it's still as issue or not. :)
Requested via bug 522520. -M.