Bug 548602 - NPE in AbstractDecoratedTextEditor.gotoMarker
Summary: NPE in AbstractDecoratedTextEditor.gotoMarker
Status: REOPENED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.13   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-25 03:01 EDT by Ed Willink CLA
Modified: 2021-06-16 02:20 EDT (History)
1 user (show)

See Also:


Attachments
.log file (833.31 KB, application/octet-stream)
2019-06-25 03:38 EDT, Ed Willink CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Willink CLA 2019-06-25 03:01:45 EDT
It is unfortunately not uncommon for ProblemMarkers to go stale as a result of bugs in the incremental rebuilders. When this happens the stack trace below can result. Surely bad markers should be silently ignored, rather than logging and opening an editor on an error page?

Since the error in question comes from a correctly characterised JDT Error with accurate path, file, line, why can't the file be opened at the line anyway?

"The method addRegionError(RuleRegion, String) is undefined for the type ScheduleManager"

was stale since the error had been cured by edits.

java.lang.NullPointerException
	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.gotoMarker(AbstractDecoratedTextEditor.java:1039)
	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor$GotoMarkerAdapter.gotoMarker(AbstractDecoratedTextEditor.java:239)
	at org.eclipse.ui.ide.IDE.gotoMarker(IDE.java:322)
	at org.eclipse.ui.ide.IDE.openEditor(IDE.java:1338)
	at org.eclipse.ui.internal.views.markers.ExtendedMarkersView.openMarkerInEditor(ExtendedMarkersView.java:1657)
	at org.eclipse.ui.internal.views.markers.ExtendedMarkersView.openSelectedMarkers(ExtendedMarkersView.java:1153)
	at org.eclipse.ui.internal.views.markers.ExtendedMarkersView$4.open(ExtendedMarkersView.java:568)
	at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
	at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:796)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.ui.internal.JFaceUtil.lambda$0(JFaceUtil.java:47)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:176)
	at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:793)
	at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1108)
	at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
	at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:270)
	at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:310)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
	at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1056)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1441)
Comment 1 Andrey Loskutov CLA 2019-06-25 03:18:14 EDT
Ed, could you attach the full log. The NPE in question is not because the marker was missing, but because the document was null, which is why I wonder how this could happen.
Comment 2 Ed Willink CLA 2019-06-25 03:38:40 EDT
Created attachment 279062 [details]
.log file

The file referenced by the marker was actually open for edit, so the gotomarker opened an additional correctly titled error page editor.

Prior to the problem I was reorganising a number of methods into a helper class resulting in numerous errors as old referenced methods vanished. I was using the Problems View and some Find References searches to guide my still-to-do activkities.
Comment 3 Eclipse Genie CLA 2021-06-15 15:56:47 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 4 Ed Willink CLA 2021-06-16 02:20:19 EDT
Cannot be closed without a relevant committer comment subsequent to provision of requested information.