SFTP file content becomes persistently outdated (out of sync) after "An internal error has occurred." (SWTException "Widget is disposed"), until cache is manually deleted
Bugzilla Link | 551264 |
Status | NEW |
Importance | P3 major |
Reported | Sep 19, 2019 14:37 EDT |
Modified | Jul 23, 2020 15:37 EDT |
Version | 4.5.100 |
Reporter | Nobody - feel free to take it |
Description
While working with RSE, I got a popup stating that "An internal error has occurred", with the following stack trace:
org.eclipse.swt.SWTException: Widget is disposed
at org.eclipse.swt.SWT.error(SWT.java:4699)
at org.eclipse.swt.SWT.error(SWT.java:4614)
at org.eclipse.swt.SWT.error(SWT.java:4585)
at org.eclipse.swt.widgets.Widget.error(Widget.java:451)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:350)
at org.eclipse.swt.widgets.Widget.getData(Widget.java:516)
at org.eclipse.jface.viewers.AbstractTreeViewer.getTreePathFromItem(AbstractTreeViewer.java:2948)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalGetWidgetToSelect(AbstractTreeViewer.java:1770)
at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpand(AbstractTreeViewer.java:1668)
at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:2543)
at org.eclipse.jface.viewers.AbstractTreeViewer.setSelectionToWidget(AbstractTreeViewer.java:3012)
at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1659)
at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1084)
at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:376)
at org.eclipse.rse.ui.operations.SystemDeferredTreeContentManager$1.setRemoved(SystemDeferredTreeContentManager.java:89)
at org.eclipse.ui.progress.DeferredTreeContentManager$4.runInUIThread(DeferredTreeContentManager.java:353)
at org.eclipse.ui.progress.UIJob.lambda$0(UIJob.java:95)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3919)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3550)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
Visibly, this exception broke synchronisation of contents with the remote SSH server. Following that, the file was saved, but I then realized that Eclipse did not actually change the file on the server. Instead, it modified a temporary local file. Closing the file, refreshing or even reconnecting did not help. In fact, even after Eclipse was restarted, opening the file still quietly displayed the stale copy. It's only after asking for help from a colleague that he made me realize RSE used a cache, and then I realized Eclipse was working on the file "C:\Users\CLOP03\eclipse-workspace\RemoteSystemsTempFiles\SPSSOGL6D\home\admgeo1\bin\synchronisation_ckan\launcher.sh". I could only work around the problem by deleting that stale file from the cache.
To my knowledge, this affected a single file. I am not sure about the sequence of events and will try confirming if I experience this again. I used RSE in a couple projects before and never experienced this, but that was years ago.
I am under the impression that I am reporting the result of 2 issues:
- An error which happens in circumstances I really cannot describe at this point.
- Failure to handle such an exception reasonably well, i.e. at least warning users if the cache is stale when opening the file.
It is really the combination of these 2 issues which is a major problem.
Thankfully, the updated contents are kept locally.
eclipse.buildId=4.12.0.I20190605-1800
java.version=12.0.2
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_CA
Framework arguments: -product org.eclipse.epp.package.php.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.php.product