Dirty memory causing crashes?

New releases and general discussions.

Post » Tue Aug 10, 2010 7:57 pm

I encountered an odd crash in my game. Odd because it won't crash until another crash happens first. A programmer I know mentioned something about "dirty memory" that can be leftover from a crashed application. I've confirmed that after crashing, if I load up tons of applications then run it again, it doesn't crash. It does sound like what he was talking about. If it is indeed dirty memory causing crashes, would it be difficult to make the runtime clear memory of before using it?
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,422

Post » Tue Aug 10, 2010 8:53 pm

What OS are you using? WinXP?
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Tue Aug 10, 2010 8:55 pm

Can you reliably reproduce either crash? That's always the key. Memory bugs can cause sporadic crashes depending on what's left behind in memory - usually showing up as "sometimes it crashes, sometimes it doesn't". They're particularly tricky to track down!
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Tue Aug 10, 2010 9:32 pm

Yep. Happens the same way every time.

There are two crashes, going through this procedure happens the same way each time:

I preview in construct or run the exported game (tried it both ways), try crash number one, it doesn't crash. Restart, try crash number two (which crashes every time), it crashes. Restart, try crash number one again, it crashes. Crash number one will continually happen as I restart and try again. After crash number one has happened, if I load up a whole bunch of applications then rerun the game, crash number one does not happen again until crash number two happens and I restart the process.

Vista, btw.
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,422

Post » Tue Aug 10, 2010 10:06 pm

hmm could be some uninitialized variables.

I think you should track this bug, post the .cap and put that same explanation as the description.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Tue Aug 10, 2010 10:18 pm

The .cap is like 23 MB with 7000 events. :/ That's why I haven't posted it already. If I try to narrow it down, it stops crashing. There's so much stuff in my game and it takes so long to check that it could literally take me weeks to get a .cap of small enough to post that still replicates the behavior. I guess it probably won't be much help for finding that bug then. :(
Moderator
B
88
S
32
G
33
Posts: 3,005
Reputation: 27,422


Return to Construct Classic Discussion

Who is online

Users browsing this forum: No registered users and 4 guests