Hack to fix switching audio source crash bug
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Hack to fix switching audio source crash bug
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.
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.
Re: Hack to fix switching audio source crash bug
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?
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Hack to fix switching audio source crash bug
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.
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.
Re: Hack to fix switching audio source crash bug
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 

-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Hack to fix switching audio source crash bug
Unfortunately kJams still crashes even when just removing 3.5mm plug from jack.
Re: Hack to fix switching audio source crash bug
ugh. this seems like an OS level problem. i recommend "don't do that"
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Hack to fix switching audio source crash bug
Not "doing that" means leaving my machine at work!
Re: Hack to fix switching audio source crash bug
i mean, quit kJams, then plug your audio, then run kJams
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Hack to fix switching audio source crash bug
Disconnecting the audio plug kills two birds with one stone, unfortunately.
Re: Hack to fix switching audio source crash bug
so you're saying it crashes your system whether or not kJams is running?
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Hack to fix switching audio source crash bug
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.
Two birds with one stone.
Re: Hack to fix switching audio source crash bug
huh. i can't get it to crash via either method
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Hack to fix switching audio source crash bug
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.
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.
-
- Posts: 1293
- Joined: Sun Apr 20, 2008 9:57 am
- Location: Pittsburgh, PA
- Contact:
Re: Hack to fix switching audio source crash bug
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.
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.
Re: Hack to fix switching audio source crash bug
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)