1

I'm working on a game for iOS, and to start a new game the following steps are followed:

  1. The user choose the number of pieces
  2. Each piece is created through a loop
  3. The game starts

On the simulator I can choose as many pieces as I want, and start as many games as I want, and the app is working fine.

But on a real device (my new iPad 3), the app crashes if I choose more than 400 pieces, and also if I start (say) 3 games with 150 pieces each. I've checked with breakpoints, it crashes in different lines: sometimes creating a piece, sometimes even after the game started. Unfortunately the console is not telling me anything.

I checked the app with instruments: there are not leaks at all, and the total allocation size is at most 4 MB. And I'm logging in didReceiveMemoryWarning in my AppDelegate, but it looks like it is never called.

My question is: how should I behave to debug this? How can I understand what the computational/memory limits of a iOS device are?

Abramodj
  • 5,709
  • 9
  • 49
  • 75
  • 1
    There is a post here which has code that determines available RAM: http://stackoverflow.com/questions/5012886/knowing-available-ram-on-an-ios-device – ThomasW Apr 28 '12 at 11:22
  • Chances are, this is a different type of problem, possibly multiple problems. You should probably try to isolate it to try to determine what it is. – ThomasW Apr 28 '12 at 11:23

1 Answers1

0

If using too much memory is causing you this problem then try a NSLog in didReciveMemoryWarning. As for the memory limit I already saw a few posts here. How much memory does iOS allow apps to use? or Max application memory Limit in iPad? or iOS memory allocation - how much memory can be used in an application? And I think I can find a few more :)

Community
  • 1
  • 1
Majster
  • 3,611
  • 5
  • 38
  • 60