[Mono-dev] App using gecko-sharp won't start.

Michael Hutchinson m.j.hutchinson at gmail.com
Wed Jan 30 21:57:29 EST 2008


On Jan 25, 2008 11:47 AM, Jakub Skoczen <jakub at indexdata.dk> wrote:
> Hey Guys,
>
> I am using the MonoDevelop IDE to build a GTK# application that embeds
> Gecko. When run from within MD, the app starts up and works fine.
> However, when I try to run it from the command line it won't work.
>
> Running:
>
> mono gecko-experiments.exe
>
> ended with:
>
> System.TypeInitializationException: An exception was thrown by the
> type initializer for Gecko.WebControl --->
> System.DllNotFoundException: /usr/lib/firefox/libgtkembedmoz.so

This is weird. Ubuntu/Debian does strange stuff here; the dllmap
should only map dll names, not full paths.

> so I've set the LD_LIBRARY_PATH=/usr/lib/firefox and I got what can be
> seen below. I tried enabling launch script generation in MD (0.14) but
> I cannot see it generating any scripts. I'm running Ubuntu 7.10. Any
> ideas on what's wrong with that?
>
> Stacktrace:
>
>   at (wrapper managed-to-native) Gtk.Container.gtk_container_add
> (intptr,intptr) <0x00004>
>   at (wrapper managed-to-native) Gtk.Container.gtk_container_add
> (intptr,intptr) <0xffffffff>
>   at Gtk.Container.Add (Gtk.Widget) <0x00034>
>   at geckoexperiments.MainWindow..ctor (Gecko.WebControl) <0x000b9>
>   at geckoexperiments.MainClass.Main (string[]) <0x0005b>
>   at (wrapper runtime-invoke)
> System.Object.runtime_invoke_void_string[]
> (object,intptr,intptr,intptr) <0xffffffff>
>

I'm not certain, but I think that GtkMozEmbed may require you to set
MOZILLA_FIVE_HOME to your Firefox directory too. MonoDevelop certainly
does this, which would propagate to child apps (e.g. when you run your
app from within MD).

-- 
Michael Hutchinson
http://mjhutchinson.com



More information about the Mono-devel-list mailing list