Project: JDT
Bug 94242 QuickFix for serialversionuid hangs
Reported: 2005-05-10 05:06:36 | Status: verified fixed

This occurs with 3.1M6 (and latest clean I-build 20050506-1600) using JDK 1.5.0_02 This is similar to, but different from 83944 Intermittently (can be as often as 1 in 2), when I do a QuickFix on a missing serialversionuid, the Progress Information dialog comes up and hangs at what looks like about 70-75% complete. (message box text is "Computing serial version ID...", with progress text of "Starting virtual machine...") Haven't absolutely pinned it down to whether it behaves differently on inner or top-level classes, but it has just happened for me on a top-level one - and appears to be repeating. When this occurs, Cancel is enabled. If pressed, it disables but nothing else happens. Even when left for some time, it does not complete - and no activity is apparent in Windows Task Manager. At this point, the only solutions are to kill Eclipse, or to go to Windows Task Manager and kill off the javaw.exe that has been spawned (the one that is 8-9k in mem usage) If you kill off the spawned javaw.exe, the QuickFix appears to complete normally - the progress dialog closes and the appropriate code is inserted, control returns to the user and all seems well. On examination of the .log file, I see the following for each occurrence of the crash: !ENTRY org.eclipse.jdt.ui 4 10001 2005-05-10 09:51:38.140 !MESSAGE Internal Error !STACK 0 java.io.EOFException at java.io.DataInputStream.readFully(DataInputStream.java:178) at java.io.DataInputStream.readLong(DataInputStream.java:380) at org.eclipse.jdt.internal.ui.text.correction.SerialVersionLaunchConfigurationDel egate$SerialVersionRunner.run (SerialVersionLaunchConfigurationDelegate.java:190) at org.eclipse.jdt.internal.ui.text.correction.SerialVersionLaunchConfigurationDel egate.launch(SerialVersionLaunchConfigurationDelegate.java:309) at org.eclipse.debug.internal.core.LaunchConfiguration.launch (LaunchConfiguration.java:590) at org.eclipse.jdt.internal.ui.text.correction.SerialVersionHashProposal.computeDe faultExpression(SerialVersionHashProposal.java:222) at org.eclipse.jdt.internal.ui.text.correction.SerialVersionHashProposal$3.run (SerialVersionHashProposal.java:156) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:113)

Files changed in fix:
org.eclipse.jdt.ui/serial support/org/eclipse/jdt/internal/ui/text/correction/SerialVersionComputer.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/SerialVersionLaunchConfigurationDelegate.java