bug-classpath
[Top][All Lists]
Advanced

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

[Bug classpath/22755] JamVM/Classpath crashes with image loading program


From: gcc-bugzilla at gcc dot gnu dot org
Subject: [Bug classpath/22755] JamVM/Classpath crashes with image loading programs
Date: 16 Oct 2005 01:27:01 -0000

I found a strange segfault issue in programs that try to load/display images
(GIF/JPEG).

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.

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

/Roman


------- Comment #1 from from-classpath at savannah dot gnu dot org  2004-07-29 
21:03 -------
This bug is now also tracked in GCC AWT bugzilla as
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16824


------- Comment #2 from from-classpath at savannah dot gnu dot org  2005-01-12 
06:53 -------
Roman, is this fixed with latest classpath from CVS ? Much things changed
lately, we use only one thread for AWT and gtk-peer now and the
GdkPixbufDecoder got improved a lot when the patch to make it be used from
ImageIO too.

A concrete testcase would be nice too.


------- Comment #3 from from-classpath at savannah dot gnu dot org  2005-04-21 
21:01 -------
I have no problems with this since a long time and close this bug.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22755





reply via email to

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