EarTrumpet icon indicating copy to clipboard operation
EarTrumpet copied to clipboard

Crashes on Actions involving Bluetooth Devices

Open conc1erge opened this issue 5 months ago • 1 comments

Summary

EarTrumpet crashes when an Action involves a Bluetooth device connecting and disconnecting is executed.

Steps to reproduce

  1. Have a bluetooth speaker/headphones/earphones
  2. Connect the device on a Bluetooth-capable Windows device with EarTrumpet Dev installed
  3. Create a EarTrumpet Action related to removing/adding/setting default the Bluetooth device then another action resetting the default playback to a different source
  4. Disable Bluetooth

EarTrumpet version

2.3.0.99

Windows version

Windows 11 24H2 (Build 26100.4061)

Additional information

I'm going to provide my actions here as screenshots. My initial goal was to automate making Spotify go from Voicemeeter AUX (alternate channel) to my AirPods when connecting and making it go from disconnecting my AirPods back to Voicemeeter AUX.

EDIT: I've figured out that EarTrumpet only crashes when Bluetooth turns OFF; not safely disconnecting the Bluetooth device.

If ever, I can provide the actions as an exported file when required.

Image

Image

conc1erge avatar Jun 13 '25 08:06 conc1erge

It looks like #1708 may probably fix this issue.

conc1erge avatar Jun 13 '25 09:06 conc1erge

Still occurs on dev version 2.3.0.106

conc1erge avatar Jul 03 '25 13:07 conc1erge

Will try to get to this ASAP but we're hitting a holiday week so will have to likely defer to next week. Just a friendly heads up.

riverar avatar Jul 03 '25 22:07 riverar

I can reproduce this, but the action isn't quite set up correctly. You're asking EarTrumpet to respond to default device change events, and then generate more default-change events by changing the default device to the same default device. EarTrumpet eventually ends up in a loop and crashes.

Instead, perhaps adjust the action to:

  • Airpods Disconnect
    • When: AirPods is removed
    • Do: Set xxx as playback default
    • Do: Set Spotify volume to N% on xxx
  • Airpods Connect
    • When: AirPods is added
    • Do: Set AirPods as playback default
    • Do: Set Spotify volume to N% on AirPods

Does that work better for you?

riverar avatar Jul 05 '25 17:07 riverar

Yep, looks like that prevents the crash. Though the application doesn't automatically change to the new device set until I manually change it to the new device; but it does actually change the volume though. Sometimes it also changes properly and doesn't. It might just be me and/or I don't fully understand how Actions work yet. Additionally, it doesn't automatically refresh all of the application volume listings to the new default device, it comes out as blank but the audio throughput works just fine. Before I (or you) close this issue, I think in the future to avoid this same issue when selecting a device as a new playback default it should delist itself from the Do: Set x as playback default listings if the When condition is on Set x as playback default is also the same device.

conc1erge avatar Jul 06 '25 15:07 conc1erge

The device that shows up in EarTrumpet is the default in Windows. So sounds like something is going wrong with the [Set AirPods as playback default] action. I wonder if we may be too quick--on arrival of BlueTooth audio devices, Windows tends to do some work merging devices together. Perhaps our change to the default is getting lost? I'll see if I can reproduce that.

riverar avatar Jul 06 '25 15:07 riverar