Hello,
I am making game using cocos 2D. My application is crashed after sometime in iPod. I used Accelerometer in game. Pls help me to solve this problem.
Thanks in advance.
A fast, easy to use, free, and community supported 2D game engine
Hello,
I am making game using cocos 2D. My application is crashed after sometime in iPod. I used Accelerometer in game. Pls help me to solve this problem.
Thanks in advance.
If you run your game from Xcode using "Build and Run," press the small "GDB" button in your main Xcode window to see the debug information. This usually will make finding your crashes easier.
I think we need a little more information!
I am getting a crash as well when I enable or disable the accelerometer. I use this call:
[self setIsAccelerometerEnabled:YES];
But it crashes with a Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSCFArray objectAtIndex:]: index (0) beyond bounds (0)'
I had a problem when I started using the accelerometer. When I released my control layer, the accelerometer was trying to send information to the accelerometerDidAcc.... method. In my control layer's dealloc method, I added accObject.delegate=nil and it stopped crashing. This might be what your problem is.
@gametest Im guessing that english isnt your first language and Im very sympathetic to the difficulties of learning cocos and explaining oyurself in a non-native language.
But your post is a good example of the types of posts that are just unanswerable. Sure maybe someone will guess at what the problem is. But if you actually want an answer:
Create a small project example which shows your crash - include only the code necessary to show off the crash.
Post the backtrack of your crash.
Explain where in your code and what it was doing when you crashed.
You must log in to post.