求大神支招 Assertion failed: (0), function copyWithZone

http://blog.csdn.net/akof1314/article/details/8572546
参照这个博文写了一个demo 但是总是crash 是什么原因

(lldb) bt

  • thread #1: tid = 0x1c03, 0x9a4caa6a libsystem_kernel.dylib__pthread_kill + 10, stop reason = signal SIGABRT frame #0: 0x9a4caa6a libsystem_kernel.dylib__pthread_kill + 10
    frame #1: 0x98023b2f libsystem_c.dylibpthread_kill + 101 frame #2: 0x0265a57b libsystem_sim_c.dylibabort + 140
    frame #3: 0x0263c286 libsystem_sim_c.dylib__assert_rtn + 267 frame #4: 0x0005abf6 PompaDoridcocos2d::CCCopying::copyWithZone(this=0x081934b0, pZone=0x081bddc0) + 134 at CCObject.cpp:36
    frame #5: 0x001c616d PompaDoridSimpleDPad::updateDirectionForTouchLocation(this=0x081bddc0, location=0xbfffdb00) + 1357 at SimpleDPad.cpp:162 frame #6: 0x001c5ba1 PompaDoridSimpleDPad::ccTouchBegan(this=0x081bddc0, pTouch=0x084b2e40, pEvent=0x00000000) + 241 at SimpleDPad.cpp:96
    frame #7: 0x001c61b6 PompaDorid_ZThn436_N10SimpleDPad12ccTouchBeganEPN7cocos2d7CCTouchEPNS0_7CCEventE(this=0x081bdf74, pTouch=0x084b2e40, pEvent=0x00000000) + 54 at SimpleDPad.cpp:103 frame #8: 0x001272ed PompaDoridcocos2d::CCTouchDispatcher::touches(this=0x09c79060, pTouches=0xbfffdd20, pEvent=0x00000000, uIndex=0) + 797 at CCTouchDispatcher.cpp:359
    frame #9: 0x00127972 PompaDoridcocos2d::CCTouchDispatcher::touchesBegan(this=0x09c79060, touches=0xbfffdd20, pEvent=0x00000000) + 82 at CCTouchDispatcher.cpp:491 frame #10: 0x001279b6 PompaDorid_ZThn20_N7cocos2d17CCTouchDispatcher12touchesBeganEPNS_5CCSetEPNS_7CCEventE(this=0x09c79074, touches=0xbfffdd20, pEvent=0x00000000) + 54 at CCTouchDispatcher.cpp:493
    frame #11: 0x000b63dc PompaDoridcocos2d::CCEGLViewProtocol::handleTouchesBegin(this=0x00430e70, num=1, ids=0xbfffdeb0, xs=0xbfffde88, ys=0xbfffde60) + 716 at CCEGLViewProtocol.cpp:238 frame #12: 0x000c8077 PompaDorid-(self=0x08478a70, _cmd=0x016440c9, touches=0x09aad570, event=0x09c77d20) + 1111 at EAGLView.mm:413
    frame #13: 0x010d7b1d UIKit- + 380 frame #14: 0x010d7f02 UIKit- + 273
    frame #15: 0x010b5d4a UIKit- + 436 frame #16: 0x010a7698 UIKit_UIApplicationHandleEvent + 9874
    frame #17: 0x03361df9 GraphicsServices_PurpleEventCallback + 339 frame #18: 0x03361ad0 GraphicsServicesPurpleEventCallback + 46
    frame #19: 0x0293cbf5 CoreFoundation__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53 frame #20: 0x0293c962 CoreFoundation__CFRunLoopDoSource1 + 146
    frame #21: 0x0296dbb6 CoreFoundation__CFRunLoopRun + 2118 frame #22: 0x0296cf44 CoreFoundationCFRunLoopRunSpecific + 276
    frame #23: 0x0296ce1b CoreFoundationCFRunLoopRunInMode + 123 frame #24: 0x033607e3 GraphicsServicesGSEventRunModal + 88
    frame #25: 0x03360668 GraphicsServicesGSEventRun + 104 frame #26: 0x010a4ffc UIKitUIApplicationMain + 1211
    frame #27: 0x000031f6 PompaDorid`main(argc=1, argv=0xbffff358) + 134 at main.m:14