mixxx crashes when (double)clicking on a folder in the library

Bug #504162 reported by yves on 2010-01-07
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mixxx
High
RJ Skerry-Ryan

Bug Description

I've dragged a directory into the mixxx library - when I double click on the entry mixxx segfaults.

valgrind output of the segfault (this is just a little part which seems relevant - I can provide the full output if needed):

Debug: [Main]: TrackDAO::getTrack QThread(0x6241190, name = "Main") "qt_sql_default_connection"
Debug: [Main]: TrackInfoObject: emitting bpmUpdated signal!
Debug: [Main]: setCuePoints 0
==8304== Thread 2:
==8304== Conditional jump or move depends on uninitialised value(s)
==8304== at 0x818C132: SoundSourceProxy::getSrate() (soundsourceproxy.cpp:146)
==8304== by 0x818B9B1: SoundSourceProxy::SoundSourceProxy(TrackInfoObject*) (soundsourceproxy.cpp:85)
==8304== by 0x80E60C9: CachingReader::loadTrack(TrackInfoObject*) (cachingreader.cpp:512)
==8304== by 0x80E5D6B: CachingReader::run() (cachingreader.cpp:433)
==8304== by 0x5603921: ??? (in /usr/lib/libQtCore.so.4.5.3)
==8304== by 0x580F8AB: start_thread (in /lib/libpthread-2.11.1.so)
==8304== by 0x5A2901D: clone (in /lib/libc-2.11.1.so)
==8304==
==8304== Use of uninitialised value of size 4
==8304== at 0x818C141: SoundSourceProxy::getSrate() (soundsourceproxy.cpp:149)
==8304== by 0x818B9B1: SoundSourceProxy::SoundSourceProxy(TrackInfoObject*) (soundsourceproxy.cpp:85)
==8304== by 0x80E60C9: CachingReader::loadTrack(TrackInfoObject*) (cachingreader.cpp:512)
==8304== by 0x80E5D6B: CachingReader::run() (cachingreader.cpp:433)
==8304== by 0x5603921: ??? (in /usr/lib/libQtCore.so.4.5.3)
==8304== by 0x580F8AB: start_thread (in /lib/libpthread-2.11.1.so)
==8304== by 0x5A2901D: clone (in /lib/libc-2.11.1.so)
==8304==
==8304== Invalid read of size 4
==8304== at 0x818C141: SoundSourceProxy::getSrate() (soundsourceproxy.cpp:149)
==8304== by 0x818B9B1: SoundSourceProxy::SoundSourceProxy(TrackInfoObject*) (soundsourceproxy.cpp:85)
==8304== by 0x80E60C9: CachingReader::loadTrack(TrackInfoObject*) (cachingreader.cpp:512)
==8304== by 0x80E5D6B: CachingReader::run() (cachingreader.cpp:433)
==8304== by 0x5603921: ??? (in /usr/lib/libQtCore.so.4.5.3)
==8304== by 0x580F8AB: start_thread (in /lib/libpthread-2.11.1.so)
==8304== by 0x5A2901D: clone (in /lib/libc-2.11.1.so)
==8304== Address 0x1 is not stack'd, malloc'd or (recently) free'd
==8304==
==8304==
==8304== Process terminating with default action of signal 11 (SIGSEGV)
==8304== Access not within mapped region at address 0x1
==8304== at 0x818C141: SoundSourceProxy::getSrate() (soundsourceproxy.cpp:149)
==8304== by 0x818B9B1: SoundSourceProxy::SoundSourceProxy(TrackInfoObject*) (soundsourceproxy.cpp:85)
==8304== by 0x80E60C9: CachingReader::loadTrack(TrackInfoObject*) (cachingreader.cpp:512)
==8304== by 0x80E5D6B: CachingReader::run() (cachingreader.cpp:433)
==8304== by 0x5603921: ??? (in /usr/lib/libQtCore.so.4.5.3)
==8304== by 0x580F8AB: start_thread (in /lib/libpthread-2.11.1.so)
==8304== by 0x5A2901D: clone (in /lib/libc-2.11.1.so)
==8304== If you believe this happened as a result of a stack
==8304== overflow in your program's main thread (unlikely but
==8304== possible), you can try to increase the size of the
==8304== main thread stack using the --main-stacksize= flag.
==8304== The main thread stack size used in this run was 8388608.
==8304==
==8304== HEAP SUMMARY:
==8304== in use at exit: 47,343,467 bytes in 67,685 blocks
==8304== total heap usage: 413,300 allocs, 345,615 frees, 239,030,156 bytes allocated
==8304==
==8304== LEAK SUMMARY:
==8304== definitely lost: 11,052 bytes in 278 blocks
==8304== indirectly lost: 13,300 bytes in 623 blocks
==8304== possibly lost: 25,708,272 bytes in 52,867 blocks
==8304== still reachable: 21,610,843 bytes in 13,917 blocks
==8304== suppressed: 0 bytes in 0 blocks
==8304== Rerun with --leak-check=full to see details of leaked memory
==8304==
==8304== For counts of detected and suppressed errors, rerun with: -v
==8304== Use --track-origins=yes to see where uninitialised values come from
==8304== ERROR SUMMARY: 7394463 errors from 203 contexts (suppressed: 224 from 17)
Killed

