ASSERT: "false" in file src/engine/enginemicrophone.cpp

Bug #765576 reported by jus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
High
William Good

Bug Description

Mixxx latest trunk MacOS 10.6.7

Was testing the new vinyl control options and probably deactivated all input/output channels beside the mic by mistake.
Mixxx crashed with "Fatal: []: ASSERT: "false" in file src/engine/enginemicrophone.cpp, line 101" and wont work on restart until mixxx.cfg got deleted.

I had similar rare crashes before the new vinyl control code got merged, so i am pretty sure it was there before merge.
There was always (like this time) something about "QList<EngineMaster::ChannelInfo*>::append" in the thread crashed.

Revision history for this message
jus (jus) wrote :
Revision history for this message
jus (jus) wrote :

Uhm, it just crashed again with same error message using current trunk.

Steps to reproduce:
1. Select in preferences Output Master "foo" Channel 1-2
2. Select in preferences Output Headphones "foo" Channel 1-2
3. Error message appear: Two output channels cannot share channels on sound device "foo"
4. Instant crash "Fatal: []: ASSERT: "false" in file src/engine/enginemicrophone.cpp, line 101"

I noticed also that the selection in the drop down menues is not right. With multichannel soundcards you can select in increments of 1 , like "Channel 1-2" "Channel 2-3" "Channel 3-4" etc. which leads to output channels sharing channels on the sound device eventually. Better allow selection in increments of 2 only to avoid said error message.

Probably related to lp:779944

Changed in mixxx:
status: New → Confirmed
milestone: none → 1.10.0
Revision history for this message
William Good (bkgood) wrote :

Repro'd, 90% sure I know what's going on here (my fault... ish).

Changed in mixxx:
assignee: nobody → Bill Good (bkgood)
importance: Undecided → High
status: Confirmed → Triaged
Revision history for this message
William Good (bkgood) wrote :

I believe this has been fixed in lp:mixxx r2820.

What was happening, was for a device config:
"Device 1" Master Chan1-2
"Device 1" Headphones Chan1-2
"Device 2" Microphone Chan1
devices were being opened in the order of "Device 2", "Device 1". This would cause the "Device 2" to open and start submitting samples to the EngineMicrophone FIFO. However, the setup for "Device 1" would fail because of the channel conflict, but the SoundManager::setupDevices code didn't close the devices it has previously opened before failing, so "Device 2" kept pushing samples until the buffer overflowed and the ASSERT triggered.

Fixed by checking for duplicate channels for all devices before opening (so the amount of time one device can be open with a failure pending is minimized) and made sure all devices would be closed if one failed. Because a tiny window of opportunity is still open, it's important that AudioDestinations filling FIFOs clear their buffers when they get inputConnected/Disconnected signals (EngineMicrophone does this), and it's probably also beneficial to have the FIFO larger than the buffers coming in from PA (perhaps double-sized? the EngineMicrophone one is MAX_BUFFER_LEN which is quite large iirc, no real harm there though).

Thanks for the excellent bug report jus! It takes a good one to clue me in on something so well at 4am :).

Changed in mixxx:
status: Triaged → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/5864

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.