Page 1 of 1

Irrlicht.Net.DLL throws "System.NullReferenceException&

Posted: Wed Sep 07, 2005 9:54 pm
by SoulRift
I am having a problem with irrlicht.net.dll throwing a "System.NullReferenceException" exception when my program exits. The basic anatomy of the program is a main GUI object that loads and unloads things I call Scenes; when these scenes are loaded/unloaded it creates/destroys the irrlicht display device. This is how I basically move from one menu to another (i.e. from the main menu to a submenu or actual game playing state) with ease and being well organized.
Swapping between scenes is no problem at all and I can easily destroy/create new devices, but when I attempt to exit (destroy the current scene then just return from the main application loop which will terminate the program) I get a message from the debugger saying that the DLL has thrown a "System.NullReferenceException" exception. My guess is that somewhere in the DLL an object which was being referenced no longer is there (no duh), so its probably either the device that I destroyed or something that got gobbled up by the garbage collector accidentally. Perhaps its the event hanlder I assigned to the device (I really have no idea).
Here is the real kicker: When I run the program in windowed mode it works perfectly with no exceptions thrown (also runs A LOT slower), but I get exceptions thrown when I'm in full screen mode (runs a lot faster). This sounds like something in the event thread is doing something before the actuall draw thread (main thread) can react (but only happens upon exit).
Has anyone else run into the same issue or have some idea of whats really going on here? Any help is much appreciated. By the way I'm running version 0.10.0 of Irrlicht.Net.

Posted: Fri Jul 07, 2006 6:45 pm
by TOP-Proto
this is a bug with using the opengl renderer, change it to another render type.

crash on exit

Posted: Tue Sep 05, 2006 5:58 am
by Terrachild
I'm having the same problem. I start a .NET program using VB.NET and it opens the scene fine but when I exit and hit the END SUB statement I get an error message that says:

An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Unknown Module.

Additional information: File or assembly name System, or one of its dependencies, was not found.


What is going on???

Please help :cry:

Posted: Thu Sep 07, 2006 6:10 am
by shivanraptor
i am a newbie too .
i discover that if you don't put the Irrlicht.dll with Irrlicht.NET.dll , it throws NullReferenceException / FileNotFoundException .
so put them together . Irrlicht.dll needs to be copied manually .

does anybody know how to copy automatically during compile in Visual Studio 2005 Express C# ?

Posted: Fri Sep 08, 2006 11:57 am
by Braneloc