DEBUG_ASSERT: Change Master Output to 'None'

Bug #1526887 reported by Uwe Klotz
4
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Daniel Schürmann

Bug Description

Branch: master (2.1 alpha)

I get a debug assertion when changing the Master Ouput to None:

Fatal [Main]: DEBUG ASSERT: "false" in file src/sounddevicenetwork.cpp, line 76
../mixxx_run.sh: line 32: 6450 Aborted (core dumped) "${MIXXX_DEV}/mixxx" --settingsPath "${MIXXX_CFG}" --resourcePath "${MIXXX_DEV}/res" --pluginPath "${MIXXX_PLUGINS}"

    // Create the callback function pointer.
    if (isClkRefDevice) {
        // Network device as clock Reference is not yet supported
        DEBUG_ASSERT(false);
    } else {

'None' is a valid selection and must be handled appropriately. Assertions should be used for detecting invalid program states, but must not be used for regular error handling.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

The debug assert at this place is correct. Since I have assumed, that we will never get to this point.
We must prevent that we pick sounddevicenetwork as clock reference somewhere earlier.

Changed in mixxx:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

I disagree: "Always assert for the impossible", simple rule.

But it is possible. I described how to get to this point simply by selecting "None" in the drop down box. If the DEBUG_ASSERT is correct then we must never get there. Maybe the error has to be handled somewhere else, but something is missing here.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Äh, sorry. Why you disagree when we are the same opinion ;-)
This is a bug and needs to be fixed.

Changed in mixxx:
assignee: nobody → Daniel Schürmann (daschuer)
milestone: none → 2.0.0
Revision history for this message
Daniel Schürmann (daschuer) wrote :
Changed in mixxx:
status: Confirmed → Fix Committed
Revision history for this message
Uwe Klotz (uklotzde-deactivatedaccount) wrote :

Thanks for taking care, Daniel :)

Nothing serious, but the assertion indicated that Mixxx had reached an unexpected point in the code. This is a good example, why assertions are helpful for detecting unexpected behaviour or invalid code paths at runtime.

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/8380

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.