Client Crash when connecting to Dedicated server.
by Richard Dechow · in Technical Issues · 04/16/2008 (2:36 pm) · 4 replies
I'm having an issue with the client application hard crashing when connecting to a Dedicated server.
It works fine when one client connect to another client made server, its only when trying to connect to a dedicated server.
Console output:
*** Phase 1: Download Datablocks & Targets
Validation required for shape: testapp/data/shapes/racer/racer1.dts
Validation required for shape: testapp/data/shapes/racer/racer2.dts
Validation required for shape: testapp/data/shapes/dino/appalachiosaurus.dts
Mapping string: MissionStartPhase2 to index: 9
then it crashes, the server only shows a client timeout notice. the debug build is of little help, as it loads just fine, and returns no errors, when getting to the crash point, but crashes at other points completely unrelated to the mission, where the release build does not.
any help would be much appreciated!
It works fine when one client connect to another client made server, its only when trying to connect to a dedicated server.
Console output:
*** Phase 1: Download Datablocks & Targets
Validation required for shape: testapp/data/shapes/racer/racer1.dts
Validation required for shape: testapp/data/shapes/racer/racer2.dts
Validation required for shape: testapp/data/shapes/dino/appalachiosaurus.dts
Mapping string: MissionStartPhase2 to index: 9
then it crashes, the server only shows a client timeout notice. the debug build is of little help, as it loads just fine, and returns no errors, when getting to the crash point, but crashes at other points completely unrelated to the mission, where the release build does not.
any help would be much appreciated!
#2
04/16/2008 (2:53 pm)
That's creepy, usually the debug mode would tell you an error or something.
#3
As for the debug mode, I've had issues with it sense the stock build of torque 1.5. really the only changes I've made to the source, are a few bug fixes posted on the forums, phidget api integration (literally dropping in a header, and an extra page with a few lines of code, and a socket reader. besides that, I added a few torque script console execution commands for the phidgets, and removed the sleep() if the game doesn't have the foreground. Everything else has been done in torque script.
btw, the hard crash error it is:
The instruction at "memory address" referenced memory at "memory address". The memory could not be "written".
when I run the debug, it never crashes at that point, so I cant see where its hanging up in the code...
04/17/2008 (7:55 am)
We never have used the dedicated server in the past, so we never tested the game with it. Really the only difference in code that I can see, is the render window is disabled, a console window is enabled, and it starts a mission right away, and restarts to another mission ones that mission finishes, and seams to be the extent of it. So the hard crash I'm getting makes no sense.As for the debug mode, I've had issues with it sense the stock build of torque 1.5. really the only changes I've made to the source, are a few bug fixes posted on the forums, phidget api integration (literally dropping in a header, and an extra page with a few lines of code, and a socket reader. besides that, I added a few torque script console execution commands for the phidgets, and removed the sleep() if the game doesn't have the foreground. Everything else has been done in torque script.
btw, the hard crash error it is:
The instruction at "memory address" referenced memory at "memory address". The memory could not be "written".
when I run the debug, it never crashes at that point, so I cant see where its hanging up in the code...
#4
I had just modified the batch file that opened the dedicated server for the starter.fps to open to our project instead, forgetting that our new compiled executable, has a different name from the original TorqueDemo.exe. And it was launching the old TorqueDemo.exe instead of our executable.
04/18/2008 (12:27 pm)
I fixed the issue... I'm almost embarrassed to say what the issue was...I had just modified the batch file that opened the dedicated server for the starter.fps to open to our project instead, forgetting that our new compiled executable, has a different name from the original TorqueDemo.exe. And it was launching the old TorqueDemo.exe instead of our executable.
Torque 3D Owner Matthew Jessick
(Most of this is for new programmers, rather than the original poster. Or programmers that value their "hobby" time as somehow less than their work time.)
If nothing leaps out at you initially, a good way to attack this kind of problem is to roll back to the version the last time dedicated server worked, compare changes since then, etc.
Obviously, if you haven't bothered to set up a source code control system, with frequent check ins and periodic comprehensive "regression tests" (looking for new bugs in stuff that used to work) then it will be much harder to home in on the error.
If anyone has been spending a lot of time with Torque, but hasn't been very careful how they do it: this is an example of why being careful and methodical can save weeks. The more time you spend, the more progress you risk if things get out of hand.
Just general programming: differences between release and debug build sequencing often have to do with uninitialized variables. If you have special code for any of those loading objects, you might look there first. Look at each new code object you have added or modified after construction (or setup, if you must) and look in the debugger for any uninitialized variables.)