Bugzilla – Bug 1250
Mac OS X: Left channel tracks produce more than one selected channel in track dropdown menu.
Last modified: 2018-08-20 11:51:41 UTC
I can't yet produce anything like this on Windows or Linux. Leland's Mac build does the same so I am confident it is not a build error on my part. I can't produce any crashes yet by selecting one of the multiple ticked items. I think it is P1/P2 borderline. I've chosen P1, partly because it worries me if there is some other symptom on the other platforms that we have not discovered yet. Anyone think we should not worry and not fix it?
(In reply to Gale Andrews from comment #0) I can't reproduce this in W7-HP 64-bit audacity-win-r7eb7490-2.1.2-alpha-16-oct-15
(In reply to Gale Andrews from comment #0) > I can't yet produce anything like this on Windows or Linux. Leland's Mac > build does the same so I am confident it is not a build error on my part. I > can't produce any crashes yet by selecting one of the multiple ticked items. > > I think it is P1/P2 borderline. I've chosen P1, partly because it worries me > if there is some other symptom on the other platforms that we have not > discovered yet. Anyone think we should not worry and not fix it? This might have been an issue if 2.1.2 was going to be used by voiceover users (which it isn't). Assuming the check marks are read by voiceover, the check marks are probably the only way voiceover users can work out whether a track is left/right/mono. It looks like this bug is due to a wxWidgets bug: http://trac.wxwidgets.org/ticket/14213 There's a possible fix on a branch on my fork: https://github.com/DavidBailes/audacity/commit/092b45a007b460f73ab4b71f83b0909986b815d5 There may well be more elegant ways to get round the bug, and I'm not sure if my fix is safe.
The wxWidgets bug was reported 4 years ago, so if that is the one causing our problem, I'm wondering why it is only biting us now? Is it because we are removing elements from a menu that we were not previously removing? Could we do what we did before? Could we gray them out as a (safer) workaround (than David's suggested patch of two versions of the menu)?
(In reply to James Crook from comment #3) A wx3 build from 29 July 2015 does not have the problem but one from 16 Aug 2015 does. So (probably) this is tied in with refinements or bug fixes Paul was making to the redesigned dropdown menu.
In reply to David, VoiceOver (if anyone tries to use it in Audacity 2.1.2) does read the checkmarks in "Mono" and "Left" or in "Left" and "Right".
(In reply to Gale Andrews from comment #5) > In reply to David, VoiceOver (if anyone tries to use it in Audacity 2.1.2) > does read the checkmarks in "Mono" and "Left" or in "Left" and "Right". Thanks for the info. Does setting the Waveform, Waveform (db), Spectrogram radio buttons have similar issues on Mac?
Another possible fix: https://github.com/DavidBailes/audacity/commit/fcae02d1fe1f714bdd83ecd61c16f5c64d0e86a6 No idea whether this will fix the problem.
(In reply to David Bailes from comment #6) > Does setting the Waveform, Waveform (db), Spectrogram radio buttons have > similar issues on Mac? No, only the channels.
(In reply to David Bailes from comment #7) > Another possible fix: > https://github.com/DavidBailes/audacity/commit/fcae02d1fe1f714bdd83ecd61c16f5c64d0e86a6 > > No idea whether this will fix the problem. Thanks for your efforts, David. I built it, but it doesn't fix the problem. Split stereo track then reopen the dropdown menu shows left and right checked.
(In reply to Gale Andrews from comment #9) > (In reply to David Bailes from comment #7) > > Another possible fix: > > https://github.com/DavidBailes/audacity/commit/fcae02d1fe1f714bdd83ecd61c16f5c64d0e86a6 > > > > No idea whether this will fix the problem. > Thanks for your efforts, David. I built it, but it doesn't fix the problem. > Split stereo track then reopen the dropdown menu shows left and right > checked. Thanks for checking. Have you tried my previous fix?
Another possible fix: go back to having both the mono and stereo items on the track menu. https://github.com/DavidBailes/audacity/commit/ba3b1b14ae14346b8a796eedfe0105ffaee791de
(In reply to David Bailes from comment #11) > Another possible fix: go back to having both the mono and stereo items on the > track menu. > https://github.com/DavidBailes/audacity/commit/ba3b1b14ae14346b8a796eedfe0105ffaee791de Thanks, David. Sadly, still reproduces the same issues. And you can see the left and right both checked (greyed out) before you split the stereo track. (In reply to David Bailes from comment #2) > There's a possible fix on a branch on my fork: https://github.com/DavidBailes/audacity/commit/092b45a007b460f73ab4b71f83b0909986b815d5 > > There may well be more elegant ways to get round the bug, and I'm not sure if > my fix is safe. I now tried it. It crashes on launch: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Menu to be set as submenu is already a submenu of some menu.' Application Specific Backtrace 1: 0 CoreFoundation 0x945ecc19 __raiseError + 201 1 libobjc.A.dylib 0x94afff11 objc_exception_throw + 276 2 CoreFoundation 0x94581d5a +[NSException raise:format:arguments:] + 138 3 Foundation 0x97637ab9 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 118 4 AppKit 0x9c9fd3ab -[NSMenuItem setSubmenu:] + 234 5 libwx_osx_cocoau_release_core-3.0.0.2.0.dylib 0x0144cc70 _ZN14wxMenuItemImpl6CreateEP10wxMenuItemP6wxMenuiRK8wxStringP18wxAcceleratorEntryS6_10wxItemKindS3_ + 352 6 libwx_osx_cocoau_release_core-3.0.0.2.0.dylib 0x013bdef3 _ZN10wxMenuItemC2EP6wxMenuiRK8wxStringS4_10wxItemKindS1_ + 515 7 libwx_osx_cocoau_release_core-3.0.0.2.0.dylib 0x013be899 _ZN14wxMenuItemBase3NewEP6wxMenuiRK8wxStringS4_10wxItemKindS1_ + 73 8 Audacity 0x00292dab _ZN10TrackPanel13BuildWaveMenuERP6wxMenub + 3915 9 Audacity 0x00294e4e _ZN10TrackPanel10BuildMenusEv + 4190 10 Audacity 0x00290a7f _ZN10TrackPanelC2EP8wxWindowiRK7wxPointRK6wxSizeP9TrackListP8ViewInfoP18TrackPanelListenerP17AdornedRulerPanel + 2495 11 Audacity 0x002bfe77 _ZL17TrackPanelFactoryP8wxWindowiRK7wxPointRK6wxSizeP9TrackListP8ViewInfoP18TrackPanelListenerP17AdornedRulerPanel + 87 12 Audacity 0x0023a6c7 _ZN15AudacityProjectC2EP8wxWindowiRK7wxPointRK6wxSize + 3511 13 Audacity 0x00236331 _Z24CreateNewAudacityProjectv + 113 14 Audacity 0x0000a49a _ZN11AudacityApp6OnInitEv + 5498 15 libwx_osx_cocoau_release_core-3.0.0.2.0.dylib 0x0139071a _ZN5wxApp10CallOnInitEv + 218 16 libwx_baseu_release-3.0.0.2.0.dylib 0x01a14b59 _Z7wxEntryRiPPw + 57 17 libwx_baseu_release-3.0.0.2.0.dylib 0x01a14cb2 _Z7wxEntryRiPPc + 50 18 Audacity 0x000056fb main + 91 19 Audacity 0x00002c15 start + 53 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 com.apple.CoreFoundation 0x945ecf97 ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ + 7 1 com.apple.CoreFoundation 0x945ecf22 __raiseError + 978 2 libobjc.A.dylib 0x94afff11 objc_exception_throw + 276 3 com.apple.CoreFoundation 0x94581d5a +[NSException raise:format:arguments:] + 138 4 com.apple.Foundation 0x97637ab9 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 118 5 com.apple.AppKit 0x9c9fd3ab -[NSMenuItem setSubmenu:] + 234 [...]
(In reply to Gale Andrews from comment #4) > A wx3 build from 29 July 2015 does not have the problem but one from 16 Aug > 2015 does. And 08 Aug and 09 Aug have the problem.
(In reply to Gale Andrews from comment #12) > (In reply to David Bailes from comment #11) > > Another possible fix: go back to having both the mono and stereo items on the > > track menu. > > https://github.com/DavidBailes/audacity/commit/ba3b1b14ae14346b8a796eedfe0105ffaee791de > Thanks, David. Sadly, still reproduces the same issues. And you can see the > left and right both checked (greyed out) before you split the stereo track. Thanks. Here's another possible fix, again with both the mono and stereo items shown: https://github.com/DavidBailes/audacity/commit/758bd1ac2acd4febb3cb848b94e6bcc24ab5273b > > (In reply to David Bailes from comment #2) > > There's a possible fix on a branch on my fork: > https://github.com/DavidBailes/audacity/commit/ > 092b45a007b460f73ab4b71f83b0909986b815d5 > > > > There may well be more elegant ways to get round the bug, and I'm not sure if > > my fix is safe. > I now tried it. It crashes on launch: > > *** Terminating app due to uncaught exception > 'NSInternalInconsistencyException', reason: 'Menu to be set as submenu is > already a submenu of some menu.' > > Application Specific Backtrace 1: > 0 CoreFoundation 0x945ecc19 __raiseError + 201 > 1 libobjc.A.dylib 0x94afff11 objc_exception_throw + 276 > 2 CoreFoundation 0x94581d5a +[NSException > raise:format:arguments:] + 138 > 3 Foundation 0x97637ab9 -[NSAssertionHandler > handleFailureInMethod:object:file:lineNumber:description:] + 118 > 4 AppKit 0x9c9fd3ab -[NSMenuItem setSubmenu:] > + 234 > 5 libwx_osx_cocoau_release_core-3.0.0.2.0.dylib 0x0144cc70 > _ZN14wxMenuItemImpl6CreateEP10wxMenuItemP6wxMenuiRK8wxStringP18wxAcceleratorE > ntryS6_10wxItemKindS3_ + 352 > 6 libwx_osx_cocoau_release_core-3.0.0.2.0.dylib 0x013bdef3 > _ZN10wxMenuItemC2EP6wxMenuiRK8wxStringS4_10wxItemKindS1_ + 515 > 7 libwx_osx_cocoau_release_core-3.0.0.2.0.dylib 0x013be899 > _ZN14wxMenuItemBase3NewEP6wxMenuiRK8wxStringS4_10wxItemKindS1_ + 73 > 8 Audacity 0x00292dab > _ZN10TrackPanel13BuildWaveMenuERP6wxMenub + 3915 > 9 Audacity 0x00294e4e > _ZN10TrackPanel10BuildMenusEv + 4190 > 10 Audacity 0x00290a7f > _ZN10TrackPanelC2EP8wxWindowiRK7wxPointRK6wxSizeP9TrackListP8ViewInfoP18Track > PanelListenerP17AdornedRulerPanel + 2495 > 11 Audacity 0x002bfe77 > _ZL17TrackPanelFactoryP8wxWindowiRK7wxPointRK6wxSizeP9TrackListP8ViewInfoP18T > rackPanelListenerP17AdornedRulerPanel + 87 > 12 Audacity 0x0023a6c7 > _ZN15AudacityProjectC2EP8wxWindowiRK7wxPointRK6wxSize + 3511 > 13 Audacity 0x00236331 > _Z24CreateNewAudacityProjectv + 113 > 14 Audacity 0x0000a49a _ZN11AudacityApp6OnInitEv > + 5498 > 15 libwx_osx_cocoau_release_core-3.0.0.2.0.dylib 0x0139071a > _ZN5wxApp10CallOnInitEv + 218 > 16 libwx_baseu_release-3.0.0.2.0.dylib 0x01a14b59 _Z7wxEntryRiPPw + 57 > 17 libwx_baseu_release-3.0.0.2.0.dylib 0x01a14cb2 _Z7wxEntryRiPPc + 50 > 18 Audacity 0x000056fb main + 91 > 19 Audacity 0x00002c15 start + 53 > > Thread 0 Crashed:: Dispatch queue: com.apple.main-thread > 0 com.apple.CoreFoundation 0x945ecf97 > ___TERMINATING_DUE_TO_UNCAUGHT_EXCEPTION___ + 7 > 1 com.apple.CoreFoundation 0x945ecf22 __raiseError + 978 > 2 libobjc.A.dylib 0x94afff11 objc_exception_throw + 276 > 3 com.apple.CoreFoundation 0x94581d5a +[NSException > raise:format:arguments:] + 138 > 4 com.apple.Foundation 0x97637ab9 -[NSAssertionHandler > handleFailureInMethod:object:file:lineNumber:description:] + 118 > 5 com.apple.AppKit 0x9c9fd3ab -[NSMenuItem setSubmenu:] + 234 > [...]
(In reply to Gale Andrews from comment #13) > And 08 Aug and 09 Aug have the problem. Does 03 Aug have the problem?
(In reply to Steve Daulton from comment #15) > Does 03 Aug have the problem? There are no ready made builds between 29 July and 08 Aug. Is there a specific revision you want me to build from on or around 03 Aug?
(In reply to David Bailes from comment #14) > Here's another possible fix, again with both the mono and stereo items shown: > https://github.com/DavidBailes/audacity/commit/758bd1ac2acd4febb3cb848b94e6bcc24ab5273b This one does not reproduce the steps on Mac so seems fine from functional point of view. Has someone tested it on Linux? I agree it would be nicer not to show the greyed out mono items for a stereo track, but we could leave that open as a P4 enhancement. I was not able to build on Mac from 03 Aug and 04 Aug due to compile errors (probably why there were not any Leland builds from then).
(In reply to Gale Andrews from comment #17) > Has someone tested it on Linux? Unfortunately there is still a problem. 1) Open Audacity and import a stereo track. 2) From the track dropdown menu, Split the stereo track. 3) In the track dropdown menu of the LOWER track, note that it shows "Right Channel" (as expected). 4) In the track dropdown menu of the upper track, it also says "Right Channel", although it is actually a "Left Channel".
(In reply to Steve Daulton from comment #18) > (In reply to Gale Andrews from comment #17) > > Has someone tested it on Linux? > > Unfortunately there is still a problem. > > 1) Open Audacity and import a stereo track. > 2) From the track dropdown menu, Split the stereo track. > 3) In the track dropdown menu of the LOWER track, note that it shows "Right > Channel" (as expected). > 4) In the track dropdown menu of the upper track, it also says "Right > Channel", although it is actually a "Left Channel". This is on Linux I presume. If you change the display radio buttons of a track (waveform, waveform(db), spectrogram) is there a similar problem, or do these radio buttons work as expected?
(In reply to David Bailes from comment #19) > (In reply to Steve Daulton from comment #18) > > (In reply to Gale Andrews from comment #17) > > > Has someone tested it on Linux? > > > > Unfortunately there is still a problem. > > > > 1) Open Audacity and import a stereo track. > > 2) From the track dropdown menu, Split the stereo track. > > 3) In the track dropdown menu of the LOWER track, note that it shows "Right > > Channel" (as expected). > > 4) In the track dropdown menu of the upper track, it also says "Right > > Channel", although it is actually a "Left Channel". > > This is on Linux I presume. > If you change the display radio buttons of a track (waveform, waveform(db), > spectrogram) is there a similar problem, or do these radio buttons work as > expected? In particular, with the display radio buttons, if you click the button which is already checked, is that ok?
(In reply to Steve Daulton from comment #18) > (In reply to Gale Andrews from comment #17) > > Has someone tested it on Linux? > > Unfortunately there is still a problem. > > 1) Open Audacity and import a stereo track. > 2) From the track dropdown menu, Split the stereo track. > 3) In the track dropdown menu of the LOWER track, note that it shows "Right > Channel" (as expected). > 4) In the track dropdown menu of the upper track, it also says "Right > Channel", although it is actually a "Left Channel". Does this help? https://github.com/DavidBailes/audacity/commit/60adc5c708900e9065325d561440ce29ddb0f0ae Might be cleaner just to create the menu each time...
Steve wrote: > 1) Open Audacity and import a stereo track. > 2) From the track dropdown menu, Split the stereo track. > 3) In the track dropdown menu of the LOWER track, note that it shows "Right > Channel" (as expected). > 4) In the track dropdown menu of the upper track, it also says "Right > Channel", although it is actually a "Left Channel". Aargh, so there are still platform differences here? Steve's steps above do not reproduce on Mac (WAV copy-in or MP3). @David: I tested the view type, rate and formats too on Mac when I found it worked there.
(In reply to David Bailes from comment #21) Yes I'm testing on Linux. I still see the issue described in comment 18 with commit 60adc5c7.
(In reply to Steve Daulton from comment #23) > (In reply to David Bailes from comment #21) > Yes I'm testing on Linux. > > I still see the issue described in comment 18 with commit 60adc5c7. Thanks for testing (shame about the result!) Could you answer the questions in comments 19 & 20, thanks.
Created attachment 645 [details] Possible fix This patch is against the current Git master (commit 162392e) It seems to work OK on Linux. I'm not able to test on other platforms.
(In reply to Steve Daulton from comment #25) > Created attachment 645 [details] > Possible fix > > This patch is against the current Git master (commit 162392e) > It seems to work OK on Linux. I'm not able to test on other platforms. That's great news. It's not going to fix the bug on Macs, Gale already tested this previous fix on a Mac: https://github.com/DavidBailes/audacity/commit/fcae02d1fe1f714bdd83ecd61c16f5c64d0e86a6 So I've added that fix onto my branch which works on Macs: https://github.com/DavidBailes/audacity/commit/1d570ee1826453b7d541f42afe6ba9ba62eb28b5 there's an outside chance that this will work on both Mac and Linux. Please test!
(In reply to David Bailes from comment #26) > I've added that fix onto my branch which works on Macs: > https://github.com/DavidBailes/audacity/commit/1d570ee1826453b7d541f42afe6ba9ba62eb28b5 > there's an outside chance that this will work on both Mac and Linux. Please > test! Thanks, David. That build tests OK on Mac. Selecting already selected choices is also no problem.
Created attachment 646 [details] Fix for bug 1250 (In reply to David Bailes from comment #26) Looks good here too. I notice that "mChannelItemsInsertionPoint" is now an unused variable, so the attached patch (based on the current Audacity master) applies all of David's changes and removes the unused variable.
So I want to check... David's fix tested OK on Mac by Gale in comment 27, and Steve tested OK on Linux and Windows in comment 28? If so, I want to apply David's fix (without Steve's very safe removal of redundant variable) to master, so that we can mark this DEVEL-FIXMADE.
(In reply to James Crook from comment #29) I've only tested on Linux. I assume that David has tested on Windows. As soon as it is available in a nightly I'm sure that Peter will also give it a good workout on Windows. I think it marginally better to also remove the unused variable as the fix is the reversion of https://github.com/audacity/audacity/commit/b0de2fa9002c3b187c5f9c07d81378a1afe98fb2 plus a workaround to keep Linux happy. The variable mChannelItemsInsertionPoint exists only in that commit. No big deal if you want to leave it in for now, it's only a harmless compiler warning and can be fixed later.
(In reply to James Crook from comment #29) Yes it's been tested on all three platforms so it's apparently fixed. It's only still "open" only because it has not been committed. Do we then want a P4 Enhancement to hide the the greyed out mono items for a stereo track, as we did before? And does that depend on a fix for http://trac.wxwidgets.org/ticket/14213 ?
(In reply to Gale Andrews from comment #31) > Do we then want a P4 Enhancement to hide the the greyed out mono items for a > stereo track, as we did before? I think that is something that we would want if it can be done in a way that works on all platforms.
(In reply to Steve Daulton from comment #32) Forgot to say. I think P4 would be about right for that enhancement.
Thanks Steve, Gale, David. DEVEL-FIXMADE using David & Steve's fix. https://github.com/audacity/audacity/commit/1d570ee1826453b7d541f42afe6ba9ba62eb28b5 As the hash id is exactly the same as the one Gale and Steve tested in David's branch, can be moved straight from DEVEL-FIXMADE to CLOSED? For Gale to decide.
I've tested it on Windows which I had not before and it seemed OK. If Steve tested 1d5703ee (as opposed to testing 1d570ee + the patch to remove the unused variable) then I'm fine with Steve calling this RESOLVED - FIXED.
(In reply to Gale Andrews from comment #31) > (In reply to James Crook from comment #29) > Yes it's been tested on all three platforms so it's apparently fixed. It's > only still "open" only because it has not been committed. > > Do we then want a P4 Enhancement to hide the the greyed out mono items for a > stereo track, as we did before? And does that depend on a fix for > http://trac.wxwidgets.org/ticket/14213 ? I don't think it depends on a fix for the wxWidgets bug - just need to avoid deleting radio items, and inserting them in reverse order. (And incorporating Steve's fix for linux, if needed.)
(In reply to Gale Andrews from comment #35) > If Steve tested 1d5703ee (as opposed to testing 1d570ee + the patch to remove > the unused variable) then I'm fine with Steve calling this RESOLVED - FIXED. I tested both, and both work correctly, so marked RESOLVED-FIXED.
(In reply to Steve Daulton from comment #37) I have not tested the fix since it has been applied to audacity/audacity, so it still requires testing. Getting this into a nightly asap will allow more people to test.
Testing on W7-64-bit audacity-win-r1d570ee-2.1.2-alpha-04-nov-15 Symptoms reported in this bug entry look ok on W7 But, we have re-introduced, when the user has a stereo track, the redundant grayed-out button alongside "Left Channel" in the menu (also grayed out). And note that the Manual will require changing and that this will be a P1 as the dropdown menu as shown in the Manual is now out of date with this reversion/change. I will place the P1 there but will make no change until we affirm stability of that menu in the RC process.
(In reply to Steve Daulton from comment #38) > I have not tested the fix since it has been applied to audacity/audacity, > so it still requires testing. Getting this into a nightly asap will > allow more people to test. On Mac I had built the source zip of 1d5703ee in release configuration so if git hashes mean anything, I see no need to retest there. Peter and I have now tested on Windows. If Steve tested David's commits on top of something else than HEAD, or there could be some debug vs release difference, then yes that will need retesting. (In reply to Peter Sampson from comment #39) > we have re-introduced, when the user has a stereo track, the redundant > grayed-out button alongside "Left Channel" in the menu (also grayed out). Now at Enh bug 1258.