commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

JamVM/Classpath occasionally crashes with image loading/displaying progr


From: Roman Kennke
Subject: JamVM/Classpath occasionally crashes with image loading/displaying programs
Date: Mon, 28 Jun 2004 23:02:34 +0200

Hi list,

I found a strange segfault issue in programs that try to load/display
images (GIF/JPEG). This segfault does occur seemingly randomly,
sometimes it works. When running in GDB it _always_ works.

Mark and I have located the segfault to occur in 
native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c Line 226.
Here is gdk_env used (which probably should be env instead). The real
problem seems to be, that GTKToolkit is not yet initialized properly. 

The following workaround seems to work though: 

--- gnu/java/awt/peer/gtk/GdkPixbufDecoder.java 26 Jun 2004 16:06:47
-0000 1.5 
+++ gnu/java/awt/peer/gtk/GdkPixbufDecoder.java 28 Jun 2004 20:34:49
-0000 
@@ -57,6 +57,8 @@ 
System.loadLibrary("gtkpeer"); 
} 
initStaticState (); 
+ java.awt.Toolkit.getDefaultToolkit(); 
+ try { Thread.sleep(500); } catch (InterruptedException ignored) { } 
} 
native static void initStaticState (); 
private final int native_state = GtkGenericPeer.getUniqueInteger (); 

this means, if we wait long enough for GTKToolkit to initialize, the
segfault does not occur. This seems to be the reason, why it does not
crash inside GDB.

Any ideas how to fix this? Maybe I should add that I tried that with
JamVM 1.1.4 

I include the backtrace from gdb here:

 0x419928b8 in ?? ()
#1  0x431b64c7 in Java_gnu_java_awt_peer_gtk_GdkPixbufDecoder_pumpBytes
(
     env=0x440534cd, obj=0x440534cd, jarr=0x402349d0, len=2048)
     at gnu_java_awt_peer_gtk_GdkPixbufDecoder.c:226
#2  0x0805bca9 in callJNIMethod (env=0x440534cd, class=0x0,
    sig=0x813cad3 "\bØ address@hidden \032@", extra=4, ostack=0x8126050,
    f=0x431b6480 "U\211å\203ì(\211}ü\213}\024\211]ôè\214ãÿÿ\201Ã8M\001")
    at dll_md.c:41
#3  0x0804da94 in callJNIWrapper (class=0x0, mb=0x82134d8,
ostack=0x440534cd)
    at dll.c:296
#4  0x0804d5ed in resolveNativeWrapper (class=0x440534cd, mb=0x82134d8,
    ostack=0x8126050) at dll.c:183
#5  0x0805260f in executeJava () at interp.c:1618
#6  0x0804e522 in executeMethodVaList (ob=0x401a8df8, class=0x440534cd,
    mb=0x8110120, jargs=0x431a9aac "") at execute.c:66
#7  0x0804e3b6 in executeMethodArgs (ob=0x440534cd, class=0x440534cd,
    mb=0x440534cd) at execute.c:38
#8  0x0805a681 in threadStart (arg=0x80e3278) at thread.c:256
#9  0x400259b4 in start_thread () from /lib/tls/libpthread.so.0
#10 0x00000000 in ?? ()


/Roman 

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil


reply via email to

[Prev in Thread] Current Thread [Next in Thread]