From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15927 invoked by alias); 29 Jul 2004 21:02:58 -0000 Mailing-List: contact java-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-prs-owner@gcc.gnu.org Received: (qmail 15912 invoked by uid 48); 29 Jul 2004 21:02:58 -0000 Date: Thu, 29 Jul 2004 21:02:00 -0000 From: "mark at gcc dot gnu dot org" To: java-prs@gcc.gnu.org Message-ID: <20040729210255.16824.mark@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug AWT/16824] New: GdkPixbufDecoder crashes with image loading programs X-Bugzilla-Reason: CC X-SW-Source: 2004-q3/txt/msg00148.txt.bz2 List-Id: 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 This bug report comes from GNU Classpath: https://savannah.gnu.org/bugs/index.php?func=detailitem&item_id=9484 -- Summary: GdkPixbufDecoder crashes with image loading programs Product: gcc Version: 3.5.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: AWT AssignedTo: fitzsim at redhat dot com ReportedBy: mark at gcc dot gnu dot org CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16824