反复停止播放,开始播放音效卡死

  • Creator 版本: 2.4.5

  • 目标平台: Android

  • 重现方式:反复停止播放开始播放,同时进行

  • 首个报错: 2023-04-27 10:42:45.585 3040-3214/? D/: PlayerBase::PlayerBase()
    2023-04-27 10:42:45.585 3040-3214/? D/: TrackPlayerBase::TrackPlayerBase()
    2023-04-27 10:42:45.618 3040-5457/? E/libOpenSLES: frameworks/wilhelm/src/android/AudioPlayer_to_android.cpp:886: pthread_mutex_lock_timeout_np returned 110
    2023-04-27 10:42:45.638 3040-5457/? E/libOpenSLES: frameworks/wilhelm/src/android/AudioPlayer_to_android.cpp:886: pthread_mutex_lock_timeout_np returned 110
    2023-04-27 10:42:45.668 3040-5457/? I/chatty: uid=11221(com.cocos.test2) ALooper identical 1 line
    2023-04-27 10:42:45.710 3040-5457/? E/libOpenSLES: frameworks/wilhelm/src/android/AudioPlayer_to_android.cpp:886: pthread_mutex_lock_timeout_np returned 110
    2023-04-27 10:42:45.760 3040-5457/? E/libOpenSLES: frameworks/wilhelm/src/android/AudioPlayer_to_android.cpp:886: pthread_mutex_lock_timeout_np returned 110
    2023-04-27 10:42:45.861 3040-5457/? E/libOpenSLES: frameworks/wilhelm/src/android/AudioPlayer_to_android.cpp:886: pthread_mutex_lock_timeout_np returned 110
    2023-04-27 10:42:45.861 3040-5457/? W/libOpenSLES: frameworks/wilhelm/src/android/AudioPlayer_to_android.cpp:886: pthread 0x76c0801d50 (tid 5457) sees object 0x767a347800 was locked by pthread 0x76bcdfbd50 (tid 3214) at frameworks/wilhelm/src/itf/IObject.cpp:411
    2023-04-27 10:42:50.403 5723-5466/? E/memtrack: Couldn’t load memtrack module

  • 之前哪个版本是正常的:

  • 手机型号:

  • 手机浏览器:

  • 编辑器操作系统:

  • 重现概率:

没人回答就尴尬了,你不是第一个问这个的:joy:

额, 那就尴尬了.

我也碰到过,播放音乐后立即停止播放,Android端概率发生线程锁死
参考解决方案 反复调用cc.audioEngine.playMusic和cc.audioEngine.stopMusic安卓上闪退

1赞

感谢大佬…