Irrlicht.Net.DLL throws "System.NullReferenceException&

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
SoulRift
Posts: 4
Joined: Sat Jun 18, 2005 11:39 pm

Irrlicht.Net.DLL throws "System.NullReferenceException&

Post 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.
TOP-Proto
Posts: 14
Joined: Sun Jun 25, 2006 8:41 pm

Post by TOP-Proto »

this is a bug with using the opengl renderer, change it to another render type.
Terrachild
Posts: 21
Joined: Sun Sep 03, 2006 5:58 am

crash on exit

Post 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:
shivanraptor
Posts: 40
Joined: Tue Aug 15, 2006 6:01 am
Location: Hong Kong
Contact:

Post 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# ?
Braneloc
Posts: 68
Joined: Fri Jan 20, 2006 5:12 am
Location: England
Contact:

Post by Braneloc »

Sometimes you've just gotta say, the laws of time and space, who gives a smeg ?!

Irrlicht.Net Information - http://www.irrforge.org/index.php/.net
Irrlicht# (aka the C# port) - http://irrlichtsharp.sourceforge.net
Locked