yves (yves-) wrote :
Download full text (31.2 KiB)

Here is the backtrace:

(gdb) run
Starting program: /home/yves/tmp/mixxx/mixxx/mixxx
[Thread debugging using libthread_db enabled]
Debug: [Main]: Setting up plugin paths...
Debug: [Main]: ...done.
Debug: [Main]: Mixxx trunk "(bzr r2217; built on: Jan 7 2010 @ 09:36:31) " is starting...
Debug: [Main]: At current version trunk
Debug: [Main]: CachingReader using 4980736 bytes.
[New Thread 0xb2254b70 (LWP 8386)]
Debug: [Main]: CachingReader using 4980736 bytes.
[New Thread 0xb1304b70 (LWP 8387)]
Debug: [Main]: ControlObject::getControl returning NULL for ( "[Mixer Profile]" , "LoEQFrequency" )
[New Thread 0xb045fb70 (LWP 8388)]
Debug: [Main]: SampleRate 44100
Debug: [Main]: Latency 64
[New Thread 0xafb38b70 (LWP 8389)]
Debug: [Main]: ("QSQLITE", "QMYSQL3", "QMYSQL", "QODBC3", "QODBC", "QPSQL7", "QPSQL")
Debug: [Main]: src/library/trackcollection.cpp DB status: true
Debug: [Main]: QSqlError(-1, "", "")
Debug: [Main]: SchemaManager::upgradeToSchemaVersion already at version 1
Debug: [Main]: TrackDAO::initialize QThread(0x83ec050, name = "Main") "qt_sql_default_connection"
Debug: [Main]: CrateDAO::initialize()
Debug: [Main]: CueDAO::initialize QThread(0x83ec050, name = "Main") "qt_sql_default_connection"
Debug: [Main]: Created MissingTracksModel!
[New Thread 0xadf26b70 (LWP 8391)]
Debug: [Main]: createWaveformViewer()
Debug: [Main]: WaveformViewerFactory :: Creating new visual waveform
Debug: [Main]: WaveformViewerFactory :: Making new GL context.
Debug: [Main]: Didn't get mark Color, using parent's MarkerColor: "#0000ff"
Debug: [Main]: Didn't get mark TextColor, using parent's BgColor: "#ffffff"
Debug: [Main]: Didn't get mark Color, using parent's MarkerColor: "#0000ff"
Debug: [Main]: Didn't get mark Color, using parent's MarkerColor: "#00ff00"
Debug: [Main]: Didn't get mark Color, using parent's MarkerColor: "#0000ff"
Debug: [Main...

Albert Santoni (gamegod) on 2010-01-11
Changed in mixxx:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.8.0
RJ Skerry-Ryan (rryan) wrote :

I think I know why this happens. You dragged a directory that contains maybe non-audio files. One of those non-audio files was added the to the mixxx library. If you try to load the track, it gets loaded, but there was a bug (since fixed) in SoundSourceProxy that if it didn't know what to do with the file, it would just not load anything at all and have a reference to uninitialized memory dangling around. None of the SSProxy methods checked whether that pointer was NULL anyway, so SoundSourceProxy::getSrate() will easily crash if the SoundSourceProxy was asked to load an invalid file.

That particular problem should be fixed now. Could you please try to reproduce on the latest trunk?

Changed in mixxx:
assignee: nobody → RJ Ryan (rryan)
yves (yves-) wrote :

it seems to be fixed - tested with exactly the same folder

RJ Skerry-Ryan (rryan) on 2010-01-21
Changed in mixxx:
status: Triaged → Fix Committed
summary: - mixxx crahes when (double)clicking on a folder in the library
+ mixxx crashes when (double)clicking on a folder in the library
samotham (samotham) wrote :

if it may be related or help, I found on 1.8.0beta1 that triple-clicking or double-double-clicking on any track in the Library or Browse sticks Mixxx : current track keeps on been played, but mouse or keyboard events don't make any effect on mixxx behaviour

RJ Skerry-Ryan (rryan) on 2010-10-05
Changed in mixxx:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers