Community
Participate
Working Groups
When I tried to open a binary file of ~2MB in size using built-in text editor (Open With >> Text Editor menu command), the Eclipse.exe died without saying a word. The reason why I think this problem is critical is that I could not start Eclipse anymore: it managed to "remember" the huge file it tried to open and, each time I attempted to launch Eclipse, it tried to open that file again and crashed. I had to investigate, by search-trial-error, how exactly does Eclipse "remember" the files opened before last exit, and finally I managed to "fix" the problem by editing one of the configuration files underneath $Workspace/.metadata/.plugins/.... What else can I add?... Well, here is the log fragment that must illustrate the failures I observed (from what I understand, the fragment corresponds to initial crash and further two attempts to launch Eclipse): !SESSION янв 27, 2005 21:51:07.155 ------------------------------------------ --- eclipse.buildId=M200409161125 java.version=1.4.2_05 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ru_RU !ENTRY org.vssplugin 1 0 янв 27, 2005 21:51:07.155 !MESSAGE Status Updater Thread started !ENTRY org.vssplugin 1 0 янв 27, 2005 21:54:07.155 !MESSAGE Status Updater Thread Refresh started !ENTRY org.vssplugin 1 0 янв 27, 2005 21:54:07.155 !MESSAGE Status Updater Thread updating project [uscsw.hermes] status !ENTRY org.vssplugin 1 0 янв 27, 2005 21:54:14.77 !MESSAGE Status Updater Thread Refresh done. Took 6922 ms !ENTRY org.eclipse.ui 4 4 янв 27, 2005 21:56:00.639 !MESSAGE Unhandled event loop exception !ENTRY org.eclipse.ui 4 0 янв 27, 2005 21:56:00.639 !MESSAGE No more handles !STACK 0 org.eclipse.swt.SWTError: No more handles at org.eclipse.swt.SWT.error(SWT.java:2717) at org.eclipse.swt.SWT.error(SWT.java:2616) at org.eclipse.swt.SWT.error(SWT.java:2587) at org.eclipse.swt.widgets.Widget.error(Widget.java:381) at org.eclipse.swt.widgets.Control.createHandle(Control.java:462) at org.eclipse.swt.widgets.Composite.createHandle(Composite.java:173) at org.eclipse.swt.widgets.ToolBar.createHandle(ToolBar.java:223) at org.eclipse.swt.widgets.Control.createWidget(Control.java:477) at org.eclipse.swt.widgets.Scrollable.createWidget(Scrollable.java:129) at org.eclipse.swt.widgets.ToolBar.createWidget(ToolBar.java:304) at org.eclipse.swt.widgets.Control.<init>(Control.java:91) at org.eclipse.swt.widgets.Scrollable.<init>(Scrollable.java:72) at org.eclipse.swt.widgets.Composite.<init>(Composite.java:86) at org.eclipse.swt.widgets.ToolBar.<init>(ToolBar.java:98) at org.eclipse.jface.action.ToolBarManager.createControl (ToolBarManager.java:86) at org.eclipse.jface.action.ToolBarContributionItem.fill (ToolBarContributionItem.java:189) at org.eclipse.jface.action.CoolBarManager.update (CoolBarManager.java:894) at org.eclipse.ui.internal.EditorActionBars.setVisible (EditorActionBars.java:426) at org.eclipse.ui.internal.EditorActionBars.setActive (EditorActionBars.java:327) at org.eclipse.ui.internal.EditorActionBars.activate (EditorActionBars.java:100) at org.eclipse.ui.internal.WorkbenchPage$ActionSwitcher.activateContributions (WorkbenchPage.java:298) at org.eclipse.ui.internal.WorkbenchPage$ActionSwitcher.updateTopEditor (WorkbenchPage.java:272) at org.eclipse.ui.internal.WorkbenchPage.bringToTop (WorkbenchPage.java:594) at org.eclipse.ui.internal.WorkbenchPage.activate (WorkbenchPage.java:456) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched (WorkbenchPage.java:2258) at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor (WorkbenchPage.java:2177) at org.eclipse.ui.internal.WorkbenchPage.access$6 (WorkbenchPage.java:2169) at org.eclipse.ui.internal.WorkbenchPage$9.run(WorkbenchPage.java:2156) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:2151) at org.eclipse.ui.internal.WorkbenchPage.openEditor (WorkbenchPage.java:2134) at org.eclipse.ui.actions.OpenWithMenu.openEditor(OpenWithMenu.java:258) at org.eclipse.ui.actions.OpenWithMenu.access$0(OpenWithMenu.java:251) at org.eclipse.ui.actions.OpenWithMenu$2.handleEvent (OpenWithMenu.java:166) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1377) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1348) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:254) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:96) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:129) 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.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:704) at org.eclipse.core.launcher.Main.main(Main.java:688) !ENTRY org.vssplugin 1 0 янв 27, 2005 21:56:03.77 !MESSAGE Status Updater Thread going down !SESSION янв 27, 2005 22:11:27.58 ------------------------------------------- --- eclipse.buildId=M200409161125 java.version=1.4.2_05 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ru_RU !ENTRY org.eclipse.osgi янв 27, 2005 22:11:27.58 !MESSAGE Application error !STACK 1 org.eclipse.swt.SWTError: No more handles at org.eclipse.swt.SWT.error(SWT.java:2717) at org.eclipse.swt.graphics.Image.init(Image.java:1366) at org.eclipse.swt.graphics.Image.<init>(Image.java:161) at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint (AnnotationRulerColumn.java:526) at org.eclipse.jface.text.source.AnnotationRulerColumn.access$3 (AnnotationRulerColumn.java:511) at org.eclipse.jface.text.source.AnnotationRulerColumn$1.paintControl (AnnotationRulerColumn.java:306) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:82) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:805) at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:803) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3020) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3338) at org.eclipse.swt.internal.win32.OS.UpdateWindow(Native Method) at org.eclipse.swt.widgets.Decorations.setVisible(Decorations.java:1213) at org.eclipse.swt.widgets.Shell.setVisible(Shell.java:1175) at org.eclipse.swt.widgets.Shell.open(Shell.java:767) at org.eclipse.jface.window.Window.open(Window.java:644) at org.eclipse.ui.internal.WorkbenchWindow.open (WorkbenchWindow.java:513) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1230) at org.eclipse.ui.internal.Workbench.access$10(Workbench.java:1185) at org.eclipse.ui.internal.Workbench$13.run(Workbench.java:1096) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:616) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1029) at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState (WorkbenchConfigurer.java:167) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows (WorkbenchAdvisor.java:652) at org.eclipse.ui.internal.Workbench.init(Workbench.java:819) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1325) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:254) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:96) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:129) 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.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:704) at org.eclipse.core.launcher.Main.main(Main.java:688) !SESSION янв 27, 2005 22:11:58.308 ------------------------------------------ --- eclipse.buildId=M200409161125 java.version=1.4.2_05 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=ru_RU !ENTRY org.eclipse.osgi янв 27, 2005 22:11:58.323 !MESSAGE Application error !STACK 1 org.eclipse.swt.SWTError: No more handles at org.eclipse.swt.SWT.error(SWT.java:2717) at org.eclipse.swt.graphics.Image.init(Image.java:1366) at org.eclipse.swt.graphics.Image.<init>(Image.java:161) at org.eclipse.jface.text.source.AnnotationRulerColumn.doubleBufferPaint (AnnotationRulerColumn.java:526) at org.eclipse.jface.text.source.AnnotationRulerColumn.access$3 (AnnotationRulerColumn.java:511) at org.eclipse.jface.text.source.AnnotationRulerColumn$1.paintControl (AnnotationRulerColumn.java:306) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:82) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:820) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:805) at org.eclipse.swt.widgets.Composite.WM_PAINT(Composite.java:803) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3020) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3338) at org.eclipse.swt.internal.win32.OS.UpdateWindow(Native Method) at org.eclipse.swt.widgets.Decorations.setVisible(Decorations.java:1213) at org.eclipse.swt.widgets.Shell.setVisible(Shell.java:1175) at org.eclipse.swt.widgets.Shell.open(Shell.java:767) at org.eclipse.jface.window.Window.open(Window.java:644) at org.eclipse.ui.internal.WorkbenchWindow.open (WorkbenchWindow.java:513) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1230) at org.eclipse.ui.internal.Workbench.access$10(Workbench.java:1185) at org.eclipse.ui.internal.Workbench$13.run(Workbench.java:1096) at org.eclipse.core.internal.runtime.InternalPlatform.run (InternalPlatform.java:616) at org.eclipse.core.runtime.Platform.run(Platform.java:747) at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1029) at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState (WorkbenchConfigurer.java:167) at org.eclipse.ui.application.WorkbenchAdvisor.openWindows (WorkbenchAdvisor.java:652) at org.eclipse.ui.internal.Workbench.init(Workbench.java:819) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1325) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:254) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:141) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:96) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:129) 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.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:704) at org.eclipse.core.launcher.Main.main(Main.java:688)
Can you try after rebooting. The log says you're out of handles. This might or might not be Eclipse: if another app already used up the handles Eclipse has no chance but to die. Opening a 2MB file shouldn't be a problem. Did you install additional plug-ins? I suspect a dup of bug 68478.
Even if it works fine after rebooting, the problem should not be dismissed. Actually, I think there are two separate problems here: (a) Eclipse's crash per se. Even if Eclipse was deprived of handles by other applications (yes, it's quite possible -- usually I run a lot of applications at the same time), it would be nice for it to die "more decently", like it does in other cases (says that it encountered some error and recommend to exit, close other applications, and so on and so forth). (b) Eclipse may record that a file has been opened before the file has been actually opened. As a result, on the next start, Eclipse makes an attempt to open the same file -- an attempt that is very likely to fail again. IMHO, the problem (a) is more or less tolerable and probably can be considered a duplicate of the bug #68478. Quite the contrary, the problem (b) is quite critical. In other words, I think this bug report should be confined to the following issue: Eclipse should not remember opened files prematurely (regardless of what may cause a failure to open a file).
Restoring editors is a general Platform UI mechanism. Please note that fixing this defect i.e. not open the file in question would not help at all: the out-of-handles errors in the log also come from various other places e.g. from drawing the tool bar.
This is an exception difficult bug to trigger. To trigger it, you have to throw an exception inside of the exception handler for the workbench init code. Not only that, but it must consistently happen. I believe this could only happen if Eclipse were started with a very specific amount of free memory or free handles available (i.e., enough to enter the init method, but not enough to get out of the exception handler). The fix is to move the super.handleException(e) call to the last line of handleException in the anonymous inner class in "IStatus restoreState()". MVM: If you have a chance, could you just make the change on head for me? The fix is very short, and it's technically your component area. :)
I could do this now, but I don't think this is wise for 3.1 anymore as it is so late in the cycle. Since it is not a normal scenario and difficult to recreate I'm marking 3.2, it would also be nicer to have a repeatable case to test the fix on.
I stepped on this problem once again... The bad news is that a file does not seem to have to be big to trigger the bug. In my last accident the file was as small as 65K (but it still was a binary file). (I think that it is a bad news because if this theory is true then the users' chances of triggering this bug are much higher...) The good news is that now I can submit the sample file that allows me to reproduce the problem at will...
Created attachment 23806 [details] Sample file that triggers the bug in question This is a file that, when opened by Ecliplse's default editor, blows up the application and prevents further launches until "$WORKSPACE\.metadata\plugins\org.eclipse.ui.workbench\workbench.xml" is edited by hand...
adding Dani so he can investigate any problems with the text editor on this particular file that was provided.
I can open the attached file using the text or Java editor without problems on N20050623-0010.
Moving Dougs bugs
FWIW: I'm now running Eclipse version: 3.1.2 (Build id: M20060118-1600) and cannot reproduce the problem using the file I submitted before. (Of course, that does not necessarily mean that the problem is gone...)
I'll move this ro REMIND for now and if you find a recreatable case please reopen.
As of now 'LATER' and 'REMIND' resolutions are no longer supported. Please reopen this bug if it is still valid for you.