Open Megamouse opened 2 years ago
I can't reproduce this. Here's what I tried:
cubeb_enumerate_devices(...)
call in this callback (very much like in the snippet).cubeb_enumerate_devices(...);
is called.This works as it should here on macOS 12.5. Maybe it would be possible to get stacks so we can figure out what's going on?
Hi, I'm the user which has the issue in the original post. I tested again on macOS 12.5.1 and the issue only occurs on macOS 13.0 beta. I'm not sure how to provide stacks, should I reproduce the crash on macOS 13 and post the "error report" here?
If you can attach a debugger, and reproduce the crash, it would be amazing, as I don't have macOS 13 beta yet on a machine. It would go like this:
rpcs
build with symbols. Maybe @Megamouse knows what's the best way to get one, or can provide one (short of building it yourself) lldb
. If not, you probably need to install xcode or xcode's additional tools (here I think: https://developer.apple.com/download/all/)rpcs
(probably pgrep rpcs
or ps -ef | grep rpcs
, second number from the left), and do the following: lldb -p <pid>
where <pid>
is the PID of rpcslldb
will return to a command promptbt all
, attach here all the text that's outputInvoking the cubeb APIs from within a cubeb callback is not safe in general, unfortunately. Some combinations of calls/backends may happen to work, but I'd recommend using the device_collection_changed_cb
to signal some other thread to re-enumerate and handle any other stream configuration you need to do.
A user reported that the application crashes when they takes off their airpods while the device is selected as default device. I tracked this down to cubeb_enumerate_devices.
In particular, we try to reconnect a new default device in the device_collection_changed_cb. EDIT: the default device is connected and a stream is open before the airpods are taken off
So here's a snippet: