swf/AIR crashing at around 1.5gb memory usage

5 posts (showing 1-5)

Market Level 1Community Level 2
84 posts

So we have a game we're building in AS3, it's 1920x1080 with a lot of bitmaps, so it's using up a lot of memory. There are some memory leak issues that I need to track down and kill, but in the meantime whenever we are demoing the game for an extended period the memory usage eventually creeps up causing the game to typically crash around the 1.5gb mark. What usually happens is it will crash in the BitmapData constructor when attempting to make a new BitmapData. There's usually plenty of system memory to spare.

So generally speaking, is this an obvious known issue that I'm missing here? I was under the impression that the flash player at least will just keep requesting system memory until there is none to give.

Thanks for any insight. 

posted 2015-03-03T10:58:07-08:00

Market Level 6Community Level 3
334 posts

it;s probably java virtual machine limitation. Just fix it, you can't expect to run propertly with that much memory leak anyway.

posted 2015-03-03T11:49:04-08:00

Market Level 3Community Level 10
2184 posts

Possibly Flash will run with that much and more memory, but your game isn’t doing that. Instead it's running out of memory due to a leak and so may be hitting some other limit, such as on the number of objects, graphics memory, pointers etc. Fix the leak(s); you need to at some point and it's clearly making it hard to actually test the game.

And are you sure it's not just out of memory? 1.5GB is a lot of RAM. Even if RAM isn’t physically limited there may be OS limitations, such as 32 bit processes on Windows being limited to 2GB. Once you take into account the overhead of the browser, the Flash runtime 1.5GB may be all that’s available on such a system.

posted 2015-03-04T13:26:30-08:00

FGL AdminCommunity Level 4
285 posts

I would suggest optimisation to reduce the memory usage of your game. 1.5gb of memory is a massive amount for a 2D flash game. Why not target 720p instead of 1080p?

posted 2015-03-08T01:50:48-08:00

Market Level 7Community Level 17
4715 posts

1920x1080 i huge! what are you using for a test device?

posted 2015-03-11T07:27:01-07:00