VolumeLight crashes
by Andy Hodges · in Torque Game Engine Advanced · 07/31/2007 (10:13 am) · 4 replies
Been checking for a fix on this throughout the forums but I just can't find it. Basically, here's what happens... adding VolumeLight with SpotLight works in local mode...
But... if you start a dedicated server... it crashes. IT's the VolumeLight because if I remove it, I can then start a dedicated server without any crashes.
Any ideas on what might cause this?
But... if you start a dedicated server... it crashes. IT's the VolumeLight because if I remove it, I can then start a dedicated server without any crashes.
Any ideas on what might cause this?
#2
"Fatal: (c:\...\tgea_sdk\engine\gfx\gfxdevice.cpp @ 29)
Attempting to get invalid GFX device."
Would appreciate any help with this!
11/28/2007 (9:59 am)
John, I have the same problem. I get the following message from debugger:"Fatal: (c:\...\tgea_sdk\engine\gfx\gfxdevice.cpp @ 29)
Attempting to get invalid GFX device."
Would appreciate any help with this!
#3
11/28/2007 (2:29 pm)
Are you trying to run it dedicated on the same box that you can also load a client on? I'm asking because theres a ton of spots where GFX calls are made or setup, that in the case of a "real" dedicated server will just crash the engine, due to no "null" gfx layer
#4
You brought up a good point about the gfx layer, I got off my lazy butt and looked around the forums a bit more, and saw a somewhat similar problem addressed (it has to do with Atlas causing a similar issue):
http://www.garagegames.com/mg/forums/result.thread.php?qt=32015
If you read the above mentioned forum post, Ben Garney suggests a couple of possible workarounds.
Either make sure you invoke the InitCanvas( "..." ); function even on the dedicated server code (I just placed it before creating the VolumeLight), which works (but is kind of crude, because I'm not sure what will happen if I try this on a "real" dedicated server, e.g., a server with a crappy/no graphics card).
Or, Ben suggested "Or you can just add an if statement around GFX to avoid nastiness (ie, if(!GFX) return; or somesuch).", which I haven't tested, but is probably the better workaround, especially if you want the dedicated server to run on a "real" server.
Bottom line, looks like the VolumeLights are reliant on some fo the GFX code stuff, even in dedicated server mode, which of course should not be the case.
11/28/2007 (9:44 pm)
Thanks Jeremiah, yes I ran the the dedicated server on the same machine that ran the client just fine.You brought up a good point about the gfx layer, I got off my lazy butt and looked around the forums a bit more, and saw a somewhat similar problem addressed (it has to do with Atlas causing a similar issue):
http://www.garagegames.com/mg/forums/result.thread.php?qt=32015
If you read the above mentioned forum post, Ben Garney suggests a couple of possible workarounds.
Either make sure you invoke the InitCanvas( "..." ); function even on the dedicated server code (I just placed it before creating the VolumeLight), which works (but is kind of crude, because I'm not sure what will happen if I try this on a "real" dedicated server, e.g., a server with a crappy/no graphics card).
Or, Ben suggested "Or you can just add an if statement around GFX to avoid nastiness (ie, if(!GFX) return; or somesuch).", which I haven't tested, but is probably the better workaround, especially if you want the dedicated server to run on a "real" server.
Bottom line, looks like the VolumeLights are reliant on some fo the GFX code stuff, even in dedicated server mode, which of course should not be the case.
Torque Owner John Kabus (BobTheCBuilder)