Crash to desktop when changing layouts

This forum is currently in read-only mode.
From the Asset Store
Minimalist Crash Balls is a game where the goal is to hit the ball on the portal, with 20 different levels :)
  • So I did a quick search through the latest forum topics, and then looked at the bugtracker, and it seems like someone else had an issue that seems similar to mine: sourceforge.net/tracker

    To put it simply, changing between two layouts more than once during a game causes it to crash. If I go from the menu layout to the game layout, then back to the menu, then back to the game, it crashes to desktop with a generic application error.

    I have had this error in two of my games so far, Griddy RPG and my new project Griddy Heroes. I solved it in my first game by simply making it impossible to go back to the menu after the game had started. However, in this new game, changing between layouts will become unavoidable, so I will need to fix it properly.

    Here is my .cap and a compiled executable: http://solidfiles.com/d/f7e38098b3/

    To reproduce the error, do the following steps:

    1. Click any of the menu buttons to get to the battle layout

    2. Press Escape to go back to the menu

    3. Click another menu button to get to the battle layout

    4. Move a few steps with the arrow keys.

    The game then crashes.

    I have updated my Construct installation with the latest build (r2) and I am still experiencing the issue. I'll need some advice to be able to continue my game project.

    Are there any workarounds? Any settings I could change to make it not crash when repeatedly changing layouts? Is anything wrong with my event sheet?

    Construct 2 costs so much money, I'm not sure if I can switch to it in my current situation...

  • can you tell me which event numbers are actually involved in moving the units, please? I ran it once, and switched back and forth like 20 times moving the guy each time and nothing. Every time I've ran it since, it crashes as you said it would

  • Events related to moving units are found in the "Move Units" category of the BattleEvents sheet. Collision testing is also performed, found in the "Collision Test" category, with each step that units take.

    These are the event numbers:

    45-58: Unit movement

    59-68: Collision testing

    Event number 55 is the most important event, because it is the one that actually moves the units after all the related tasks are done.

    If needed, I can produce a more simple cap with only those most important events to test this error.

    Thank you very much for looking into this.

  • no problem, and if you can reproduce the error on a smaller cap, that would be very helpful.

  • I created a smaller cap with only the movement events, and strangely enough, it does not seem to trigger the error. I have been careful to design the movement in exactly the same way as my previous example, and yet the results are different.

    I think there may be an issue with the previous cap because it was originally made in an earlier Construct build. I upgraded to the latest build while the game was being developed. To test my theory, I'm going to completely rewrite the components of the game in this new cap and see if the error is still occuring. I'll make backups during this process just in case some part of the game starts triggering it.

    Anyway, the game is fairly large (117 events) so this will probably take me a few days.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I got the same crash when i tried to open the game for a second time.It's a ntdll.dll error.I got this crash on winxp and win7.

  • It seems to be the DEP data execution prevention stuff from windows that causes the game to crash.When i turned it off for that particular game i did not get any crashes at all.

  • It is crashing because you are using the OR condition, it's buggy. It often causes crashes when used with layout changes. I removed the OR conditions from your cap and it did not crash any more.

    Edit:

    I've looked at the source for the OR condition before and wasn't able to fully understand how it works. Which was mainly because it is spread though out the core event engine code.

  • Ah, so the solution is simply to rewrite those events that have the OR condition? That's a relief. In that case, I can easily work around the bug.

    I'm going to make those changes to my game now and see if it is fixed on my end.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)