Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Crash at start

Author
Message
Lord Herakles the Great
13
Years of Service
User Offline
Joined: 24th Mar 2011
Location:
Posted: 22nd Jun 2011 08:40
I had this code working perfectly:



Then I changed this line:



to this:



It now crashes instantly, like in the attached image. The weirdest thing is that even if I restore the line I changed back to what it was (so the code as a whole is returned to a state in which it previously did work) it still doesn't work. No matter what I do to the code, it still crashes instantly. I have absolutely no idea why it is doing this, so I really need help.

Hail to the king baby
I love Evil Dead.

Attachments

Login to view attachments
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 22nd Jun 2011 10:45
on visual studio, press F10 to break at first line executed, then keep pressing F10 till the application crash, and see where it crashes, why it crashes and then solve it

Mistrel
Retired Moderator
18
Years of Service
User Offline
Joined: 9th Nov 2005
Location:
Posted: 22nd Jun 2011 10:57
When compiling in debug mode, isn't Visual Studio supposed to tell you at which line the application crashed?

Lord Herakles the Great
13
Years of Service
User Offline
Joined: 24th Mar 2011
Location:
Posted: 23rd Jun 2011 06:43 Edited at: 23rd Jun 2011 08:10
But that's just it. Visual Studio doesn't report any errors. According to it, everything should be working perfectly. And, in my own analysis of the code, I can't find anything wrong with it either. It's just crashing for no obvious reason.

All I can think of is that maybe I accidentally clicked on some button in Visual Studio without realizing it, and that changed some setting so that now it doesn't work? Is there actually anything like that in the Visual Studio interface? There are just so many buttons and menus in Visual Studio that I don't understand the function of.

UPDATE: Okay, I used one of my backups, and copied the code and the "Data" folder (where I keep all the media files) to the back up folder. So all of the media files (just .x files for now) and the code itself are from the latest version (the one that doesn't work but should), but the "project" files that Visual Studio creates are all from the backup. All of this still crashed. So that means it has to be the code itself, and not some setting in Visual Studio. But I've looked over the code countless times, and I can't find anything that could cause a crash like this! What the hell is going on?

Hail to the king baby
I love Evil Dead.
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 23rd Jun 2011 09:50 Edited at: 23rd Jun 2011 09:52


make it



it's getting random value and so your switch statement will just break

Lord Herakles the Great
13
Years of Service
User Offline
Joined: 24th Mar 2011
Location:
Posted: 24th Jun 2011 07:55
Thanks for the reply. The switch has always worked perfectly fine previously, but I made Game_Mode = 0 like you said anyway. It didn't fix the crash, but thanks for taking the time to look through my code.

Hail to the king baby
I love Evil Dead.
Hassan
15
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 24th Jun 2011 13:50
then just do what i said above and see how your program flows, you will probably figure it out

Lord Herakles the Great
13
Years of Service
User Offline
Joined: 24th Mar 2011
Location:
Posted: 25th Jun 2011 06:58
I fixed it! I changed this:



to this:



and that fixed it. It seems that the nastiest bugs are almost always caused by the most trivial things.

Hail to the king baby
I love Evil Dead.

Login to post a reply

Server time is: 2024-05-22 11:03:22
Your offset time is: 2024-05-22 11:03:22