Game partially crashes (sprites freeze and some actions don't work but others do)

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • What the title says. My game has crashed twice so far, at about 10 and 15 minutes respectively. Either time the effect was:

    1: All sprite animations freeze. (outside of the crash those sprites which are animated loop perpetually without issue)

    2: The main player movement action (D-pad or left control stick) becomes completely unresponsive.

    3: Other actions continues to work, such as abilities, jumping to level select.

    I checked debug and there is no accumulation of objects. It is possible there is some kind of "locked in a loop" happening but wouldn't that jam everything? Meanwhile if it was just something causing the movement action to break that shouldn't affect the sprites. I'm currently testing what happens if it runs indefinitely and it keeps running for 30+ minutes and it hasn't crashed, though keep in mind its a turn-based game so not much new happens in that state other than checking if something should be happening.

    I can look for culprits especially in the most recent code but given the "it works fine for 10-15 minutes" it will be both slow to test, slow to verify, and if its more of a 'straw that broke the camel's back' it might not be due to any specific code but an aggregate. If I knew what was breaking or how to detect it then I could have a better understanding of what might be causing the break.

    Any thoughts on what that might be?

  • You can check the option - "Crash: display last event line" in application properties

    It appears I have that box checked. If a crash happens where will it display said last event line? In the debug box? All I see there are frame number, time, frames per second, sound channels, and whatever object I add.

  • It will display in the middle of the screen
    Please login to see this attachment.

    Good to know. The issue is that whatever is happening my game it isn't a 'hard' crash that brings that up. Some specific things seem to break, including sprite animation. I was hoping that the latter was indicative of a specific error, like maybe memory issues?

    In that regard I took the most time intensive component of the program and had it run 10 times as many loops, but it didn't cause the program to crash. Indeed I got a new high score getting further than ever before.

  • Besides the infinite loop, this may also because of some corner case extension didn't take into account.

    You can check the event viewer, which should record the module name that caused the crash.

    Event viewer? Where is that?

    Though again as far as I can tell its not crashing in the sense of "the program stops working". It is a partial crash. Animations freeze, certain key commands don't respond at all, and others don't work properly like "cancel ability doesn't refund ability cost". But the program continues to run. Indeed I can exit to the level select menu and reenter the level and it works fine.

    Do you have any thoughts on what mechanism could cause all sprite animations to stop working and various other malfunctions but NOT crash the entire program?

    One of my concerns remains that if this is some sort of memory crud buildup issue that its possible new events aren't the cause of the problem but are the straw that broke the camel's back, that accelerated the failure state to happen before a typical level ends... its possible it was always building up to the freeze but I just won/lost levels before it could reach that point.

    Edit: Did some more testing. New objects can spawn and have animation, but some of them just immediately destroy themselves. I also checked that more obvious 'new' culprit wasn't the driver.

  • Event viewer? Where is that?

    Please login to see this link.

    Quote

    Do you have any thoughts on what mechanism could cause all sprite animations to stop working and various other malfunctions but NOT crash the entire program?

    Ultimate full screen: switch from / to full screen may freeze. If extensions uses multi-thread, then this maybe a dead lock. But according to

    Quote

    New objects can spawn and have animation

    Guess it maybe something about control groups disabled and not re-enabled correctly?

  • If I understand correctly won't event viewer only help if its a crash out of the game entirely?

    Please login to see this link.

    Ultimate full screen: switch from / to full screen may freeze. If extensions uses multi-thread, then this maybe a dead lock. But according to[/quote]

    I have Ultimate Full Screen included but it hasn't been active when the game malfunctions.

    Guess it maybe something about control groups disabled and not re-enabled correctly?

    What do you mean by control groups? I don't recognize this terminology with respect to clickteam fusion 2.5, or why it could cause looping animation to stop looping.

    Edit: Checked and even reducing the most time consuming component that runs hundreds of loops many of which have subloops to have 98% fewer loops has no impact.

    • Official Post

    Suggestions:

    - make sure you don't reach the maximum number of objects defined in the Frame properties, try to increase it anyway (maximum is 30,000) as, as far as I remember, this number is used to allocate work buffers at runtime.

    - check the RAM used by the process in the Windows Task Manager, to see if there is a memory leak somewhere.

  • Suggestions:

    - make sure you don't reach the maximum number of objects defined in the Frame properties, try to increase it anyway (maximum is 30,000) as, as far as I remember, this number is used to allocate work buffers at runtime.

    - check the RAM used by the process in the Windows Task Manager, to see if there is a memory leak somewhere.

    Tried increasing objects to maximum. Unfortunately it didn't prevent crash, nor even show signs of slowing it down. Speaking of there is no rhyme or reason as to when it crashes. I've seen it as early as 173 moves and as late as 367 moves.

    Looked at task manager and I'm not seeing any obvious fluctuations before or during the freeze.

    In any case I managed to find the most recent file version to not have the crash issue and will have to work from there.


    Edit: I identified the line of code that caused the problem and why it caused it. It was a line that had "if a board square is 8 or greater, do Loop X for each board square" where Loop X was supposed to set values of 8 to 11 to a value below 8, but it failed to consider the possibility of an atypical event that could set a square to a value of 12 or 13 instead. Which means the first time that atypical event happens it means the loop that is supposed to trigger only once just gets triggered over and over. I'm surprised that this didn't pop up in the Profiler... I guess I would've needed to leave it in the partially frozen state long enough for it to become the dominant time-wasting element of the runtime.

    • Official Post

    Edit: I identified the line of code that caused the problem and why it caused it. It was a line that had "if a board square is 8 or greater, do Loop X for each board square" where Loop X was supposed to set values of 8 to 11 to a value below 8, but it failed to consider the possibility of an atypical event that could set a square to a value of 12 or 13 instead. Which means the first time that atypical event happens it means the loop that is supposed to trigger only once just gets triggered over and over. I'm surprised that this didn't pop up in the Profiler... I guess I would've needed to leave it in the partially frozen state long enough for it to become the dominant time-wasting element of the runtime.

    You can also unselect the "start profiling at start of frame" and use the Start profiling action to run it when you want.

  • If I understand correctly won't event viewer only help if its a crash out of the game entirely?

    Yes, just for info.

    Quote

    What do you mean by control groups? I don't recognize this terminology with respect to clickteam fusion 2.5, or why it could cause looping animation to stop looping.

    E.g., manually pause everything including animation when open menu by disabling event groups, then something went wrong with re-enable logics. That may explain why create new object has looping animation.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!