Weird crash

For questions about using Classic.

Post » Tue Mar 23, 2010 6:38 pm

I wrote a boss battle, and at the end I have the screen fade to white and then back in (in order to destroy the boss) and when it gets to the fade to white completing, the runtime crashes ("An error occurred in the runtime and was terminated") about 75% of the time. So I punched it through the debugger, and the crash actually gives me some information:



So I was wondering if this is a Construct bug, or an issue with my code. I'm not quite sure what the error means, except, perhaps that it's trying to operate events on an object that no longer exists. Well, except that there is no "event 0". Can anyone confirm that?

I can't post a cap for public consumption since it's from what will probably become a commercial project, but if the Construct team wants a look, I can privately put it on the tracker.

For the record, this is from Construct 0.99.84, but it's been happening for the last six or seven versions and I've just now given up trying to fix it myself.
B
8
S
3
G
5
Posts: 72
Reputation: 1,774

Post » Tue Mar 23, 2010 10:12 pm

As I recall, there is a crash bug with transitions.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Wed Mar 24, 2010 12:59 am

Except that I'm not using transitions at this point. I basically have a Box object that is solid white, and it is invisible until the boss dies, at which point its opacity increases until it's completely solid and filling the screen. At that point, I destroy the boss objects, the box object fades back out, and the level complete sequence initiates. This all happens within one layout.
B
8
S
3
G
5
Posts: 72
Reputation: 1,774

Post » Wed Mar 24, 2010 2:52 am

Well, that error doesn't say it's the box, but the sprite. So first, check your destroy events, see if there is maybe a conflict or if there is another way you can try.

If it still happens, then yeah you should submit as a bug.
B
2
S
2
G
4
Posts: 156
Reputation: 1,762

Post » Wed Mar 24, 2010 9:26 am

Hmm, maybe it has to do with destroying sprites before doing actions on them in the same tick. Check the ordering in event sheet; if the sprite is destroyed at start of sheet and stuff happens to the same sprite in other events, that may be a problem.

It is just a theory, though. You can try moving the destroy stuff to end of the sheet.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Wed Mar 24, 2010 1:14 pm

Can you reproduce the crash in a blank .cap? That's absolutely crucial. Complicated .caps with lots of objects are far too complicated to debug, so the first thing I do with .caps like that is try to reduce them to the sole problem on its own. It can take a while though.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,478


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 0 guests