Invalid BPM causes DEBUG_ASSERT in SynControl::setLocalBpm

Bug #1946351 reported by Jan Holthuis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
New
High
Unassigned

Bug Description

Encountered with version 2.4-alpha-868-g64a90497fc.

When loading a track using the browse view (i.e. a track not in the library yet), mixxx closed due to a `DEBUG_ASSERT` in `SyncControl::setLocalBpm`:

    debug [Main] SqlTransaction - Started new SQL database transaction on "MIXXX-1"
    DEBUG ASSERT: "isValid()" in function double mixxx::Bpm::value() const at /home/jan/Projects/mixxx/src/track/bpm.h:53
    Aborted (core dumped)

Here's the backtrace:

    >>> bt
    #0 0x00007feaea6b0d22 in raise () at /usr/lib/libc.so.6
    #1 0x00007feaea69a862 in abort () at /usr/lib/libc.so.6
    #2 0x00007feaeace6910 in () at /usr/lib/libQt5Core.so.5
    #3 0x0000558314958a7d in mixxx::(anonymous namespace)::handleMessage(QtMsgType, QMessageLogContext const&, QString const&) (type=<optimized out>, context=<optimized out>, input=<optimized out>) at /home/jan/Projects/mixxx/src/util/logging.cpp:321
    #4 0x00007feaead1b9a0 in () at /usr/lib/libQt5Core.so.5
    #5 0x00007feaead1baba in () at /usr/lib/libQt5Core.so.5
    #6 0x00007feaeace654a in QMessageLogger::critical(char const*, ...) const () at /usr/lib/libQt5Core.so.5
    #7 0x00005583149435a0 in mixxx_debug_assert(char const*, char const*, int, char const*) (assertion=assertion@entry=0x5583154f4ec3 "isValid()", file=file@entry=0x5583154f3e38 "/home/jan/Projects/mixxx/src/track/bpm.h", line=line@entry=53, function=function@entry=0x5583154f3e10 "double mixxx::Bpm::value() const") at /home/jan/Projects/mixxx/src/util/assert.h:9
    #8 0x0000558314993b44 in mixxx_debug_assert_return_true(char const*, char const*, int, char const*) (function=0x5583154f3e10 "double mixxx::Bpm::value() const", line=53, file=0x5583154f3e38 "/home/jan/Projects/mixxx/src/track/bpm.h", assertion=0x5583154f4ec3 "isValid()") at /home/jan/Projects/mixxx/src/util/assert.h:18
    #9 mixxx::Bpm::value() const (this=<synthetic pointer>) at /home/jan/Projects/mixxx/src/track/bpm.h:53
    #10 mixxx::operator*(mixxx::Bpm, double) (multiple=1, bpm=...) at /home/jan/Projects/mixxx/src/track/bpm.h:160
    #11 SyncControl::setLocalBpm(mixxx::Bpm) (this=<optimized out>, localBpm=...) at /home/jan/Projects/mixxx/src/engine/sync/synccontrol.cpp:466
    #12 0x0000558314df1d1f in EngineBuffer::postProcess(int) (this=0x558318011150, iBufferSize=2048) at /home/jan/Projects/mixxx/src/engine/enginebuffer.cpp:1330
    #13 0x0000558314e0102b in EngineMaster::processChannels(int) (this=0x5583170285a0, iBufferSize=<optimized out>) at /home/jan/Projects/mixxx/src/engine/enginemaster.cpp:383
    #14 0x0000558314e01517 in EngineMaster::process(int) (this=0x5583170285a0, iBufferSize=iBufferSize@entry=2048) at /home/jan/Projects/mixxx/src/engine/enginemaster.cpp:410
    #15 0x0000558314af53fb in SoundManager::onDeviceOutputCallback(long) (this=<optimized out>, iFramesPerBuffer=iFramesPerBuffer@entry=1024) at /home/jan/Projects/mixxx/src/soundio/soundmanager.cpp:593
    #16 0x0000558314fb3784 in SoundDevicePortAudio::callbackProcessClkRef(long, float*, float const*, PaStreamCallbackTimeInfo const*, unsigned long) (this=0x55831698d0e0, framesPerBuffer=1024, out=<optimized out>, in=<optimized out>, timeInfo=<optimized out>, statusFlags=<optimized out>) at /home/jan/Projects/mixxx/src/soundio/sounddeviceportaudio.cpp:965
    #17 0x00007feaef5896c4 in () at /usr/lib/libportaudio.so.2
    #18 0x00007feaef58b7c0 in () at /usr/lib/libportaudio.so.2
    #19 0x00007feaef59342b in () at /usr/lib/libportaudio.so.2
    #20 0x00007feaea84b259 in start_thread () at /usr/lib/libpthread.so.0
    #21 0x00007feaea7725e3 in clone () at /usr/lib/libc.so.6

Looks like the new `localBpm` is assumed to be valid, but it isn't, which leads to the assertion when multiplying it with the rate ratio.

Tags: sync
Revision history for this message
Jan Holthuis (holthuis-jan) wrote :

Steps to Reproduce:

1. Load a track onto deck A and start playback
2. Enable Sync Lock on both decks
3. Use the browse view to load any track where the BPM column is empty onto deck B
4. Debug assertion is triggered.

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

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.