GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

My final level crashes on my iPhone. (possible memory leak)

silverducksilverduck Posts: 20Member, PRO
My final level contains 194 actors called "shrapnel." Clearly, they are the reason why the level is crashing. The only ways I seem to be able to prevent this is either by reducing the number of shrapnel to 50~ (ruining the level) or by setting shrapnel to be a non-moveable actor (ruining the whole game).

What's interesting though is that the game doesn't chug at all before it crashes. The framerate is just fine until about 8 seconds go by. Then it freezes and crashes altogether. Reducing the number of shrapnel extends the time it takes to crash but makes no difference to the framerate. Whether I interact with the shrapnel or just sit still makes no difference to either the framerate or the time it takes to freeze (I think). If I sit still and just wait, the only logic the shrapnel are performing is checking 5 booleans and whether or not their linear or angular velocity is still zero.

Also interesting, other levels had this problem earlier, before I changed the whole project from iPhone Landscape (Legacy) to regular iPhone Landscape. Updating to regular iPhone Landscape seems to have stopped other levels from freezing (or at least extended the time it takes to freeze further than I have seen). There have been no crashes while playing on the simulator on my macbook.

The obvious solution is simply to scrap the level and finish the game in a much less spectacular manner, but if this is actually the result of some bug within Gamesalad that could be fixed in the near future, that would be preferable. Even better, if there was some minor, seemingly unrelated detail I could change to make this work, I would probably do a quick dance. The shrapnel actors have no image yet. They are simply tinted grey.

Thank you for reading this far,

-Greg
This discussion has been closed.