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: 1280
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Hack to fix switching audio source crash bug

Post by DeusExMachina » Tue Oct 11, 2016 3:27 pm

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.

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

Re: Hack to fix switching audio source crash bug

Post by dave » Tue Oct 11, 2016 3:35 pm

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: 1280
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina » Wed Oct 19, 2016 8:13 pm

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.

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

Re: Hack to fix switching audio source crash bug

Post by dave » Mon Oct 24, 2016 8:10 pm

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: 1280
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina » Tue Oct 25, 2016 9:05 am

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

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

Re: Hack to fix switching audio source crash bug

Post by dave » Mon Oct 31, 2016 9:16 am

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

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

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina » Tue Nov 08, 2016 1:36 am

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

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

Re: Hack to fix switching audio source crash bug

Post by dave » Wed Nov 09, 2016 12:39 pm

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

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

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina » Thu Nov 10, 2016 10:19 am

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

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

Re: Hack to fix switching audio source crash bug

Post by dave » Fri Nov 11, 2016 11:29 am

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

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

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina » Sat Nov 12, 2016 5:17 pm

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.

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

Re: Hack to fix switching audio source crash bug

Post by dave » Mon Nov 21, 2016 10:09 pm

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

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

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina » Tue Nov 29, 2016 3:42 am

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: 1280
Joined: Sun Apr 20, 2008 9:57 am
Location: Pittsburgh, PA
Contact:

Re: Hack to fix switching audio source crash bug

Post by DeusExMachina » Tue Nov 29, 2016 4:38 am

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.

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

Re: Hack to fix switching audio source crash bug

Post by dave » Sat Dec 03, 2016 11:43 am

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

Who is online

Users browsing this forum: No registered users and 5 guests