I'm newbie here and iphone app dev. Sometimes I see this error & app crash on running my app by simulator. xcode 4.4.1 , Mountain Lion, iOS 5.1 used.
I guess it's running time dependent error because it occurs after running the app a few sec(over 30s) later. How can I detect and fix this?
thank you for your attention.
hm..I can't upload my capture image
Thread 1
0 0x0eae45e6
7 glDrawElements
8 -[CCTextureAtlas drawNumberOfQuads..
9 -[CCTextureAtlas drawQuads]
10 -[CCSpriteBatchNode draw]
11 -[CCTMXLayer draw]
12 -[CCSpriteBatchNode visit]
13 -[CCNode visit]
14 -[CCNode visit]
15 -[CCNode visit]
16 -[CCDirectorIOS drawScene]
17 -[CCDirectorDisplayLink mainLoop:]
18 CA::Display::DisplayLink::dispatch(...
27 UIApplicationMain
28 main
29 start
editor window error
0xeae45e6: movaps %xmm4, -2472(%ebp) <<<<<
Thread 1: EXC_???(11)(code=0, subcode=0x0)
0xeae45ed: movaps 64(%edi), %xmm4
0xeae45f1: movaps %xmm4, %xmm5
0xeae45f4: mulps %xmm1, %xmm5
0xeae45f7: addps 64(%eax), %xmm5
0xeae45fb: movaps %xmm5, -2456(%ebp)
0xeae4602: movaps %xmm5, %xmm6
I would say it's a memory problem:
Somewhere in your code you could be corrupting memory - check those places where you access arrays (for out of bounds reading), create formatted strings, release objects.
Try using instruments and check memory - maybe you are leaking it very quickly somewhere else.
I was getting this exact EXC_??? (11) error pretty consistently.
In my case it was multithreading coding error - one of the class members accessed on one thread was also modified (init... release...) by another thread. This means that the code was accessing an instance that was already released or completely recreated.
So adding @synchronized where applicable fixed the error.
Goto CCDirector or, CCDirectoriOS whichever you are using.. and just add
@implementation CCDirectorDisplayLink
-(void) mainLoop:(id)sender
{
if(displayLink_)//Crash fix
[self drawScene];
}
It should fix the crash..
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With