[Gtk-sharp-list] GTK# Application.Init throws NullReferenceException

fuzz22 justin.young at dsto.defence.gov.au
Sun Oct 28 23:31:19 EDT 2007


I have an application in mono C# that we used to interact with from C using
SWIG.
We use the mono JIT interface for C to start the C#.

e.g. mono_runtime_invoke(method, NULL, args, NULL);

This all used to work fine until the upgrade to Ubuntu 7.10 in which we
inherited Mono 1.2.4 up from 1.2.2.1.
Now every time we run this application we get this:

Unhandled Exception: System.NullReferenceException: A null value was found
where an object instance was required.
  at Gtk.Application.SetPrgname () [0x00000] 
  at Gtk.Application.Init () [0x00000] 
  at GtkHelloWorld.runApp () [0x00000] 
  at GtkHelloWorld.RunnerMain (Int64 rawPtr, System.String[] args) [0x00000] 

It looks as if GTK dies out at Application.Init :-(

I tried this using just the simple HelloWorld found at
http://www.mono-project.com/GtkSharp:_Hello_World and still get the same
problem. By its self invoking mono HelloWorld.exe it runs no problems,
calling from inside the C JIT interface dies. 
As i said this has worked in the past, for a very long time... and just
started playing up.

Any thoughts?
I'm more than happy to post what ever code anyone might find relevant... I
am hoping someone realizes a change made to the API and might point me in
the direction of a fix.

Thanks in advance
   - Justin
-- 
View this message in context: http://www.nabble.com/GTK--Application.Init-throws-NullReferenceException-tf4709434.html#a13461119
Sent from the Mono - Gtk# mailing list archive at Nabble.com.



More information about the Gtk-sharp-list mailing list