Community
Participate
Working Groups
Under certain scenarios, highlighting a block of code and performing a 'left shift' on the indentation (from the Source menu) caused eclipse to crash while editing java source files. All changes to my source files were lost, so I guess this bug is critical...? Here is the relevant log entry: !SESSION Nov 29, 2003 16:52:35.43 --------------------------------------------- - java.version=1.4.1_02 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_CA Command-line arguments: -os win32 -ws win32 -arch x86 -install file:C:/Program Files/eclipse/ !ENTRY org.eclipse.ui 4 4 Nov 29, 2003 16:52:35.43 !MESSAGE Unhandled event loop exception !ENTRY org.eclipse.ui 4 0 Nov 29, 2003 16:52:35.43 !MESSAGE java.lang.OutOfMemoryError !STACK 0 java.lang.OutOfMemoryError !ENTRY org.eclipse.ui 4 4 Nov 29, 2003 16:52:48.663 !MESSAGE Unhandled event loop exception !ENTRY org.eclipse.ui 4 0 Nov 29, 2003 16:52:48.673 !MESSAGE Failed to execute runnable (java.lang.OutOfMemoryError) !STACK 0 org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.OutOfMemoryError) at org.eclipse.swt.SWT.error(SWT.java:2592) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages (Synchronizer.java:105) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2164) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1881) at org.eclipse.jface.window.Window.runEventLoop(Window.java:586) at org.eclipse.jface.window.Window.open(Window.java:566) at org.eclipse.ui.internal.ide.dialogs.InternalErrorDialog.open (InternalErrorDialog.java:71) at org.eclipse.ui.internal.ide.dialogs.InternalErrorDialog.openQuestion (InternalErrorDialog.java:173) at org.eclipse.ui.internal.ide.IDEExceptionHandler.openQuestionDialog (IDEExceptionHandler.java:147) at org.eclipse.ui.internal.ide.IDEExceptionHandler.handleException (IDEExceptionHandler.java:79) at org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor.eventLoopException (IDEWorkbenchAdvisor.java:285) at org.eclipse.ui.internal.ExceptionHandler.handleException (ExceptionHandler.java:53) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1409) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1381) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:237) at org.eclipse.ui.PlatformUI.createAndRunWorkbench (PlatformUI.java:139) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:47) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:858) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:299) at org.eclipse.core.launcher.Main.run(Main.java:767) at org.eclipse.core.launcher.Main.main(Main.java:601) I am running a 1.4 GHz AMD Athlon XP with 512 MB ram under Windows XP SP1 This bug has made eclipse crash on several occasions. This bug happened in version 2.1.2, so I upgraded to 3.0M5, but it still crashes intermittently in 3.0. This bug seems to occur when changing the indentation of a large number of lines of code (ex: 500 or more). I haven't been able to find an exact set of steps to reproduce the bug, but it seemed to happen after copying and pasting chunks of code in or out of the file whose indentation was changed. This bug might be related to the fact that I use 2 spaces as the step for indentation of my java source files. As such, I am using the following preference settings: Preferences->Java->Editor->Appearance->Displayed Tab Width: 2 Preferences->Java->Editor->Typing->Insert Spaces For Tab: true Preferences->Java->Code Fromatter->Style->Insert tabs for indentation, not spaces: false Preferences->Java->Code Fromatter->Style->Number of spaces representing an indentation level: 2 Please let me know if I can provide any more details.
As a work around until we have a better implementation please give Eclipse more memory. With sun jdk, add the VM argument "-Xmx250M". I assume when shifting left is running out of memory, there are several others which have the same problem. However, we have to make sure that no work is lost.
Jon, do you remember whether QuickDiff was enabled? Can you still reproduce it? Does disabling QuickDiff resolve it?
Using the settings from comment 1 an object allocation trace shows 33MB allocated live objects and 151MB collected (i.e., temporary) objects during indenting JavaEditor.java (this includes object from the reconciler). This is with QuickDiff disabled. Reproduced while QuickDiff was enabled. The stack trace from comment 0 can occur after QuickDiff ran out of memory and the error dialog appeared (the main thread then also ran out of memory and a second error dialog about an internal error was shown). Marking as duplicate, please reopen if disabling QuickDiff does not solve the problem. *** This bug has been marked as a duplicate of 62662 ***
Christof, I haven't had this bug occur in quite sometime, but then again I haven't been doing a lot of cutting-and-pasting of huge chunks of source code lately. I recall that I was sometimes able to reproduce the bug by repeatedly cutting-and-pasting or copying-and-pasting large chunks of code between files in the editor windows. I don't think I ever deliberately changed the quick-dif settings... I am fairly certain that when I observed this bug, the quick-dif settings were set to the defaults shipped with eclipse 3.0 M5. I think I only changed editor and code formatter settings, and perhaps a couple of other things like 'show line numbers'. I see that I never mentioned that I usually turn on 'show line numbers'. Maybe this could be a cause of the bug. Sorry I can't be of more help. If I have some spare time, I'll try and see if I can reproduce the bug on 3.0 RC1.