[Mono-list] Gdk.Pixbuf error in Mono

Bryan Buchanan bryanb at webbtide.com
Sun Sep 24 09:15:58 EDT 2006


Futher to a previous message I sent to the list, I downloaded the latest
GTK source:


and the latest Mono,


A simple test program and output follows. I've tried all the
combinations of stuff I can, and always get the same error. This is only
on an OpenSuse 10.1 system. On an Ubuntu 6.06  it works fine. As far as
I can see, the library versions seem pretty similar on both.

Any help appreciated !


bryanb at linux-5gmp:~/asp/meta/src> cat test.cs
using System;
using Gdk;

public class test {

        public static void Main (string[] args) {
                try {
                        Gdk.Pixbuf pixbuf = new Gdk.Pixbuf("../images/kite.jpg");
                catch (Exception ex) {
bryanb at linux-5gmp:~/asp/meta/src> mcs -r:System.Data -pkg:gtk-sharp-2.0 test.cs
test.cs(8,15): warning CS0219: The variable `pixbuf' is assigned but its value is never used
test.cs(10,20): warning CS0168: The variable `ex' is declared but never used
Compilation succeeded - 2 warning(s)
bryanb at linux-5gmp:~/asp/meta/src> mono test.exe

(test.exe:19453): GLib-GObject-CRITICAL **: gtype.c:2254: initialization assertion failed, use IA__g_type_init() prior to this function

(test.exe:19453): GLib-GObject-CRITICAL **: g_object_new: assertion `G_TYPE_IS_OBJECT (object_type)' failed

Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.


  at (wrapper managed-to-native) Gdk.Pixbuf.gdk_pixbuf_new_from_file (intptr,intptr&) <0x00004>
  at (wrapper managed-to-native) Gdk.Pixbuf.gdk_pixbuf_new_from_file (intptr,intptr&) <0xffffffff>
  at Gdk.Pixbuf..ctor (string) <0x00042>
  at test.Main (string[]) <0x0002c>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono(mono_handle_native_sigsegv+0xe6) [0x815c436]
        mono [0x8146657]
        /usr/local/lib/libgdk_pixbuf-2.0.so.0(IA__gdk_pixbuf_new+0xed) [0xb72db2dd]
        /usr/local/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-jpeg.so [0xb72ff501]
        /usr/local/lib/libgdk_pixbuf-2.0.so.0 [0xb72dea75]
        /usr/local/lib/libgdk_pixbuf-2.0.so.0(IA__gdk_pixbuf_new_from_file+0xf3) [0xb72dfb43]
        mono [0x8146500]
        mono(mono_runtime_invoke+0x27) [0x80ddb27]
        mono(mono_runtime_exec_main+0x5c) [0x80decdc]
        mono(mono_runtime_run_main+0x182) [0x80de8c2]
        mono(strftime+0x1bee) [0x805cba2]
        mono(mono_main+0x857) [0x805d587]
        mono(__fxstat64+0x137) [0x805bf4b]
        /lib/libc.so.6(__libc_start_main+0xdc) [0xb7d7387c]
        mono(sinh+0x4d) [0x805bea1]

More information about the Mono-list mailing list