The online racing simulator
Command Crash
(12 posts, started )
#1 - sun
Command Crash
Hi,

i just made a Cruise insim app for somebody and everytime they make a a command, it crashes the insim. I've tried looking at the code my self, but i cant find out how werre it keeps going wrong.

Can any body help me ?

thx
If you dont post the code I dont think anyone will be able to help..
Owen, I really don't know where you are going with this. Really I suggest you start with smaller things and gradually build up your skill. Not just bombard into it all!
If you use C# use

case "!command":
try
{
your code here
}
catch (Exception var)
{
MessageBox.show("Error: " + var.message);
}
break;

When you do this it should explain the error that crashes your insim.
Hope I've helped
But if the error is somewhere else... like in the place where u tell the insim to listen for the command maybe it will continue to crash :/
And, yeah, really why don't you post your code?

For C++ i have no idea sorry xD
You can also just run the program in the debugger, and it will tell you exactly where the problem is and how to fix it.
#6 - Woz
Quote from sun :Hi,

i just made a Cruise insim app for somebody and everytime they make a a command, it crashes the insim. I've tried looking at the code my self, but i cant find out how werre it keeps going wrong.

Can any body help me ?

thx

I dont get it. If you have finally learnt to code enough to write a complete Cruise app why cant you find a crash location and fix it? You should have encountered many many crashes and bugs by now you have had to fix writing a complete app. You have developed an app that deals with the complexity of network ccomms etc, you should have encountered many unexplained crashes to date as part of that process, some very complex.

The question you have just asked is the same as posting "My car is not working, whats wrong?" or "My PC is acting strange, what do I need to do to fix it?".

Did you just use the open source InSim app on this forum and make a change that has broken it or have you really created one from the ground up?

For those that have not encountered Sun here before... Be careful the norm is for him to ask you to write the code for him in the thread the question is asked.

As others have said, set your IDE to break on exceptions then run in debug and wait for the crash. You will now be able to look at the variables and see what they hold. This shoule let you see what the problem is.
Quote from sun :Hi,

i just made a Cruise insim app for somebody and everytime they make a a command, it crashes the insim. I've tried looking at the code my self, but i cant find out how werre it keeps going wrong.

Can any body help me ?

thx

Any news? Or should we finish with this thread?
Try making an exception....

in the case command, make a default....
Quote from Krammeh :Try making an exception....

in the case command, make a default....

Post random advice that is useless without knowing the faulty code in question....
Quote from AndroidXP :Post random advice that is useless without knowing the faulty code in question....

With my experience of C, if you've got a case, you need to have a case else or whatever the syntax for it is...

and this was a known issue in one of the early open-source models...
Quote from Krammeh :Try making an exception....

in the case command, make a default....

Yes, and don't divide by zero or square root a negative. Also bad.
Quote from Bob Smith :Yes, and don't divide by zero or square root a negative. Also bad.

To admit: I didn't know that. Thanks

Command Crash
(12 posts, started )
FGED GREDG RDFGDR GSFDG