Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

EXC_??? (11) (code=0, subcode=0x0

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

like image 875
bureaucoconut Avatar asked Aug 16 '12 13:08

bureaucoconut


3 Answers

I would say it's a memory problem:

  1. 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.

  2. Try using instruments and check memory - maybe you are leaking it very quickly somewhere else.

like image 110
Fszczemton Avatar answered Nov 06 '22 10:11

Fszczemton


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.

like image 2
Vlad Avatar answered Nov 06 '22 12:11

Vlad


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..

like image 1
iphonic Avatar answered Nov 06 '22 12:11

iphonic