Community
Participate
Working Groups
I've been seeing a lot of exceptions in I20070208-0010 as I launch Eclipse applications in the debugger and attempt to debug them. (I don't know how long this has been going on but I don't remember seeing it in M4.) All seem to point to an NPE underneath org.eclipse.jdt.internal.debug.ui.console.JavaStackTracePageParticipant. I'll try and attach a clean repro scenario if I find one but wanted to report this ASAP in the meanwhile. Here are the stack traces from two of them: org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.NullPointerException) at org.eclipse.swt.SWT.error(SWT.java:3478) at org.eclipse.swt.SWT.error(SWT.java:3401) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3467) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3107) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2264) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2228) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2103) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:457) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:452) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) 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:476) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416) at org.eclipse.equinox.launcher.Main.run(Main.java:1124) Caused by: java.lang.NullPointerException at org.eclipse.ui.internal.handlers.HandlerService.deactivateHandler(HandlerService.java:138) at org.eclipse.jdt.internal.debug.ui.console.JavaStackTracePageParticipant.deactivated(JavaStackTracePageParticipant.java:94) at org.eclipse.ui.internal.console.ConsoleView.deactivateParticipants(ConsoleView.java:609) at org.eclipse.ui.internal.console.ConsoleView.showPageRec(ConsoleView.java:153) at org.eclipse.ui.part.PageBookView.partClosed(PageBookView.java:768) at org.eclipse.ui.internal.console.ConsoleView.partClosed(ConsoleView.java:116) at org.eclipse.ui.internal.console.ConsoleView$2.run(ConsoleView.java:373) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) ... 22 more ================================================================ Here's another instance, caused by clicking on the evaluation window in the variables pane while stopped at a breakpoint in the debugger: java.lang.NullPointerException at org.eclipse.ui.internal.handlers.HandlerService.deactivateHandler(HandlerService.java:138) at org.eclipse.jdt.internal.debug.ui.console.JavaStackTracePageParticipant.deactivated(JavaStackTracePageParticipant.java:94) at org.eclipse.ui.internal.console.ConsoleView.deactivateParticipants(ConsoleView.java:609) at org.eclipse.ui.internal.console.ConsoleView.partDeactivated(ConsoleView.java:575) at org.eclipse.ui.internal.PartListenerList2$4.run(PartListenerList2.java:113) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:850) at org.eclipse.ui.internal.PartListenerList2.fireEvent(PartListenerList2.java:53) at org.eclipse.ui.internal.PartListenerList2.firePartDeactivated(PartListenerList2.java:111) at org.eclipse.ui.internal.PartService.firePartDeactivated(PartService.java:116) at org.eclipse.ui.internal.PartService.setActivePart(PartService.java:165) at org.eclipse.ui.internal.WorkbenchPagePartList.fireActivePartChanged(WorkbenchPagePartList.java:56) at org.eclipse.ui.internal.PartList.setActivePart(PartList.java:126) at org.eclipse.ui.internal.WorkbenchPage.setActivePart(WorkbenchPage.java:3258) at org.eclipse.ui.internal.WorkbenchPage.requestActivation(WorkbenchPage.java:2773) at org.eclipse.ui.internal.PartPane.requestActivation(PartPane.java:265) at org.eclipse.ui.internal.PartPane.handleEvent(PartPane.java:229) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:943) at org.eclipse.swt.widgets.Shell.setActiveControl(Shell.java:1272) at org.eclipse.swt.widgets.Shell.WM_MOUSEACTIVATE(Shell.java:2014) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3515) at org.eclipse.swt.widgets.Decorations.windowProc(Decorations.java:1554) at org.eclipse.swt.widgets.Shell.windowProc(Shell.java:1752) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4172) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2195) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3562) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4172) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2195) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3562) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4172) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2195) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3562) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4172) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2195) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3562) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4172) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2195) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3562) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4172) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2195) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3562) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4172) at org.eclipse.swt.internal.win32.OS.DefWindowProcW(Native Method) at org.eclipse.swt.internal.win32.OS.DefWindowProc(OS.java:2195) at org.eclipse.swt.widgets.Scrollable.callWindowProc(Scrollable.java:77) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3562) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4172) at org.eclipse.swt.internal.win32.OS.PeekMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.PeekMessage(OS.java:2704) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3099) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2264) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2228) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2103) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:457) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:452) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) 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:476) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:416) at org.eclipse.equinox.launcher.Main.run(Main.java:1124)
It looks like this could happen if a console participant was deactivated before being activated. This could happen if activation fails for some reason. It would be nice to have a reproduceable test case. I changed all calls to participants to be made in safe runnables. As well, any participant that causes an exception is now removed.
Please verify, Mike.
(Changes to ConsoleView and ConsolePlugin).
verified
Created attachment 62733 [details] stack trace Observed again today with N20070402-0010. I wasn't doing anything special, just switching from target to host workspace in a PDE debug session.
*** Bug 185184 has been marked as a duplicate of this bug. ***
re-opening - has happenned since 3.3M6
I'm sorry, Darin, I believe that I was mistaken. I saw this on 3.3M5, not 3.3M6. My appologies.
I have this happening in my workspace. It isn't clear what I did to get into this state, but I can now reproduce the NPE by opening a new Java Stack Trace console (already has an NPE stack trace I was looking at), then hitting the close console view action. Two of the NPEs show up. eclipse.buildId=I20070525-1350 java.version=1.6.0 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product org.eclipse.sdk.ide -pdelaunch Command-line arguments: -product org.eclipse.sdk.ide -data C:\Workspace Target -dev file:C:/Workspace/.metadata/.plugins/org.eclipse.pde.core/Eclipse Application/dev.properties -pdelaunch -os win32 -ws win32 -arch x86 Error Wed May 30 10:59:08 CDT 2007 Error logged from Console plug-in: java.lang.NullPointerException at org.eclipse.ui.internal.handlers.HandlerService.deactivateHandler(HandlerService.java:143) at org.eclipse.jdt.internal.debug.ui.console.JavaStackTracePageParticipant.deactivated(JavaStackTracePageParticipant.java:94) at org.eclipse.jdt.internal.debug.ui.console.JavaStackTracePageParticipant.dispose(JavaStackTracePageParticipant.java:56) at org.eclipse.ui.internal.console.ConsoleView$2.run(ConsoleView.java:254) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.internal.console.ConsoleView.doDestroyPage(ConsoleView.java:252) at org.eclipse.ui.part.PageBookView.removePage(PageBookView.java:852) at org.eclipse.ui.part.PageBookView.partClosed(PageBookView.java:774) at org.eclipse.ui.internal.console.ConsoleView.partClosed(ConsoleView.java:119) at org.eclipse.ui.internal.console.ConsoleView$5.run(ConsoleView.java:406) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3659) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3296) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:153) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:504) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:443) at org.eclipse.equinox.launcher.Main.run(Main.java:1169) at org.eclipse.equinox.launcher.Main.main(Main.java:1144)
Seeing this on: eclipse.buildId=I20070531-1935 java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20070201 (JIT enabled)
*** Bug 193125 has been marked as a duplicate of this bug. ***
heres one I got using N20071109-0010 (Linux GTK). Was happening after I pressed F11... java.lang.NullPointerException at org.eclipse.debug.internal.ui.views.console.ProcessConsolePageParticipant.deactivated(ProcessConsolePageParticipant.java:255) at org.eclipse.debug.internal.ui.views.console.ProcessConsolePageParticipant.dispose(ProcessConsolePageParticipant.java:122) at org.eclipse.ui.internal.console.ConsoleView$2.run(ConsoleView.java:254) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.ui.internal.console.ConsoleView.doDestroyPage(ConsoleView.java:252) at org.eclipse.ui.part.PageBookView.removePage(PageBookView.java:852) at org.eclipse.ui.part.PageBookView.partClosed(PageBookView.java:774) at org.eclipse.ui.internal.console.ConsoleView.partClosed(ConsoleView.java:119) at org.eclipse.ui.internal.console.ConsoleView$5.run(ConsoleView.java:406) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:130) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3312) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2985) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2395) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2359) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2225) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:468) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:463) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:362) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:515) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:455) at org.eclipse.equinox.launcher.Main.run(Main.java:1193)
Marking as dup of older bug. *** This bug has been marked as a duplicate of bug 146825 ***
*** Bug 220976 has been marked as a duplicate of this bug. ***