eclipse 3.3.1 crash under 7.0-PRERELEASE

Huang wen hui hwh at gddsn.org.cn
Sun Jan 13 02:43:52 PST 2008


Rene Ladan 写道:
> Huang wen hui schreef:
>   
>> hi,
>> When I edit lib files on "user libraries", eclipse crash, use jdk1.6
>> crash also.
>>
>>
>>     
> Eclipse 3.3.1 works nicely on my 7.0BETA4 i386 box using
> either jdk1.5 or jdk1.6
>
>   
>> %cat hs_err_pid1516.log
>> #
>> # An unexpected error has been detected by HotSpot Virtual Machine:
>> #
>> # SIGSEGV (0xb) at pc=0x000000080089438a, pid=1516, tid=0xb01120
>> #
>> # Java VM: Java HotSpot(TM) 64-Bit Server VM
>> (1.5.0_13-p7-hwh_24_oct_2007_08_25 mixed mode)
>> # Problematic frame:
>> # C [libc.so.7+0x2f38a] realpath+0x21a
>> #
>>
>>     
> [..snip rest of backtrace..]
>
> I think rhis is more an Eclipse/Java problem,
> because Eclipse 3.3.1 sometimes also crashes
> on the Windows XP box at work (running jdk1.6u3)
>
> Rene
>   
this dirty patch fixed my problem:
diff -u ./plugins/org.eclipse.swt/Eclipse\
SWT/gtk/org/eclipse/swt/widgets/FileDialog.java /tmp/FileDialog.java
--- ./plugins/org.eclipse.swt/Eclipse
SWT/gtk/org/eclipse/swt/widgets/FileDialog.java 2007-09-22
00:58:07.000000000 +0800
+++ /tmp/FileDialog.java 2008-01-13 18:41:00.146067367 +0800
@@ -383,10 +383,11 @@
* when setting a file name that is not a true canonical path.
* The fix is to use the canonical path.
*/
- int /*long*/ ptr = OS.realpath (buffer, null);
+ byte [] maxPath = new byte[1024];
+ int /*long*/ ptr = OS.realpath (buffer, maxPath);
if (ptr != 0) {
OS.gtk_file_chooser_set_filename (handle, ptr);
- OS.g_free (ptr);
+ //OS.g_free (ptr);
}
} else {
if (fileName.length () > 0) {
@@ -397,10 +398,11 @@
* when setting a file name that is not a true canonical path.
* The fix is to use the canonical path.
*/
- int /*long*/ ptr = OS.realpath (buffer, null);
+ byte [] maxPath = new byte[1024];
+ int /*long*/ ptr = OS.realpath (buffer, maxPath);
if (ptr != 0) {
OS.gtk_file_chooser_set_filename (handle, ptr);
- OS.g_free (ptr);
+ //OS.g_free (ptr);
}
}
}



More information about the freebsd-java mailing list