Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 318060

Summary: Restore from local history dialog does not allow selecting files to restore, throws exception in Error Log
Product: [Eclipse Project] Platform Reporter: Eric Rizzo <eclipse-bugs>
Component: CompareAssignee: Platform-Compare-Inbox <platform-compare-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: major    
Priority: P3 CC: eclipse-bugs, eclipse.felipe, Silenio_Quarti, skovatch, Szymon.Brandys, tomasz.zarna
Version: 3.6   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard: stalebug

Description Eric Rizzo CLA 2010-06-25 19:05:59 EDT
When I try to use Restore from Local History, the list of available files is shown but it won't let me select the checkbox next to any of them. Whenever I try, it throws an exception in the error log (see below).
This only seems to happen when I'm trying to restore Java files; others seem to work fine.

eclipse.buildId=I20100608-0911
java.version=1.6.0_20
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product -keyring /Users/Eric/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.jee.product -keyring /Users/Eric/.eclipse_keyring -showlocation


Error
Fri Jun 25 19:00:31 EDT 2010
Unhandled event loop exception

java.lang.NullPointerException
at org.eclipse.compare.internal.AddFromHistoryDialog.feedContent(AddFromHistoryDialog.java:399)
at org.eclipse.compare.internal.AddFromHistoryDialog.access$5(AddFromHistoryDialog.java:397)
at org.eclipse.compare.internal.AddFromHistoryDialog$3.widgetSelected(AddFromHistoryDialog.java:282)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1187)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3622)
at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:4479)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:4739)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
at org.eclipse.swt.widgets.Widget.mouseDownSuper(Widget.java:1025)
at org.eclipse.swt.widgets.Table.mouseDownSuper(Table.java:1930)
at org.eclipse.swt.widgets.Widget.mouseDown(Widget.java:1021)
at org.eclipse.swt.widgets.Control.mouseDown(Control.java:2240)
at org.eclipse.swt.widgets.Table.mouseDown(Table.java:1912)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4976)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Widget.callSuper(Widget.java:220)
at org.eclipse.swt.widgets.Widget.windowSendEvent(Widget.java:1943)
at org.eclipse.swt.widgets.Shell.windowSendEvent(Shell.java:2008)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:5040)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.applicationSendEvent(Display.java:4582)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:4659)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.sendEvent(NSApplication.java:115)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3274)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
at org.eclipse.jface.window.Window.open(Window.java:801)
at org.eclipse.compare.internal.AddFromHistoryDialog.select(AddFromHistoryDialog.java:189)
at org.eclipse.compare.internal.AddFromHistoryAction.run(AddFromHistoryAction.java:80)
at org.eclipse.compare.internal.BaseCompareAction.run(BaseCompareAction.java:26)
at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584)
at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501)
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3776)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1367)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1390)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1187)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3622)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3277)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2629)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2593)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2427)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:670)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:663)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
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:369)
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: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:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)




-- Configuration Details --
Product: Eclipse 1.3.0.20100617-0521 (org.eclipse.epp.package.jee.product)
Installed Features:
 org.eclipse.platform 3.6.0.v20100602-9gF78GpqFt6trOGhL60z0oEx3fz-JKNwxPY
Comment 1 Tomasz Zarna CLA 2010-07-01 06:00:11 EDT
Eric I'm afraid you're right. This is a Mac specific issue, which is easily reproducible on Eclipse 3.6 (I20100608-0911). What's interesting about this is that in 3.6M7 the situation was even worse: following your steps I was able to hang Eclipse which after a while exited.

The reason it does *not* happen on Windows: org.eclipse.compare.internal.AddFromHistoryDialog.fEditionTree's selection listener is not called when selecting a file to restore. This is expected since fEditionTree (top right) displays versions of a file selected in fMemberTable (top left).

I guess there was a fix in SWT sometime between 3.6M7 and 3.6 which changed the behavior described above: it did fix the hanging issue, but introduced the exception we're seeing now. Felipe, could you please comment on that?
Comment 2 Eric Rizzo CLA 2010-07-01 09:54:08 EDT
Since it's confirmed reproducible, I wonder if the severity should be bumped to CRITICAL or BLOCKER. This is a major loss of functionality for Mac users.
Comment 3 Tomasz Zarna CLA 2010-07-02 04:23:41 EDT
(In reply to comment #2)
> Since it's confirmed reproducible, I wonder if the severity should be bumped to
> CRITICAL or BLOCKER. This is a major loss of functionality for Mac users.

"major" is perfect, take a look at https://bugs.eclipse.org/bugs/page.cgi?id=fields.html#bug_severity.
Comment 4 Felipe Heidrich CLA 2010-07-05 09:43:21 EDT
(In reply to comment #1)
> I guess there was a fix in SWT sometime between 3.6M7 and 3.6 which changed the
> behavior described above: it did fix the hanging issue, but introduced the
> exception we're seeing now. Felipe, could you please comment on that?

Do you have the bug number for this change ?
Comment 5 Tomasz Zarna CLA 2010-07-06 04:58:08 EDT
No, it's a guess based on what I observed in comment 1.
Comment 6 Scott Kovatch CLA 2010-07-06 12:59:21 EDT
The change was for bug 308844. Exceptions thrown while handling a click or double-click on a Tree or Table would hang the app, but now we're able to let any Java exception propagate back to the loop.

However, that's not the real fix. Opening a window in response to a MouseDoubleClick event (or in this case, I guess, Selection) on a Tree confuses Cocoa's mouse tracking. I'm looking at double-click handling again for 3.6.1, but I'll look into the Selection events too since it will be related.
Comment 7 Tomasz Zarna CLA 2010-07-07 04:03:22 EDT
(In reply to comment #6)
> I'm looking at double-click handling again for 3.6.1,
> but I'll look into the Selection events too since it will be related.

That's good news, is there a bug for it? I could mark this one as blocked then.
Comment 8 Scott Kovatch CLA 2010-07-07 11:38:10 EDT
(In reply to comment #7)
> (In reply to comment #6)
> > I'm looking at double-click handling again for 3.6.1,
> > but I'll look into the Selection events too since it will be related.
> 
> That's good news, is there a bug for it? I could mark this one as blocked then.

Bug 313208 is tracking this. It may not look like it from the description, but that's the one.
Comment 9 Eclipse Webmaster CLA 2019-09-06 16:13:10 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.
Comment 10 Eclipse Genie CLA 2021-10-23 18:26:46 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.