粒子系统 偶尔会出问题 直接报EXC_BAD_ACCESS coco2d 3.06版本哪位大神遇到过?

Xcode 崩溃纪录 不是总出 偶尔出一次 !!!

0 libsystem_malloc.dylib 0x0000000198531cc4 small_malloc_from_free_list + 668
1 libsystem_malloc.dylib 0x000000019852db2c szone_malloc_should_clear + 1792
2 libsystem_malloc.dylib 0x000000019852db2c szone_malloc_should_clear + 1792
3 libsystem_malloc.dylib 0x000000019852d3e0 malloc_zone_malloc + 112
4 libsystem_malloc.dylib 0x0000000198531a00 malloc + 52
5 libc++.1.dylib 0x00000001974f22dc operator new(unsigned long) + 36
6 libc++.1.dylib 0x00000001974f2328 operator new(unsigned long, std::nothrow_t const&) + 8
7 BeginGame iOS 0x00000001002585d8 cocos2d::ParticleExplosion::create() (CCParticleExamples.cpp:812)
cocos2d::ParticleExplosion::create() (CCParticleExamples.cpp:812)
8 BeginGame iOS 0x00000001000d5380 ParticleDeal::ParticleDoingExplosion(cocos2d::Vec2, ParticleAttribute_T) (ParticleDeal.cpp:120)
9 BeginGame iOS 0x00000001000d49c0 ParticleDeal::ParticleDoing(ParticleType, cocos2d::Vec2, ParticleAttribute_T) (ParticleDeal.cpp:50)
10 BeginGame iOS 0x00000001000daaac GameLevelSence::init()::_0::operator()(cocos2d::PhysicsContact&) const (GameSence.cpp:181) 11 BeginGame iOS 0x00000001000da81c std::__1::__function::__func<GameLevelSence::init()::_0, std::__1::allocatorGameLevelSence::init()::$_0, bool (cocos2d::PhysicsContact&)>::operator()(cocos2d::PhysicsContact&) (functional:1370)
12 BeginGame iOS 0x00000001001312e4 std::__1::function<bool (cocos2d::PhysicsContact&)>::operator()(cocos2d::PhysicsContact&) const (functional:1756)
13 BeginGame iOS 0x000000010012fd44 cocos2d::EventListenerPhysicsContact::onEvent(cocos2d::EventCustom*) (CCPhysicsContact.cpp:214)
14 BeginGame iOS 0x00000001001310e4 cocos2d::EventListenerPhysicsContact::init()::_0::operator()(cocos2d::EventCustom*) const (CCPhysicsContact.cpp:189) 15 BeginGame iOS 0x0000000100130f88 std::__1::__function::__func<cocos2d::EventListenerPhysicsContact::init()::_0, std::__1::allocatorcocos2d::EventListenerPhysicsContact::init()::$_0, void (cocos2d::EventCustom*)>::operator()(cocos2d::EventCustom*&&) (functional:1370)
16 BeginGame iOS 0x00000001002d1e30 std::__1::function<void (cocos2d::EventCustom*)>::operator()(cocos2d::EventCustom*) const (functional:1756)
17 BeginGame iOS 0x00000001002d1c64 cocos2d::EventListenerCustom::init(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::function<void (cocos2d::EventCustom*)> const&)::_0::operator()(cocos2d::Event*) const (CCEventListenerCustom.cpp:58) 18 BeginGame iOS 0x00000001002d1ad4 std::__1::__function::__func<cocos2d::EventListenerCustom::init(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::function<void (cocos2d::EventCustom*)> const&)::_0, std::__1::allocator<cocos2d::EventListenerCustom::init(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::function<void (cocos2d::EventCustom*)> const&)::_0>, void (cocos2d::Event*)>::operator()(cocos2d::Event*&&) (functional:1370) 19 BeginGame iOS 0x00000001002f0280 std::__1::function<void (cocos2d::Event*)>::operator()(cocos2d::Event*) const (functional:1756) 20 BeginGame iOS 0x00000001002e44dc cocos2d::EventDispatcher::dispatchEvent(cocos2d::Event*)::_2::operator()(cocos2d::EventListener*) const (CCEventDispatcher.cpp:813)
21 BeginGame iOS 0x00000001002e4340 std::__1::__function::__func<cocos2d::EventDispatcher::dispatchEvent(cocos2d::Event*)::_2, std::__1::allocator<cocos2d::EventDispatcher::dispatchEvent(cocos2d::Event*)::_2>, bool (cocos2d::EventListener*)>::operator()(cocos2d::EventListener*&&) (functional:1370)
22 BeginGame iOS 0x00000001002e7398 std::__1::function<bool (cocos2d::EventListener*)>::operator()(cocos2d::EventListener*) const (functional:1756)
23 BeginGame iOS 0x00000001002d9cb8 cocos2d::EventDispatcher::dispatchEventToListeners(cocos2d::EventDispatcher::EventListenerVector*, std::__1::function<bool (cocos2d::EventListener*)> const&) (CCEventDispatcher.cpp:757)
24 BeginGame iOS 0x00000001002da078 cocos2d::EventDispatcher::dispatchEvent(cocos2d::Event*) (CCEventDispatcher.cpp:817)
25 BeginGame iOS 0x00000001000e957c cocos2d::PhysicsWorld::collisionBeginCallback(cocos2d::PhysicsContact&) (CCPhysicsWorld.cpp:284)
26 BeginGame iOS 0x00000001000e8880 cocos2d::PhysicsWorldCallback::collisionBeginCallbackFunc(cpArbiter*, cpSpace*, cocos2d::PhysicsWorld*) (CCPhysicsWorld.cpp:111)
27 BeginGame iOS 0x000000010039baa0 cpSpaceCollideShapes + 580
28 BeginGame iOS 0x00000001003960a0 MarkLeaf + 232
29 BeginGame iOS 0x0000000100395f94 MarkSubtree + 32
30 BeginGame iOS 0x0000000100395f94 MarkSubtree + 32
31 BeginGame iOS 0x0000000100395b30 cpBBTreeReindexQuery + 128
32 BeginGame iOS 0x000000010039be6c cpSpaceStep + 332
33 BeginGame iOS 0x00000001000eca48 cocos2d::PhysicsWorld::update(float, bool) (CCPhysicsWorld.cpp:857)
34 BeginGame iOS 0x000000010016f5c8 cocos2d::Director::drawScene() (CCDirector.cpp:292)
35 BeginGame iOS 0x0000000100172b0c cocos2d::DisplayLinkDirector::mainLoop() (CCDirector.cpp:1344)
36 BeginGame iOS 0x0000000100328db4 -[CCDirectorCaller doCaller:] (CCDirectorCaller-ios.mm:110)
37 QuartzCore 0x000000018a6d6234 CA::Display::DisplayLinkItem::dispatch() + 28
38 QuartzCore 0x000000018a6d60cc CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 320
39 IOKit 0x000000018748146c IODispatchCalloutFromCFMessage + 372
40 CoreFoundation 0x0000000186272b0c __CFMachPortPerform + 176
41 CoreFoundation 0x000000018628779c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 52
42 CoreFoundation 0x00000001862876fc __CFRunLoopDoSource1 + 432
43 CoreFoundation 0x000000018628567c __CFRunLoopRun + 1636
44 CoreFoundation 0x00000001861b0f70 CFRunLoopRunSpecific + 392
45 GraphicsServices 0x000000018fad36f8 GSEventRunModal + 164
46 UIKit 0x000000018adb2d90 UIApplicationMain + 1484
47 BeginGame iOS 0x00000001000c397c main (main.m:6)
48 libdyld.dylib 0x00000001983eaa04 start + 0

版本3.11,ios真机运行,粒子100%会出这个问题(release包表现形式为播放粒子动画时游戏卡死,持续一段时间后crash掉),但是奇怪的是在android真机,以及ios模拟器上运行就完全没有问题。这两天我都快被逼疯了。

但是我之前用cocos2d-js 3.4、3.5、3.6.1的时候都一直没有这个问题

粒子效果 我感觉不能一直用 出一次 用完赶紧关掉 之前我用下雪的粒子持续下雪 时间长了偶尔就会出崩溃效果!!
现在关了下雪就好了!

额,我就是用完了关掉的……创建之后仅仅做了一个moveTo,然后就关掉了,应该不是这个问题导致的

如果时间充足, 你可以看一看 粒子系统实现代码,自己稍改一下,改成适合自己的方式 粒子本身带移动的不知道move To会不会影响什么?