axmol: Android Crash 2

  • axmol version:
  • devices test on:
  • developing environments
    • NDK version: r19c
    • Xcode version: 12.4
    • Visual Studio:
      • VS version: 2019 (16.11), 2022 (17.4)
      • MSVC version: 1929, 1934
      • Windows SDK version: 10.0.22621.0
    • cmake version: Steps to Reproduce:

We have migrated our Match Animal game to Axmol from Cocos2dx V3 latest yesterday. Getting this crash now. How to fix this issue?

terminating with uncaught exception of type al::backend_exception: Failed to stop stream: ErrorClosed

  #00  pc 0x00000000000534d4  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164)
  #01  pc 0x00000000000d1fcc  /data/app/~~KcRhAtDu_ohUoG7_ckyt2Q==/games.spearmint.matchanimal-Yg0b8aD7s5klY_lpCbdbfA==/split_config.arm64_v8a.apk!libc++_shared.so (abort_message+76)
  #02  pc 0x00000000000d2180  /data/app/~~KcRhAtDu_ohUoG7_ckyt2Q==/games.spearmint.matchanimal-Yg0b8aD7s5klY_lpCbdbfA==/split_config.arm64_v8a.apk!libc++_shared.so (demangling_terminate_handler()+62)
  #03  pc 0x00000000000e6e80  /data/app/~~KcRhAtDu_ohUoG7_ckyt2Q==/games.spearmint.matchanimal-Yg0b8aD7s5klY_lpCbdbfA==/split_config.arm64_v8a.apk!libc++_shared.so (std::__terminate(void (*)())+59)
  #04  pc 0x00000000000e6e18  /data/app/~~KcRhAtDu_ohUoG7_ckyt2Q==/games.spearmint.matchanimal-Yg0b8aD7s5klY_lpCbdbfA==/split_config.arm64_v8a.apk!libc++_shared.so (std::terminate()+88)
  #05  pc 0x00000000000986b0  /data/app/~~KcRhAtDu_ohUoG7_ckyt2Q==/games.spearmint.matchanimal-Yg0b8aD7s5klY_lpCbdbfA==/split_config.arm64_v8a.apk!libopenal.so (alcDestroyContext+3423)
  #06  pc 0x000000000068c2b8  /data/app/~~KcRhAtDu_ohUoG7_ckyt2Q==/games.spearmint.matchanimal-Yg0b8aD7s5klY_lpCbdbfA==/split_config.arm64_v8a.apk!libMatchAnimal.so (ax::AudioEngineImpl::~AudioEngineImpl()+293)
  #07  pc 0x000000000068c4a0  /data/app/~~KcRhAtDu_ohUoG7_ckyt2Q==/games.spearmint.matchanimal-Yg0b8aD7s5klY_lpCbdbfA==/split_config.arm64_v8a.apk!libMatchAnimal.so (ax::AudioEngineImpl::~AudioEngineImpl()+280)
  #08  pc 0x00000000006868bc  /data/app/~~KcRhAtDu_ohUoG7_ckyt2Q==/games.spearmint.matchanimal-Yg0b8aD7s5klY_lpCbdbfA==/split_config.arm64_v8a.apk!libMatchAnimal.so (ax::AudioEngine::end()+147)
  #09  pc 0x000000000063bc50  /data/app/~~KcRhAtDu_ohUoG7_ckyt2Q==/games.spearmint.matchanimal-Yg0b8aD7s5klY_lpCbdbfA==/split_config.arm64_v8a.apk!libMatchAnimal.so (ax::Director::reset()+977)
  #10  pc 0x000000000063ca08  /data/app/~~KcRhAtDu_ohUoG7_ckyt2Q==/games.spearmint.matchanimal-Yg0b8aD7s5klY_lpCbdbfA==/split_config.arm64_v8a.apk!libMatchAnimal.so (ax::Director::mainLoop()+1044)
  #11  pc 0x000000000004f2e0  /data/dalvik-cache/arm64/data@app@~~KcRhAtDu_ohUoG7_ckyt2Q==@games.spearmint.matchanimal-Yg

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 17 (8 by maintainers)

Most upvoted comments

@halx99 @rh101 @aismann Issue is now resolved after i changed to OpenSL. Thank you for the PR.

I think opensl is enough, but I also create a bugfix PR for openal-soft: https://github.com/kcat/openal-soft/pull/848

@halx99 Using OpenSL, everything is working fine, with no errors or crashes at all. Making and receiving phone calls resulted in this logcat output, which looks normal, with no errors:

2023-05-25 18:37:37.477  6655-6859  localhost.test          com.localhost.test                D  PlayerBase::setVolume() from IPlayer
2023-05-25 18:37:42.083  6655-6655  AxmolActivity           com.localhost.test                D  onPause()
2023-05-25 18:37:42.117  6655-6655  AxmolActivity           com.localhost.test                D  onWindowFocusChanged() hasFocus=false
2023-05-25 18:37:44.167  6655-7826  FA                      com.localhost.test                I  Application backgrounded at: timestamp_millis: 1685003862161
2023-05-25 18:37:44.623  6655-6655  AxmolActivity           com.localhost.test                D  onResume()
2023-05-25 18:37:44.649  6655-6847  OpenGLRenderer          com.localhost.test                E  Unable to match the desired swap behavior.
2023-05-25 18:37:44.651  6655-6857  GLSurfaceView           com.localhost.test                W  Warning, !readyToDraw() but waiting for draw finished! Early reporting draw finished.
2023-05-25 18:37:44.651  6655-6655  SurfaceSyncer           com.localhost.test                E  Failed to find sync for id=1
2023-05-25 18:37:44.678  6655-6655  AxmolActivity           com.localhost.test                D  onWindowFocusChanged() hasFocus=true
2023-05-25 18:37:45.746  6655-6859  localhost.test          com.localhost.test                D  PlayerBase::setVolume() from IPlayer

The app audio worked fine after the phone call terminated. Also, no more audio issues or crashes when using a debugger and breakpoints as described in #1195.