[Mono-list] Crash while creating Pixbuf from file

Jonathan Pryor jonpryor at vt.edu
Wed Jan 16 14:29:39 EST 2008


On Wed, 2008-01-16 at 10:02 -0800, Julien Sobrier wrote:
> Hello,
> here is my test program:
> using System;
> using Gdk;
> 
>     public class test
>     {
>         public static void Main(string[] args)
>         {

// insert
              Global.InitCheck (ref args);


>             string file = "/tmp/lesgrossestetes.jpg";
>             Pixbuf pic = new Pixbuf(file);
>         }
>     }
> 
> # gmcs -r:/usr/lib/mono/gtk-sharp-2.0/gdk-sharp.dll -target:exe test.cs
> # mono test.exe

You forgot to initialize GDK and GTK+.  It works if everything gets
initialized properly.

 - Jon




More information about the Mono-list mailing list