Date: Sun, 13 Jan 2008 18:43:43 +0800 From: Huang wen hui <hwh@gddsn.org.cn> To: Rene Ladan <r.c.ladan@gmail.com> Cc: freebsd-eclipse@FreeBSD.org, freebsd-java@freebsd.org Subject: Re: eclipse 3.3.1 crash under 7.0-PRERELEASE Message-ID: <4789EB5F.7040608@gddsn.org.cn> In-Reply-To: <4789D95A.8000307@gmail.com> References: <47889149.7020408@gddsn.org.cn> <4789D95A.8000307@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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); } } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4789EB5F.7040608>