Crash to desktop when changing layouts

For questions about using Classic.

Post » Wed Feb 08, 2012 1:09 am

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: http://sourceforge.net/tracker/?func=detail&aid=3391443&group_id=207820&atid=1003219

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...Nillo2012-02-08 01:11:15
B
4
S
1
G
6
Posts: 28
Reputation: 2,056

Post » Wed Feb 08, 2012 1:24 pm

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
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Feb 08, 2012 1:43 pm

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.
B
4
S
1
G
6
Posts: 28
Reputation: 2,056

Post » Wed Feb 08, 2012 2:33 pm

no problem, and if you can reproduce the error on a smaller cap, that would be very helpful.
Spriter Dev
B
87
S
21
G
12
Posts: 3,240
Reputation: 16,461

Post » Wed Feb 08, 2012 8:10 pm

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.
B
4
S
1
G
6
Posts: 28
Reputation: 2,056

Post » Wed Feb 08, 2012 8:49 pm

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.
B
22
S
3
G
6
Posts: 1,356
Reputation: 7,141

Post » Wed Feb 08, 2012 9:12 pm

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.
B
22
S
3
G
6
Posts: 1,356
Reputation: 7,141

Post » Wed Feb 08, 2012 10:43 pm

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.R0J0hound2012-02-08 22:57:55
B
79
S
24
G
54
Posts: 4,743
Reputation: 40,749

Post » Wed Feb 08, 2012 11:10 pm

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.
B
4
S
1
G
6
Posts: 28
Reputation: 2,056


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests