cocos / cocos-engine

Cocos simplifies game creation and distribution with Cocos Creator, a free, open-source, cross-platform game engine. Empowering millions of developers to create high-performance, engaging 2D/3D games and instant web entertainment.
https://www.cocos.com/en/creator
Other
8.22k stars 1.94k forks source link

[iOS][3.8.0] crashing randomly when play audio sound #15888

Open dnva89 opened 1 year ago

dnva89 commented 1 year ago

Cocos Creator version

3.8.0

System information

14.6

Issue description

Hello, i'm testing cocos v3.8.0 and my game is crashing randomly with this log:

Screenshot 2023-08-07 at 1 43 35 PM

Do you have any suggestion how to debug & fix it ?

Relevant error log output

No response

Steps to reproduce

Play audio file on iOS

Minimal reproduction project

No response

dumganhar commented 1 year ago

https://github.com/cocos2d/cocos2d-x/issues/18597

bofeng-song commented 1 year ago

@dnva89 Could you upload a reproducible demo?

dnva89 commented 1 year ago

@bofeng-song @dumganhar sorry i can't provide the test, the crashing occurs randomly in our game, can't be reproduced 100%. We don't see this issue on our last cocos (v3.4.2)

dumganhar commented 1 year ago

@dnva89 good to know that, you could probably revert c++ code of audio module to v3.4.2. We will try to figure out the difference between v3.4.2 and v3.8.0. Thanks for your feedback.

bofeng-song commented 1 year ago

@dnva89 Please try this code at line 107 if (sourceState == AL_PLAYING || sourceState == AL_PAUSED) {