-
As3 Air/flex Out Of Memory crash for no reason
Okay, I know I kind say 'for no reason' in the title but this is really been driving me up the all.
for some reason, a large-ish project I've been working on (using FlashDevelop IDE) has started to crash in a kinda certain way. It's a game which has various locations, and now, if you swap to a different location, after about 9 times, the cmd window which launchs the air Debugger either reports: "Error: Out of Memory" and FlashDevelop loses a link with the swf OR the flash and command prompt just close.
using Scout, memory useage is well within expected levels and doesn't raise just before a crash. the closest thing I can find to explain the crash is a ReferenceError where for some reason, the bitmaps in memory (the bitmaps are embeded into the swf and called for displaying via using a spritesheet, so it copies sections which are needed) keep bring up this error.
the only information given is:
"ReferenceError
flash.system::ApplicationDomain/hasDefinition
mx.core::BitmapAsset
"
then the name of the bitmap in question (or the embed class) and the function it's being called from. but it does it for everyone. I do use 'getDefinitionByName' in the classes which work on changing the displayed bitmap so I wondered about that but they work fine until they just stop. Most of the time, this appears to be while the location is changing (so data being removed and then new stuff loaded) but traces I put in various stages seam to hint that it errors before it gets that far.
I put the getDefinitionByName calls inside a try/catch to see if i could get an error at the time and stop it from just crashing, but this doesn't appear to work.
So the best I can figure out, it's crashing and claiming out of memory, because something has happened in the memory and the bitmaps there has disappeared, but it's before any call to remove them. I don't think the garbage collector is crapping them for some reason, but at times, it looks like it did run before this error. I still don't quite see why this is claiming out of memory,
However, for some reason, there does seam to be some of this referenceErrors a bit earlier, before the crash happens, so I'm not sure why they are SOMETIMES crashing it, and sometimes now. the project worked a few months ago and I also don't see what has been changed that much to cause this crash.
as I can't get any error to really display anywhere at the point of the crash, it's a huge problem.
I have wondered if the command prompt is claiming out of memory because its a stack overload or something, But I can't remember anyway to find out. Being stuck with 32bit, there is the 4gb limit, but at point of crash, it's using about 1gb it claims. I have tested this on a couple of machines so it's not related to the computer itself, nor does it appear related to being run via the debugger in flashdevelop cause my tester doesn't use it, he just tests the file.
IF need be, I'll allow someone else to look at the files if they can help testing or something, BUT I have to warn you that its adult content (some people get so fussy about that. If you aren't into it, fine, but I don't understand the heat and negative image that is still around).
or I can try to share samples of the code or whatever.
I dont quite understand the 'Runtime Overhead' that scout says either, so while I don't think it's related to the crash, I can't rule it out.
thanks for any help or advice.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|