axmolengine / axmol

Axmol Engine – A Multi-platform Engine for Desktop, XBOX (UWP) and Mobile games. (A fork of Cocos2d-x-4.0)
https://axmol.dev
MIT License
868 stars 195 forks source link

Bluetooth audio device connected or disconnected on windows will crash. #1779

Closed Sevael closed 6 months ago

Sevael commented 6 months ago

Whenever a Bluetooth audio device is connected or disconnected, the program will crash. it crash on source file hrtf.cpp. Screenshot 2024-04-01 121828

Any idea ? Please help.

halx99 commented 6 months ago

Maybe it's openal-soft issue?

halx99 commented 6 months ago

I can't reproduce this issue

Sevael commented 6 months ago

i can reproduce the issue every time.

  1. make sure the audioengine is using, like playing bgm or sound.
  2. while playing sound, then connected or disconnect the bluetooth audio device.
DelinWorks commented 6 months ago

what device are you using?

halx99 commented 6 months ago

i can reproduce the issue every time.

  1. make sure the audioengine is using, like playing bgm or sound.
  2. while playing sound, then connected or disconnect the bluetooth audio device.

I follow the steps, but still can't reproduce

Sevael commented 6 months ago

I will explain the steps in more detail. When the Bluetooth is disconnected or connected, it will not crash for a short period of time (but sometimes it will crash immediately), but after several operations in connected and disconnected, it will crash in different places. . Screenshot 2024-04-01 173108

My device is an ordinary Bluetooth headset, and I originally thought it would only happen with Windows 11. Later, I tested it on Windows 10 and had the same problem.

It would be really weird if everyone couldn't reproduce it.

halx99 commented 6 months ago

I test several times, but chould'nt reproduce, my device is windows 11 23H2 , and Bluetooth device is Xiaomi Buds 3Pro

Sevael commented 6 months ago

I tried the latest version 2.1.2, and the crash problem was indeed fixed, so I replaced the OpenAL Library with the version I am currently using, and the problem was solved too.

Thanks for everyone's discussion, the Bluetooth problem has been solved.

halx99 commented 6 months ago

strange, the v2.1.0, v2.1.2 using same openal version: 1.23.1-e714c8f (8659)