cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.25k stars 7.06k forks source link

swapBuffers on ios 11 #18510

Open deguilardi opened 6 years ago

deguilardi commented 6 years ago

Steps to Reproduce: Happens on ios 11 only This error is being caught by crashlytics, I don't know what exactly is causing it. It is happening on ALL my apps.

Link to the crashlytics full report: http://crashes.to/s/c049fb56d08

EricDDK commented 6 years ago

I have the same crash in my apps . IOS 11+ occupy 90 percents

EricDDK commented 6 years ago

My measures is add Director::getInstance()->stopAnimation() and Director::getInstance()->startAnimation(); in applicationDidEnterBackground and applicationWillEnterForeground func , but I haven't update . so I do not know how effective it is。

dumganhar commented 6 years ago
screen shot 2017-12-08 at 10 32 24

I notice that there is a line MyDelegate.swift line 18 which is a swift source code. It doesn't belong to cocos2d-x source code. So you modified some thing right? Could you reproduce this bug on your iOS 11 devices?

deguilardi commented 6 years ago

Actually a lot of random crashes will also trigger this error. The MyDelegate is nothing more than the delegate of the app (where the app starts from). To you guys have an idea, I could reduce this error rate by 50% when I applied the following patch: https://github.com/cocos2d/cocos2d-x/commit/25c240391c4fe2e28eb88ce6ea1dde99f013d7ad#diff-4e41f257e5233b8a616f60b0d86b5af8

Because of that missing colon, the app was crashing right there and it was a nightmare to figure it out. But anyways, there are still random things triggering this error.

shaniamjad commented 6 years ago

Guys, any update on fixing this crash? I am having a similar crash on crashlytics for my app as well.

screen shot 2018-05-31 at 12 21 48 pm
umair6 commented 5 years ago

Any update on this crash? Facing this crash in my games too.

qoozta commented 5 years ago

This crash is getting a serious trend in our app, especially after iOS 12, any idea?

EricDDK commented 5 years ago

This crash is getting a serious trend in our app, especially after iOS 12, any idea?

update the engine to 3.17.1

xubing commented 5 years ago

This crash is getting a serious trend in our app, especially after iOS 12, any idea?

update the engine to 3.17.1

I don't think it's a good idea.. Maybe there is the same crash in the latest version. I met this crash, I move some third sdk initial after the game start, the crash disappear.

umair6 commented 5 years ago

@xubing Can you please elaborate your solution a bit? Which SDK you moved from start?

deguilardi commented 4 years ago

This error is trending like never before. Any updates?

minggo commented 4 years ago

May be should update doCaller in CCDirectorCaller-ios.mm as latest v3 codes

https://github.com/cocos2d/cocos2d-x/blob/a96ff32987dd676ad064b09e7dbf71a615dceb9d/cocos/platform/ios/CCDirectorCaller-ios.mm#L142-L145

deguilardi commented 4 years ago

Well, I can't recompile cocos libs as I am still getting the error https://github.com/cocos2d/cocos2d-x/issues/18667 opened almost two years ago.