Community
Participate
Working Groups
Found in .log. Sorry no steps. !SESSION 2006-03-15 09:56:14.864 ----------------------------------------------- eclipse.buildId=I20060314-1200 java.version=1.5.0_06 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_CH Framework arguments: -update -keyring c:\eclipse\.keyring -application org.eclipse.ui.ide.workbench -showlocation Command-line arguments: -update -keyring c:\eclipse\.keyring -application org.eclipse.ui.ide.workbench -showlocation -data c:\eclipse\workspaces\Development_3_2\plugins !ENTRY org.eclipse.ui 4 4 2006-03-15 10:28:54.592 !MESSAGE Unhandled event loop exception !ENTRY org.eclipse.ui 4 0 2006-03-15 10:28:54.592 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException at org.eclipse.debug.internal.ui.actions.CopyToClipboardActionDelegate.initialize(CopyToClipboardActionDelegate.java:43) at org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate.selectionChanged(AbstractDebugActionDelegate.java:290) at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:249) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:460) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:424) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:160) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:466) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:799) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:846) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:564) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:506) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:122) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:982) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:924) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:949) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:934) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:962) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:958) at org.eclipse.swt.widgets.Widget.wmKeyDown(Widget.java:1557) at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:3564) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3272) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4017) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1878) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2958) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1909) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1873) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:418) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:107) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:374) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) 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:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
The NPE happens when using copy (Ctrl+C) in a standard text editor and hence copy/paste no longer works in a text editor. NOTE: It does not always happen but when it happens it is pretty severe since it breaky the copy command.
I can't make this happen. It looks like the delegate was called with selectionChanged before it was initialized for its view (i.e. IViewActionDelegate.init(IViewPart)). Dani, do you have steps to reproduce? It might be a workbench issue.
Once I was in that state, simply hitting Ctrl+C did the trick. Can't reproduce right now. Indee strange is that your code got triggered while in the Text Editor. This might well be command or handler bug in Platform UI. However, you might want to protect your code against the NPE.
Moving to Workbench for comment. I don't want to add null checks in the code when there is no reason (makes maintenance difficult - no one knows why the null check is there).
Note we also see this in the test suites sometimes too
I've committed a small patch which should handle this case, if I understand it correctly. Please re-open this bug if you see it in I20060321-0800 or later. (The patch was applied to ActionDelegateHandlerProxy)
This happened again on the N20060316 nightly build http://fullmoon.ottawa.ibm.com/eclipse/downloads/drops/I20060315-1200/testresults/html/org.eclipse.ui.tests_linux.gtk.x86.html
Sorry that is the 0315 1200 integration build
John, this might be what happened yesterday when CTRL-C stopped working. Could you check your log to see if it was the same NPE?
So it didn't happen in the nightly build? Closing again....
Boris: yes, this is the same error I got, using I20060314-1200.
*** Bug 132487 has been marked as a duplicate of this bug. ***
Got it again today using : eclipse.buildId=I20060321-1210 java.version=1.5.0_06 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=fr_CA Framework arguments: -showlocation Command-line arguments: -os win32 -ws win32 -arch x86 -debug -consolelog -showlocation java.lang.NullPointerException at org.eclipse.debug.internal.ui.actions.CopyToClipboardActionDelegate.initialize(CopyToClipboardActionDelegate.java:43) at org.eclipse.debug.internal.ui.actions.AbstractDebugActionDelegate.selectionChanged(AbstractDebugActionDelegate.java:290) at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.execute(ActionDelegateHandlerProxy.java:249) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:460) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:424) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:160) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:466) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:799) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:846) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:564) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:506) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:122) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:982) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:924) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:949) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:934) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:962) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:958) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1272) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3346) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3246) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4023) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1879) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2964) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1909) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1873) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:418) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:107) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) 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:585) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
*** Bug 132826 has been marked as a duplicate of this bug. ***
Sorry but this is critical. Just started I20060322-1335 and Copy in the Java editor simply resulted in the NPE - each time, in each editor. Even after restarting I got the same NPEs.
*** Bug 132856 has been marked as a duplicate of this bug. ***
*** Bug 133316 has been marked as a duplicate of this bug. ***
*** Bug 133317 has been marked as a duplicate of this bug. ***
*** Bug 133493 has been marked as a duplicate of this bug. ***
*** Bug 133512 has been marked as a duplicate of this bug. ***
Set to blocker. This is a must fix for M6. When this happens, the UI is completely unusable.
I agree with Olivier.
Has anyone seen this on any platform other than Windows XP?
I haven't encountered it in my linux workspaces. PW
In general I have many problems with the key bindings. I lose the Ctrl key inside the java editor. Ctrl + S, Ctrl + C, Ctrl + V etc don't work anymore. Delete also stopped working. I had to close Eclipse and restart to get them back. Nothing in the log. I am using Windows XP and I didn't get it on other platform like Linux GTK.
There was a separate bug which affected several key bindings. This bug only deals with people seeing the exception in comment #0. If your bug has been marked as a dupe and you are not seeing that exception, please re-open your original bug. Hands up: How many are seeing the exception in comment #0? How many are seeing it on a platform on something other than Windows XP?
I see it quite often. WindowsXP.
I get it often too, including build I20060328-0010. (WinXP)
I have had the NPE in comment #0 on Windows 2000 only. I have not seen it myself since I20060314-1200.
I've had the exception in I20060314-1200, but not in build I20060322 or later. I'm working under WinXP only.
Okay, let's try to figure out what is special about Dani and Martin. Is there something peculiar about your configuration? Do you guys tend to use multiple workbench windows?
No, I'm using a single window. I don't think I have anything special in my install.
Yes. I normally use 3 in parallel. They are already present when starting my workbench. In todays test pass I also had it in a single workbench window setup using I20060328-0010.
i can reproduce it easily as far as i can see now. Just start eclipse. Kill it (i have eclipse started as java instead of javaw so i get console window where i do CTRL-C) So eclipse is not cleanly shutdown. Then i restart again (eclipse is going to build the complete workspace and so on) Then press ctrl-c in a java editor. Doesn't work. I have to restart eclipse once to get it "clean" again.
Created attachment 37129 [details] Patch to LegacyActionPersistence Can people please try this modified LegacyActionPersistence, and let me know if it works? The file should appear in the workbench plug-in: <org.eclipse.ui.workbench>/org/eclipse/ui/internal/menus/LegacyActionPersistence.class
Doug, could you attach the workbench.jar? That would make it much easier for us to test it than loading and patching the stuff ourselves.
(In reply to comment #36) > Doug, could you attach the workbench.jar? That would make it much easier for > us to test it than loading and patching the stuff ourselves. No, I cannot. The JAR file is 3MB. 1.) Download the JAR file to /tmp 2.) Copy your workbench JAR file to /tmp 3.) mkdir -p org/eclipse/ui/internal/menus 4.) zip -f org.eclipse.ui.workbench_something.jar org/eclipse/ui/internal/menus/LegacyActionPersistence 5.) Copy your workbench JAR file back to your Eclipse install
Doug, so far I don't see the NPE anymore but it is hard to confirm 100% since I didn't have a test case to trigger it before.
I have been using I20060329-0010 for several hours now, and I've not seen the NPE.
The patched LegacyActionPersistence appeared in I20060329-0010. Marking as FIXED. Please re-open this bug if anyone sees this bug in that build or later.