Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358306 - NPE when switching between source files
Summary: NPE when switching between source files
Status: CLOSED DUPLICATE of bug 357918
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.2   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-20 16:55 EDT by Daniel CLA
Modified: 2011-09-21 02:13 EDT (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 Daniel CLA 2011-09-20 16:55:57 EDT
Build Identifier: 20110615-0604

This is in the log file:

!ENTRY org.eclipse.ui.workbench 4 2 2011-09-20 16:52:52.275
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
java.lang.NullPointerException
	at org.eclipse.ui.texteditor.SelectMarkerRulerAction.includesRulerLine(SelectMarkerRulerAction.java:293)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaSelectAnnotationRulerAction.findJavaAnnotation(JavaSelectAnnotationRulerAction.java:157)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaSelectAnnotationRulerAction.update(JavaSelectAnnotationRulerAction.java:108)
	at org.eclipse.ui.texteditor.AbstractRulerActionDelegate.update(AbstractRulerActionDelegate.java:132)
	at org.eclipse.ui.texteditor.AbstractRulerActionDelegate.setActiveEditor(AbstractRulerActionDelegate.java:89)
	at org.eclipse.ui.internal.EditorPluginAction.editorChanged(EditorPluginAction.java:75)
	at org.eclipse.ui.internal.EditorActionBuilder$EditorContribution.editorChanged(EditorActionBuilder.java:83)
	at org.eclipse.ui.internal.EditorActionBuilder$ExternalContributor.setActiveEditor(EditorActionBuilder.java:129)
	at org.eclipse.ui.internal.EditorActionBars.partChanged(EditorActionBars.java:346)
	at org.eclipse.ui.internal.WorkbenchPage$3.run(WorkbenchPage.java:709)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.core.runtime.Platform.run(Platform.java:888)
	at org.eclipse.ui.internal.WorkbenchPage.activatePart(WorkbenchPage.java:698)
	at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3632)
	at org.eclipse.ui.internal.WorkbenchPage.requestActivation(WorkbenchPage.java:3159)
	at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:279)
	at org.eclipse.ui.internal.EditorPane.requestActivation(EditorPane.java:98)
	at org.eclipse.ui.internal.PartPane.setFocus(PartPane.java:325)
	at org.eclipse.ui.internal.EditorPane.setFocus(EditorPane.java:127)
	at org.eclipse.ui.internal.PartStack.presentationSelectionChanged(PartStack.java:837)
	at org.eclipse.ui.internal.PartStack.access$1(PartStack.java:823)
	at org.eclipse.ui.internal.PartStack$1.selectPart(PartStack.java:137)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation$1.handleEvent(TabbedStackPresentation.java:133)
	at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:269)
	at org.eclipse.ui.internal.presentations.util.AbstractTabFolder.fireEvent(AbstractTabFolder.java:278)
	at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder.access$1(DefaultTabFolder.java:1)
	at org.eclipse.ui.internal.presentations.defaultpresentation.DefaultTabFolder$2.handleEvent(DefaultTabFolder.java:88)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
	at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:774)
	at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:2745)
	at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1432)
	at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:257)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4165)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)


Reproducible: Sometimes

Steps to Reproduce:
1. Open a bunch of Java files from within a project.
2. Switch back and forth between open tabs.

Every so often, you will get an "Error" when switching tabs.  This is serious because it causes you to lose all unsaved changes in the file.
Comment 1 Remy Suen CLA 2011-09-20 18:32:14 EDT
See bug 357918.
Comment 2 Dani Megert CLA 2011-09-21 02:13:53 EDT

*** This bug has been marked as a duplicate of bug 357918 ***