Reported by: alex-malexmedia
Date: 2008-02-17T15:48:35Z
Status: Fix Released
Importance: Medium
Launchpad Issue: lp192663
Attachments: [Backtrace of a locked-up mixxx.](https://bugs.launchpad.net/bugs/192663/+attachment/209334/+files/Backtrace of a locked-up mixxx.), [Lots and Lots of Valgrind](https://bugs.launchpad.net/bugs/192663/+attachment/209338/+files/Lots and Lots of Valgrind), [Patch for issue.](https://bugs.launchpad.net/bugs/192663/+attachment/209437/+files/Patch for issue.), [A fix for the fix.](https://bugs.launchpad.net/bugs/192663/+attachment/209498/+files/A fix for the fix.)
Using Mixxx on Linux (fc7) with no DRI.
When "scratching" through any track using my new MIDI jog wheel, Mixxx will occasionally segfault. The backtraces always seem to lead to the same place. Here is a sample:
[alex@rockit2 ~]$ gdb mixxx
GNU gdb Red Hat Linux (6.6-16.fc7rh)
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/local/bin/mixxx
[Thread debugging using libthread_db enabled]
[New Thread -1209030960 (LWP 4806)]
Debug: Starting up...
[New Thread -1215960176 (LWP 4809)]
[New Thread -1231176816 (LWP 4810)]
[New Thread -1250686064 (LWP 4811)]
Debug: SoundManager::SoundManager()
Debug: SampleRate 44100
Debug: Latency 36
Debug: SoundManager::queryDevices()
Debug: SoundManager::clearDeviceList()
Debug: SoundManager::closeDevices()
[New Thread -1264178288 (LWP 4812)]
[Detaching after fork from child process 4813. (Try `set detach-on-fork off'.)]
Debug: type signal
Debug: type marks
Debug: type signal
Debug: type marks
[New Thread -1274668144 (LWP 4814)]
[New Thread -1285158000 (LWP 4815)]
Debug: Loading playlists and library tracks from XML...
Debug: Track::readXML "/home/alex/.mixxxtrack.xml"
Debug: Break
Debug: Constructed LibraryScanner!!!
Debug: No playlists, returning
Debug: FIXME: Need to tell the m_pPlaylistListModel to refresh in src/track.cpp on line: 1120
Debug: Trying to add 119 songs to the library playlist
Debug: Adjusting column widths: tracktable width = 582 1% of that is: 5.82 FIXME: this should be done when initalizing the skin.
Debug: Shrinking Title/Comment for small screen...
Debug: selectedAPI is: "ALSA"
Debug: SoundManager::getDeviceList
Debug: SoundManager::getDeviceList
Debug: SoundManager::getDeviceList
[New Thread -1298138224 (LWP 4816)]
Debug: PowerMate: write(): Bad file descriptor
Debug: PowerMate: write(): Bad file descriptor
Debug: m_pHercules init: 0xb5e6b880
[New Thread -1308628080 (LWP 4817)]
Debug: Midi OK (Workaround not required)
Debug: setupMappings( "/usr/local/share/mixxx/midi/Numark Total Control.midi.xml" )
[Thread -1308628080 (LWP 4817) exited]
Debug: Found option "invert"
Debug: Option: 1
Debug: Found option "diff"
Debug: Option: 5
Debug: Setting "jog" sensitivity to 10
Debug: Found option "diff"
Debug: Option: 5
Debug: Setting "jog" sensitivity to 10
Debug: Found option "diff"
Debug: Option: 5
Debug: loadSettings: 1 0 "SlowFade"
Debug: slotApply crossfader: 1 "SlowFade"
Debug: BpmSchemes::readXML "/home/alex/.mixxxbpmscheme.xml"
Debug: SoundManager::setupDevices()
Debug: Xwax Vinyl control starting with a sample rate of: 44100
Debug: Building timecode lookup tables...
Allocating 2097152 slots (8192Kb) for 20 bit timecode (Serato 2nd Ed., side A)
[New Thread -1308628080 (LWP 4818)]
Debug: Created new VinylControlXwax!
Debug: Xwax Vinyl control starting with a sample rate of: 44100
Debug: Building timecode lookup tables...
[New Thread -1327510640 (LWP 4819)]
Debug: Created new VinylControlXwax!
Debug: SoundDevicePortAudio::open() "1, HDA ATI SB: ALC883 Analog (hw:0,0)"
Debug: m_dSampleRate 44100
Debug: iLatencyMSec: 36
Debug: output channels: 2 | input channels: 0
Debug: iLatencySamples: 3176
Debug: iLatencyMSec: 36
Debug: Opening stream with id 1
Debug: Opened PortAudio stream successfully... starting
[New Thread -1338000496 (LWP 4820)]
Debug: PortAudio: Started stream successfully
Debug: iNumDevicesOpenedForOutput: 1
Debug: iNumDevicesOpenedForInput: 0
Debug: file length 33437952
Debug: WaveSummary generation successful for "Glare-Alive_Again_PM.mp3"
Debug: ramp in
Debug: BPM detection successful for "Glare-Alive_Again_PM.mp3"
Debug: ramp in
Debug: ramp in
Debug: ramp in
Debug: ramp in
Debug: ramp in
Debug: ramp in
Debug: ramp in
Debug: ramp in
Debug: ramp in
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1338000496 (LWP 4820)]
0x0815f25c in RateTransposerFloat::transposeStereo (this=0xa2f0620, dest=0xae759940, src=0xa035b20, numSamples=100)
at lib/soundtouch/RateTransposer.cpp:590
590 dest[2 * i] = (SAMPLETYPE)((1.0f - fSlopeCount) * sPrevSampleL + fSlopeCount * src[0]);
(gdb) thread apply all bt
Thread 12 (Thread -1338000496 (LWP 4820)):
#0 0x0815f25c in RateTransposerFloat::transposeStereo (this=0xa2f0620, dest=0xae759940, src=0xa035b20, numSamples=100)
at lib/soundtouch/RateTransposer.cpp:590
#1 0x081602d2 in soundtouch::RateTransposer::transpose (this=0xa2f0620, dest=0xae759940, src=0xa035b20, numSamples=100)
at lib/soundtouch/RateTransposer.cpp:318
#2 0x0815f730 in soundtouch::RateTransposer::upsample (this=0xa2f0620, src=0xa035b20, numSamples=100)
at lib/soundtouch/RateTransposer.cpp:231
#3 0x0815f8d9 in soundtouch::RateTransposer::processSamples (this=0xa2f0620, src=0xa035b20, numSamples=100)
at lib/soundtouch/RateTransposer.cpp:303
#4 0x0815f915 in soundtouch::RateTransposer::putSamples (this=0xa2f0620, samples=0xa035b20, numSamples=100)
at lib/soundtouch/RateTransposer.cpp:212
#5 0x0815cc52 in soundtouch::SoundTouch::putSamples (this=0xa1089c0, samples=0xa035b20, numSamples=100)
at lib/soundtouch/SoundTouch.cpp:317
#6 0x0815b8c8 in EngineBufferScaleST::scale (this=0xa035860, playpos=604618.23999999987, buf_size=3176, pBase=0xb78fc008,
iBaseLength=819200) at src/enginebufferscalest.cpp:174
#7 0x080b5142 in EngineBuffer::process (this=0xa04f670, pOut=0xb5918008, iBufferSize=3176) at src/enginebuffer.cpp:1120
#8 0x080e0ed0 in EngineMaster::process (this=0xa081d50, pOut=0x0, iBufferSize=3176) at src/enginemaster.cpp:181
#9 0x0814b078 in SoundManager::requestBuffer (this=0xa0aca70, srcs=@0xb03fb210, iFramesPerBuffer=1588)
at src/soundmanager.cpp:440
#10 0x0815054c in SoundDevicePortAudio::callbackProcess (this=0xa0adef0, framesPerBuffer=1588, output=0xa331c00, in=0x0,
devIndex=1) at src/sounddeviceportaudio.cpp:305
#11 0x081506c2 in paV19Callback (inputBuffer=0x0, outputBuffer=0xa331c00, framesPerBuffer=1588, timeInfo=0xb03fb378,
statusFlags=0, _callbackStuff=0xa0adf30) at src/sounddeviceportaudio.cpp:362
#12 0x0032ae8c in AdaptingOutputOnlyProcess (bp=0xa350c94, streamCallbackResult=0xb03fb39c, hostOutputChannels=0xa046df0,
framesToProcess=400) at src/common/pa_process.c:1058
#13 0x0032bb59 in PaUtil_EndBufferProcessing (bp=0xa350c94, streamCallbackResult=0xb03fb39c) at src/common/pa_process.c:1581
#14 0x0033359d in CallbackThreadFunc (userData=0xa350c48) at src/hostapi/alsa/pa_linux_alsa.c:3303
#15 0x0079e44b in start_thread () from /lib/libpthread.so.0
#16 0x006cc80e in clone () from /lib/libc.so.6
Thread 11 (Thread -1327510640 (LWP 4819)):
#0 0x00110402 in __kernel_vsyscall ()
mixxxdj/mixxx#4910 0x007a2206 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
mixxxdj/mixxx#4911 0x001e41f8 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4912 0x08172258 in VinylControlXwax::run (this=0xa341098) at src/vinylcontrolxwax.cpp:128
mixxxdj/mixxx#4913 0x001e3917 in ?? () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4914 0x0079e44b in start_thread () from /lib/libpthread.so.0
---Type <return> to continue, or q <return> to quit---
mixxxdj/mixxx#4915 0x006cc80e in clone () from /lib/libc.so.6
Thread 10 (Thread -1308628080 (LWP 4818)):
#0 0x00110402 in __kernel_vsyscall ()
mixxxdj/mixxx#4910 0x007a2206 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
mixxxdj/mixxx#4911 0x001e41f8 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4912 0x08172258 in VinylControlXwax::run (this=0xa2b53d8) at src/vinylcontrolxwax.cpp:128
mixxxdj/mixxx#4913 0x001e3917 in ?? () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4914 0x0079e44b in start_thread () from /lib/libpthread.so.0
mixxxdj/mixxx#4915 0x006cc80e in clone () from /lib/libc.so.6
Thread 8 (Thread -1298138224 (LWP 4816)):
#0 0x00110402 in __kernel_vsyscall ()
mixxxdj/mixxx#4910 0x006c2a43 in poll () from /lib/libc.so.6
mixxxdj/mixxx#4911 0x08159422 in MidiObjectALSASeq::run (this=0xa104b18) at src/midiobjectalsaseq.cpp:250
mixxxdj/mixxx#4912 0x001e3917 in ?? () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4913 0x0079e44b in start_thread () from /lib/libpthread.so.0
mixxxdj/mixxx#4914 0x006cc80e in clone () from /lib/libc.so.6
Thread 7 (Thread -1285158000 (LWP 4815)):
#0 0x00110402 in __kernel_vsyscall ()
mixxxdj/mixxx#4910 0x007a2206 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
mixxxdj/mixxx#4911 0x001e41f8 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4912 0x08124085 in BpmDetector::run (this=0xa0ffe60) at src/bpmdetector.cpp:129
mixxxdj/mixxx#4913 0x001e3917 in ?? () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4914 0x0079e44b in start_thread () from /lib/libpthread.so.0
mixxxdj/mixxx#4915 0x006cc80e in clone () from /lib/libc.so.6
Thread 6 (Thread -1274668144 (LWP 4814)):
#0 0x00110402 in __kernel_vsyscall ()
mixxxdj/mixxx#4910 0x007a2206 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
mixxxdj/mixxx#4911 0x001e41f8 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4912 0x08123074 in WaveSummary::run (this=0xa0fd5e0) at src/wavesummary.cpp:81
mixxxdj/mixxx#4913 0x001e3917 in ?? () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4914 0x0079e44b in start_thread () from /lib/libpthread.so.0
mixxxdj/mixxx#4915 0x006cc80e in clone () from /lib/libc.so.6
Thread 5 (Thread -1264178288 (LWP 4812)):
---Type <return> to continue, or q <return> to quit---
#0 0x00110402 in __kernel_vsyscall ()
mixxxdj/mixxx#4910 0x006c5561 in select () from /lib/libc.so.6
mixxxdj/mixxx#4911 0x0026f69f in ?? () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4912 0x001e3917 in ?? () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4913 0x0079e44b in start_thread () from /lib/libpthread.so.0
mixxxdj/mixxx#4914 0x006cc80e in clone () from /lib/libc.so.6
Thread 4 (Thread -1250686064 (LWP 4811)):
#0 0x00110402 in __kernel_vsyscall ()
mixxxdj/mixxx#4910 0x007a2206 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
mixxxdj/mixxx#4911 0x001e41f8 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4912 0x081527fc in EngineSideChain::run (this=0xa08aeb8) at src/enginesidechain.cpp:145
mixxxdj/mixxx#4913 0x001e3917 in ?? () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4914 0x0079e44b in start_thread () from /lib/libpthread.so.0
mixxxdj/mixxx#4915 0x006cc80e in clone () from /lib/libc.so.6
Thread 3 (Thread -1231176816 (LWP 4810)):
#0 0x00110402 in __kernel_vsyscall ()
mixxxdj/mixxx#4910 0x007a2206 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
mixxxdj/mixxx#4911 0x001e41f8 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4912 0x080f6211 in Reader::run (this=0xa046218) at src/reader.cpp:256
mixxxdj/mixxx#4913 0x001e3917 in ?? () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4914 0x0079e44b in start_thread () from /lib/libpthread.so.0
mixxxdj/mixxx#4915 0x006cc80e in clone () from /lib/libc.so.6
Thread 2 (Thread -1215960176 (LWP 4809)):
#0 0x00110402 in __kernel_vsyscall ()
mixxxdj/mixxx#4910 0x007a2206 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
mixxxdj/mixxx#4911 0x001e41f8 in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4912 0x080f6211 in Reader::run (this=0xa032550) at src/reader.cpp:256
mixxxdj/mixxx#4913 0x001e3917 in ?? () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4914 0x0079e44b in start_thread () from /lib/libpthread.so.0
mixxxdj/mixxx#4915 0x006cc80e in clone () from /lib/libc.so.6
Thread 1 (Thread -1209030960 (LWP 4806)):
#0 0x00110402 in __kernel_vsyscall ()
mixxxdj/mixxx#4910 0x006c2a43 in poll () from /lib/libc.so.6
mixxxdj/mixxx#4911 0x00372803 in ?? () from /lib/libglib-2.0.so.0
---Type <return> to continue, or q <return> to quit---
mixxxdj/mixxx#4912 0x00372d35 in g_main_context_iteration () from /lib/libglib-2.0.so.0
mixxxdj/mixxx#4913 0x002a8ca8 in QEventDispatcherGlib::processEvents () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4914 0x03065c95 in ?? () from /usr/lib/libQtGui.so.4
mixxxdj/mixxx#4915 0x00286cc1 in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4916 0x00286dcc in QEventLoop::exec () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4917 0x0028917a in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
mixxxdj/mixxx#4918 0x02febd77 in QApplication::exec () from /usr/lib/libQtGui.so.4
mixxxdj/mixxx#4919 0x080c3b1e in main (argc=1, argv=0xbfbad444) at src/main.cpp:219
0x0815f25c 590 dest[2 * i] = (SAMPLETYPE)((1.0f - fSlopeCount) * sPrevSampleL + fSlopeCount * src[0]);
(gdb)