Fangames > Game Design

YoSniper's Fangame Contest 2015 *RESULTS*

<< < (16/25) > >>

YoSniper:

--- Quote from: TheGamerGuy500 on May 11, 2015, 03:59:03 PM ---BUT... the random-rare-crash-on-death bug still exists, and I still don't know what causes it so I'm kinda scared. :BibleThump:

--- End quote ---
So is that an instantaneous hard crash (like Windows 8?) Or is it a stall out (like an infinite loop?)

For the former, there is a whole thread dedicated to avoiding Win8-related crashes. For the latter, you'll have to comb through your code. See if you can consistently repeat the issue, and then you may be able to solve it.

TheGamerGuy500:
It is literally random and can happen on any OS, even XP, it doesn't seem to be caused by the code, because there's no way GM code can cause the game to freeze and stop responding forever. Nothing calls game_pause. It seems to happen more after a long time of playing, when the crash can occur, usually by a death or even entering a room. It might be because for some reason the game process memory decays and eventually it can't make do with its memory limit decreasing maybe. It's rare, and doesn't happen often, but if one single crash is a disqualification then I might not have a chance. It sucks to not know something.
I'd need someone who knows GM and windows memory issues that can figure out the single byte that just so happens to corrupt an EXE or something.

klazen108:

--- Quote from: TheGamerGuy500 on May 13, 2015, 03:38:33 PM --- there's no way GM code can cause the game to freeze and stop responding forever.

--- End quote ---


--- Code: ---while 1 {}
--- End code ---

:Kappa:

...on a slightly more helpful note, crashes that happen after a random time period are usually traced back to memory leaks. They can cause unexpected things to happen; for instance, create events stop firing but everything else runs normally (true story). This almost always has to do with improper use of the following: particle systems, lists (or any other ds_ structure), sprite creation/destruction, surfaces, external loading of resources. This is by no means an exhaustive list, but they are the most common causes. If you use anything like those anywhere in your code, I would try commenting them out and trying to run your game again, even if you're sure that there's no way that whatever is happening is related. If it turns out that they are a cause, you can track down the culprit and then try to apply a better solution than simply commenting it out.

YoSniper:

--- Quote from: TheGamerGuy500 on May 13, 2015, 03:38:33 PM ---It's rare, and doesn't happen often, but if one single crash is a disqualification then I might not have a chance. It sucks to not know something.
--- End quote ---
I will be sure to elaborate on this rule. I don't think any games will be outright disqualified for a single rule violation this time around (like last year,) but if crashes do happen, it will most certainly affect your score in the long run.

Basically, if a judge decides that a game is "disqialified" then they just won't vote for it.

I'm trying not to scare anyone off.

But do look into your code. A while loop that tirns out to be infinite is most likely the cause of your issue. I know it would be a lot of work, but a debugging technique you might want to try is something like this for while loops:


--- Code: ---var loopcount, MAXLOOPS;
MAXLOOPS = 100;
loopcount =0;
while (conditions) and loopcount < MAXLOOP {
    //your code like normal
    loopcount += 1;
}
if loopcount == MAXLOOP {
    show_message ("infinite loop encountered");
}
--- End code ---

TheGamerGuy500:

--- Quote from: YoSniper on May 13, 2015, 04:07:39 PM ---
--- Quote from: TheGamerGuy500 on May 13, 2015, 03:38:33 PM ---It's rare, and doesn't happen often, but if one single crash is a disqualification then I might not have a chance. It sucks to not know something.
--- End quote ---
I will be sure to elaborate on this rule. I don't think any games will be outright disqualified for a single rule violation this time around (like last year,) but if crashes do happen, it will most certainly affect your score in the long run.

Basically, if a judge decides that a game is "disqialified" then they just won't vote for it.

I'm trying not to scare anyone off.

But do look into your code. A while loop that tirns out to be infinite is most likely the cause of your issue. I know it would be a lot of work, but a debugging technique you might want to try is something like this for while loops:


--- Code: ---var loopcount, MAXLOOPS;
MAXLOOPS = 100;
loopcount =0;
while (conditions) and loopcount < MAXLOOP {
    //your code like normal
    loopcount += 1;
}
if loopcount == MAXLOOP {
    show_message ("infinite loop encountered");
}
--- End code ---

--- End quote ---

Here's the thing. I don't use 'while' anywhere unless it's part of the engine.
About how it could be tailored to some of Klazen's mentioned problems: I do use a particle system but the crash still happened in I Wanna Be Gaming (my first game) before I had GM pro which would ALLOW for particles.
I was thinking sprite creation might cause it since death blood is a sprite.
BUT on even rarer occasion just switching a room can cause it.
It could be because I run GameMaker through Windows Emulation on a mac since I'm stuck with this Macintosh.
Can't let having a Shart-Garbo Mac stop me from making a game, right? :atkCry:

Anyway, I still think I need someone who knows how Windows memory works, because the crash can even happen on my windows emulation.
The emulation software hasn't failed me very much in terms of file creation. Hell, it can even run the game at full speed 50FPS, at least for a while. Literally everything works almost exactly how GM would work on another computer.
I'd suggest getting WhatIsHang or some other Hang-debugger and finding out the issue.
This emulation software doesn't run everything but GM is one of the things that CAN operate flawlessly under it.
The question still sits, if I don't use any code with 'while' in it what could cause an infinite loop at random?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version