我正在开发myApp中的问题。我正在使用CCSpriteSheet来处理在屏幕上移动的对象,这些对象随机移动,并在一段时间后从屏幕上移除。崩溃通常发生在当很多物体进入和移除时状态很重时,而且它是完全随机的。我在代码中没有任何泄漏,出现的情况通常很少,但是在它出现时会增加。任何形式的帮助将不胜感激。
我使用的是Cocos2d v 0.99.4 / 0.99.5rc0,Xcode SDK:4.0 / 4.1
CRASH:
Exception Type: EXC_BAD_ACCESS (SIGBUS)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00000004
Crashed Thread: 0
Thread 0 Crashed:
0 IMGSGX535GLDriver 0x0001f462 glrRenderVertexArray + 406
1 GLEngine 0x0002c138 gleExecuteVertexArrayRange + 100
2 GLEngine 0x0002db0a glDrawElements_ACC_Exec + 270
3 OpenGLES 0x00003334 glDrawElements + 32
4 myApp 0x000cfca6 -[CCTextureAtlas drawNumberOfQuads:] (CCTextureAtlas.m:306)
5 myApp 0x000cf560 -[CCTextureAtlas drawQuads] (CCTextureAtlas.m:277)
6 myApp 0x000cdb42 -[CCSpriteSheet draw] (CCSpriteSheet.m:291)
7 myApp 0x000cd9ee -[CCSpriteSheet visit] (CCSpriteSheet.m:147)
8 myApp 0x000b97c2 -[CCNode visit] (CCNode.m:486)
9 myApp 0x00062e3c -[myAppGameLayer visit] (myAppGameLayer.m:38)
10 myApp 0x000b97c2 -[CCNode visit] (CCNode.m:486)
11 myApp 0x000a7c96 -[CCDirector drawScene] (CCDirector.m:253)
12 myApp 0x000a673e -[CCDisplayLinkDirector preMainLoop:] (CCDirector.m:1212)
13 QuartzCore 0x000926fc CA::Display::DisplayLink::dispatch(unsigned long long, unsigned long long) + 144
14 QuartzCore 0x00092820 CA::Display::IOMFBDisplayLink::callback(__IOMobileFramebuffer*, unsigned long long, unsigned long long, unsigned long long, void*) + 44
15 IOMobileFramebuffer 0x00001bf4 IOMobileFramebufferVsyncNotifyFunc + 68
16 ??? 0x35079040 0 + 889688128
17 CoreFoundation 0x0003d30c __CFMachPortPerform + 204
18 CoreFoundation 0x00034cdc __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 20
19 CoreFoundation 0x00034ca0 __CFRunLoopDoSource1 + 160
20 CoreFoundation 0x00027566 __CFRunLoopRun + 514
21 CoreFoundation 0x00027270 CFRunLoopRunSpecific + 224
22 CoreFoundation 0x00027178 CFRunLoopRunInMode + 52
23 GraphicsServices 0x000045ec GSEventRunModal + 108
24 GraphicsServices 0x00004698 GSEventRun + 56
25 UIKit 0x0000411c -[UIApplication _run] + 396
26 UIKit 0x00002128 UIApplicationMain + 664
27 myApp 0x00002904 main (main.m:13)
28 myApp 0x000028a8 start + 44
答案 0 :(得分:1)
您似乎正在引用已发布的对象。