Hack to fix switching audio source crash bug

Feel free to post bug reports here. I need exact, detailed steps showing me how I can re-create the bug on my machine, so give as much info and detail as possible.
DeusExMachina
Posts: 1285
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Hack to fix switching audio source crash bug

Post by DeusExMachina »

So, it turns out that if you switch the audio to an unaffected audio port (not Apple TV or headphone jack, for instance) PRIOR to switching audio out from under kJams (like via Apple TV or unplugging headphones) kJams doesn't crash.
So… would it be possible to switch the audio port to something, maybe even nil, when the audio stream is stopped, such as via stop or pause on the transport controls, or just reaching the end of a track (when not on autoplay).
This would make the app far more stable in variable audio environments.

dave
Site Admin
Posts: 6395
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: Hack to fix switching audio source crash bug

Post by dave »

do you mean, when no song is playing, secretly change the kJams Audio Prefs to something else, then when a song is played, switch it back? you're NOT talking about System Prefs, right?

DeusExMachina
Posts: 1285
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina »

Yes, not system prefs.
No need to even effect jams prefs. Just set the output port invisibly from whatever IS set in the prefs to nil (as in the app claiming it isn't using audio at all) then on playback, reconnecting with the audio port stored in prefs.

dave
Site Admin
Posts: 6395
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: Hack to fix switching audio source crash bug

Post by dave »

okay, well, see, that's what i'm doing already. when no song is playing, no sound channel is open. when a song starts, a new channel is opened on the preferred port (audio device). that's why you can change ports while kJams is running: the current song finishes playing on the old port, but the next song plays on the newly selected port. there's no way to set it to more NILL than it already is :(

DeusExMachina
Posts: 1285
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina »

Unfortunately kJams still crashes even when just removing 3.5mm plug from jack.

dave
Site Admin
Posts: 6395
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: Hack to fix switching audio source crash bug

Post by dave »

ugh. this seems like an OS level problem. i recommend "don't do that"

DeusExMachina
Posts: 1285
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina »

Not "doing that" means leaving my machine at work!

dave
Site Admin
Posts: 6395
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: Hack to fix switching audio source crash bug

Post by dave »

i mean, quit kJams, then plug your audio, then run kJams

DeusExMachina
Posts: 1285
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina »

Disconnecting the audio plug kills two birds with one stone, unfortunately.

dave
Site Admin
Posts: 6395
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: Hack to fix switching audio source crash bug

Post by dave »

so you're saying it crashes your system whether or not kJams is running?

DeusExMachina
Posts: 1285
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina »

No. Just saying there is no point in quitting kJams first, since just unplugging the cable does that, abruptly but effectively. As does changing audio source from the menu bar.
Two birds with one stone.

dave
Site Admin
Posts: 6395
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: Hack to fix switching audio source crash bug

Post by dave »

huh. i can't get it to crash via either method

DeusExMachina
Posts: 1285
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina »

Hmm. Well, that's odd. Thought it was a deep MacOS toolbox bug, in which case you'd think it would effect any install.
In that case, you would also think that there must also be some local workaround that I can do to deal with whatever conflict is causing kJams to crash.
I've sent numerous crash reports, but stopped bothering after like the first half dozen or so, since I thought it was redundant. Would it help of have more? Because It crashes VERY reliably, EVERY time I disconnect the 3.5mm jack.

DeusExMachina
Posts: 1285
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina »

Okay, so I did a series of experiments in order to come up with steps. And in so doing, really narrowed down the issue to the Apple TV implementation.
Although this is not quite how it affects me, I am pretty much 100% sure this is the same bug:
Version 1)
Launch kJams
When fully launched, switch to Apple TV as secondary monitor.
You will IMMEDIATELY crash.
I was working on steps for Version 2, but the aforementioned experiments appear to have innoculated the current machine, which temporarily no longer crashes except as above. So it will await my retrying on my other machine.
But it will go something like this:
First, plug in 3.5mm plug into jack.
Switch to Apple TV as secondary monitor
Switch audio to Headphones (the latest MacOS for some reason retains a check mark next to Apple TV).
Launch kJams (if you try to do it the other way around, as soon as you try to switch to the Apple TV, MacOS assumes you want to switch audio to Apple TV, and kJams crashes).
Remove headphone plug
Crash.

dave
Site Admin
Posts: 6395
Joined: Sun Sep 18, 2005 8:02 am
Location: Seattle
Contact:

Re: Hack to fix switching audio source crash bug

Post by dave »

tried all the above. still CNR. (there is actually an ATV on my network, which i hijacked for this experiment. i couldn't see the ATV but didn't need to to do this experiment)

Post Reply