Crash on iOS with air 3.8 and higher
Hello,
We have an application we are deploying on PC & Mac using the FlashPlayer. We are porting the application on Android and iOS using Air Sdk. The application runs perfectly well in terms of performance. The game runs without any trouble til the end on Android but we are experiencing a crash on iOS.
The crash seems to be related to a memory issue. We profiled the application with Instruments and when the crash appears, the application consumes 90Megs of memory. This is for an iPhone 3GS. On an iPad2, the game crashes similarly around 100Megs of Ram used. The crash log refers to a bad access exception and as we are receiving a lot of low memory warnings, we assume it comes from a malloc that fails.
We obviously don't have any leaks left as the game runs well on all the other platforms. this is especially obvious as the game runs perfectly well on Android with the same sdk. We are rendering in gpu mode. We also tried to switch to cpu without any luck. The garbage collector seems to be triggering well as we can see the live bytes going down regularly depending on the clips being played.
What we don't understand is that the crash log says we are using around 50000 rpages, which corresponds to a total memory of 200Megs (4k per page). This is weird as Instruments tells us the application consumes 90Megs of Ram when the crash occurs.
The only big difference between the iOS and the other platforms is that the swf assets can't be unloaded. Therefore, once loaded, they stay in memory. Still, we tried to use as much movieclip as possible so we can stop them and remove them from the scene when they are not needed. This, to make sure the display data are released as often as possible.
Do you have any kind of advice to solve this issue ? This is becoming quite urgent as the game is finished and this bug prevents us from releasing the master build.
Regards.
