Borisvl/Pdf4Eclipse — Issue #14: Exception when PDF is deleted while being viewed
Author: psybers
Created: 2012-02-14 16:49:13+00:00
State: open

If you are viewing a PDF and it is deleted, and then click on the PDF view you get a runtime exception. Log attached.

!ENTRY org.eclipse.ui.workbench 4 2 2012-02-14 10:45:59.092
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 0
java.lang.NullPointerException
at de.vonloesch.pdf4eclipse.editors.PDFEditor.getAdapter(PDFEditor.java:556)
at org.eclipse.ui.internal.views.ViewsPlugin.getAdapter(ViewsPlugin.java:103)
at org.eclipse.ui.views.contentoutline.ContentOutline.doCreatePage(ContentOutline.java:131)
at org.eclipse.ui.part.PageBookView.createPage(PageBookView.java:408)
at org.eclipse.ui.part.PageBookView.partActivated(PageBookView.java:751)
at org.eclipse.ui.part.PageBookView$4.partActivated(PageBookView.java:1014)
at org.eclipse.ui.internal.PartListenerList2$1.run(PartListenerList2.java:70)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.runtime.Platform.run(Platform.java:897)
at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:55)
at org.eclipse.ui.internal.PartListenerList2.firePartActivated(PartListenerList2.java:68)
at org.eclipse.ui.internal.PartService.firePartActivated(PartService.java:192)
at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:306)
at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:57)
at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:136)
at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3636)
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.handleEvent(PartPane.java:237)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1258)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1282)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1263)
at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1580)
at org.eclipse.swt.widgets.Control.gtk_button_press_event(Control.java:2823)
at org.eclipse.swt.widgets.Control.gtk_button_press_event(Control.java:2759)
at org.eclipse.swt.widgets.Composite.gtk_button_press_event(Composite.java:681)
at org.eclipse.swt.widgets.Canvas.gtk_button_press_event(Canvas.java:152)
at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1731)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:5016)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4408)
at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method)
at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8394)
at org.eclipse.swt.widgets.Display.eventProc(Display.java:1245)
at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method)
at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2258)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3207)
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(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
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)