Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 312849 - NPE from CDT ActiveFoldingListener
Summary: NPE from CDT ActiveFoldingListener
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.4   Edit
Assignee: Shawn Minto CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-05-13 19:35 EDT by Shawn Minto CLA
Modified: 2010-05-13 19:39 EDT (History)
1 user (show)

See Also:


Attachments
mylyn/context/zip (8.82 KB, application/octet-stream)
2010-05-13 19:39 EDT, Shawn Minto CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shawn Minto CLA 2010-05-13 19:35:37 EDT
java.lang.NullPointerException
	at org.eclipse.mylyn.internal.cdt.ui.editor.ActiveFoldingListener.collapseAllElements(ActiveFoldingListener.java:157)
	at org.eclipse.mylyn.internal.cdt.ui.editor.ActiveFoldingListener.updateFolding(ActiveFoldingListener.java:137)
	at org.eclipse.mylyn.internal.cdt.ui.editor.ActiveFoldingListener$2.runInUIThread(ActiveFoldingListener.java:99)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3855)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3476)
	at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
	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:368)
	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:559)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Comment 1 Shawn Minto CLA 2010-05-13 19:39:10 EDT
Fixed by adding an isDisposed flag to prevent the folding from running if the editor has been closed and checking for the case the viewer is null.
Comment 2 Shawn Minto CLA 2010-05-13 19:39:15 EDT
Created attachment 168491 [details]
mylyn/context/zip