Hmmm, right, so has anyone else besides Jan tried the new MIDI-out code
on Linux?
It looks like something weird is happening in MidiObject::sendShortMsg()
(src/midiobject.cpp) or MidiLedHandler::controlChanged()
(src/midihandlerled.cpp)...
Thanks,
Albert
On Fri, 2008-01-25 at 20:28 +0100, Oriol Puigbó wrote:
> Thanks Albert,
>
> I've compiled mixxx with optimize=0 and I've generated the following
> backtrace:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1237276992 (LWP 8826)]
> 0xb6b3655b in strlen () from /lib/tls/i686/cmov/libc.so.6
> (gdb) thread apply all bt
>
> Thread 22 (Thread -1593152624 (LWP 8959)):
> #0 0xb6b2e093 in ?? () from /lib/tls/i686/cmov/libc.so.6
> #1 0x00000391 in ?? ()
> #2 0x000000a5 in ?? ()
> #3 0x00000028 in ?? ()
> #4 0xb6b301bd in ?? () from /lib/tls/i686/cmov/libc.so.6
> #5 0xa10a5d84 in ?? ()
> #6 0xa10a5e68 in ?? ()
> #7 0x1c93bb9d in ?? ()
> #8 0x00000042 in ?? ()
> #9 0xb6b31fc0 in malloc () from /lib/tls/i686/cmov/libc.so.6
> #10 0xb6cfa6a7 in operator new () from /usr/lib/libstdc++.so.6
> #11 0xb6cfa7dd in operator new[] () from /usr/lib/libstdc++.so.6
> #12 0x08157838 in soundtouch::FIFOSampleBuffer::ensureCapacity (
> this=0x8b3a774, capacityRequirement=100)
> at lib/soundtouch/FIFOSampleBuffer.cpp:169
> #13 0x081579d6 in soundtouch::FIFOSampleBuffer::ptrEnd
> (this=0x8b3a774,
> slackCapacity=100) at lib/soundtouch/FIFOSampleBuffer.cpp:138
> #14 0x08157a20 in soundtouch::FIFOSampleBuffer::putSamples
> (this=0x8b3a774,
> samples=0xb3ae3b08, numSamples=100)
> at lib/soundtouch/FIFOSampleBuffer.cpp:103
> #15 0x0815526e in soundtouch::TDStretch::putSamples (this=0x8b3a718,
> ---Type <return> to continue, or q <return> to quit---
> samples=0xb3ae3b08, numSamples=100) at
> lib/soundtouch/TDStretch.cpp:628
> #16 0x081537de in soundtouch::SoundTouch::putSamples (this=0x8b67440,
> samples=0xb3ae3b08, numSamples=100) at
> lib/soundtouch/SoundTouch.cpp:311
> #17 0x081525bc in EngineBufferScaleST::scale (this=0x8b53218,
> playpos=41663.934800000512, buf_size=2648, pBase=0xb3abb008,
> iBaseLength=819200) at src/enginebufferscalest.cpp:188
> #18 0x080b09a9 in EngineBuffer::process (this=0x8369040,
> pOut=0xb1ebc008,
> iBufferSize=2648) at src/enginebuffer.cpp:1120
> #19 0x080db6ac in EngineMaster::process (this=0xb30074d8, pOut=0x0,
> iBufferSize=2648) at src/enginemaster.cpp:181
> #20 0x08141c88 in SoundManager::requestBuffer (this=0xb300d868,
> [EMAIL PROTECTED], iFramesPerBuffer=1324) at
> src/soundmanager.cpp:440
> #21 0x0814707c in SoundDevicePortAudio::callbackProcess
> (this=0xb300eae8,
> framesPerBuffer=1324, output=0x8b5ed60, in=0x0, devIndex=4)
> at src/sounddeviceportaudio.cpp:297
> #22 0x081471f2 in paV19Callback (inputBuffer=0x0,
> outputBuffer=0x8b5ed60,
> framesPerBuffer=1324, timeInfo=0xa10a6388, statusFlags=0,
> _callbackStuff=0xb300eb28) at src/sounddeviceportaudio.cpp:354
> #23 0xb6ff435d in ?? () from /usr/lib/libportaudio.so.2
> #24 0x00000000 in ?? ()
>
> Thread 21 (Thread -1567974512 (LWP 8958)):
> #0 0xffffe410 in __kernel_vsyscall ()
> ---Type <return> to continue, or q <return> to quit---
> #1 0xb6fde676 in pthread_cond_wait@@GLIBC_2.3.2 ()
> from /lib/tls/i686/cmov/libpthread.so.0
> #2 0xb722829d in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
> #3 0x081691c0 in VinylControlXwax::run (this=0x8bc4300)
> at src/vinylcontrolxwax.cpp:128
> #4 0xb7227eb5 in ?? () from /usr/lib/libQtCore.so.4
> #5 0x08bc4300 in ?? ()
> #6 0x00000000 in ?? ()
>
> Thread 20 (Thread -1584759920 (LWP 8957)):
> #0 0xffffe410 in __kernel_vsyscall ()
> #1 0xb6fde676 in pthread_cond_wait@@GLIBC_2.3.2 ()
> from /lib/tls/i686/cmov/libpthread.so.0
> #2 0xb722829d in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
> #3 0x081691c0 in VinylControlXwax::run (this=0x8b7cd38)
> at src/vinylcontrolxwax.cpp:128
> #4 0xb7227eb5 in ?? () from /usr/lib/libQtCore.so.4
> #5 0x08b7cd38 in ?? ()
> #6 0x00000000 in ?? ()
>
> Thread 11 (Thread -1559581808 (LWP 8850)):
> #0 0xffffe410 in __kernel_vsyscall ()
> #1 0xb6b8f5e7 in poll () from /lib/tls/i686/cmov/libc.so.6
> ---Type <return> to continue, or q <return> to quit---
> #2 0x0814ff85 in MidiObjectALSASeq::run (this=0x84230e0)
> at src/midiobjectalsaseq.cpp:250
> #3 0xb7227eb5 in ?? () from /usr/lib/libQtCore.so.4
> #4 0x084230e0 in ?? ()
> #5 0x00000000 in ?? ()
>
> Thread 9 (Thread -1330467952 (LWP 8842)):
> #0 0xffffe410 in __kernel_vsyscall ()
> #1 0xb6fde676 in pthread_cond_wait@@GLIBC_2.3.2 ()
> from /lib/tls/i686/cmov/libpthread.so.0
> #2 0xb722829d in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
> #3 0x0811b1cc in BpmDetector::run (this=0x840f6c8) at
> src/bpmdetector.cpp:122
> #4 0xb7227eb5 in ?? () from /usr/lib/libQtCore.so.4
> #5 0x0840f6c8 in ?? ()
> #6 0x00000000 in ?? ()
>
> Thread 8 (Thread -1343226992 (LWP 8841)):
> #0 0xffffe410 in __kernel_vsyscall ()
> #1 0xb6fde676 in pthread_cond_wait@@GLIBC_2.3.2 ()
> from /lib/tls/i686/cmov/libpthread.so.0
> #2 0xb722829d in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
> #3 0x0811a158 in WaveSummary::run (this=0x83d3ff8) at
> src/wavesummary.cpp:81
> #4 0xb7227eb5 in ?? () from /usr/lib/libQtCore.so.4
> ---Type <return> to continue, or q <return> to quit---
> #5 0x083d3ff8 in ?? ()
> #6 0x00000000 in ?? ()
>
> Thread 5 (Thread -1321055344 (LWP 8836)):
> #0 0xffffe410 in __kernel_vsyscall ()
> #1 0xb6b922a1 in select () from /lib/tls/i686/cmov/libc.so.6
> #2 0xb72c2f82 in ?? () from /usr/lib/libQtCore.so.4
> #3 0x0000000a in ?? ()
> #4 0xb7227eb5 in ?? () from /usr/lib/libQtCore.so.4
> #5 0x08328e38 in ?? ()
> #6 0x00000000 in ?? ()
>
> Thread 4 (Thread -1311880304 (LWP 8831)):
> #0 0xffffe410 in __kernel_vsyscall ()
> #1 0xb6fde676 in pthread_cond_wait@@GLIBC_2.3.2 ()
> from /lib/tls/i686/cmov/libpthread.so.0
> #2 0xb722829d in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
> #3 0x08149194 in EngineSideChain::run (this=0x8360920)
> at src/enginesidechain.cpp:143
> #4 0xb7227eb5 in ?? () from /usr/lib/libQtCore.so.4
> #5 0x08360920 in ?? ()
> #6 0x00000000 in ?? ()
>
> ---Type <return> to continue, or q <return> to quit---
> Thread 3 (Thread -1295770736 (LWP 8830)):
> #0 0xffffe410 in __kernel_vsyscall ()
> #1 0xb6fde676 in pthread_cond_wait@@GLIBC_2.3.2 ()
> from /lib/tls/i686/cmov/libpthread.so.0
> #2 0xb722829d in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
> #3 0x080f0881 in Reader::run (this=0x83593c8) at src/reader.cpp:256
> #4 0xb7227eb5 in ?? () from /usr/lib/libQtCore.so.4
> #5 0x083593c8 in ?? ()
> #6 0x00000000 in ?? ()
>
> Thread 2 (Thread -1281238128 (LWP 8829)):
> #0 0xffffe410 in __kernel_vsyscall ()
> #1 0xb6fde676 in pthread_cond_wait@@GLIBC_2.3.2 ()
> from /lib/tls/i686/cmov/libpthread.so.0
> #2 0xb722829d in QWaitCondition::wait () from /usr/lib/libQtCore.so.4
> #3 0x080f0881 in Reader::run (this=0x8364d30) at src/reader.cpp:256
> #4 0xb7227eb5 in ?? () from /usr/lib/libQtCore.so.4
> #5 0x08364d30 in ?? ()
> #6 0x00000000 in ?? ()
>
> Thread 1 (Thread -1237276992 (LWP 8826)):
> #0 0xb6b3655b in strlen () from /lib/tls/i686/cmov/libc.so.6
> #1 0xb6b06de0 in vfprintf () from /lib/tls/i686/cmov/libc.so.6
> ---Type <return> to continue, or q <return> to quit---
> #2 0xb6b26ef4 in vsnprintf () from /lib/tls/i686/cmov/libc.so.6
> #3 0xb72708f2 in qvsnprintf () from /usr/lib/libQtCore.so.4
> #4 0xb721f3e5 in qDebug () from /usr/lib/libQtCore.so.4
> #5 0x080bfb85 in MidiObject::sendShortMsg (this=0x84230e0, status=127
> '\177',
> byte1=18 '\022', byte2=1 '\001') at src/midiobject.cpp:231
> #6 0x0813fe45 in MidiLedHandler::controlChanged (this=0x8bcfeb0,
> value=1)
> at src/midiledhandler.cpp:26
> #7 0x08177fdb in MidiLedHandler::qt_metacall (this=0x8bcfeb0,
> _c=QMetaObject::InvokeMetaMethod, _id=0, _a=0xa9aa2190)
> at src/.obj/moc_midiledhandler.cc:64
> #8 0xb72ea5c4 in QMetaCallEvent::placeMetaCall ()
> from /usr/lib/libQtCore.so.4
> #9 0xb72ef933 in QObject::event () from /usr/lib/libQtCore.so.4
> #10 0xb76da44d in QApplicationPrivate::notify_helper ()
> from /usr/lib/libQtGui.so.4
> #11 0xb76da74e in QApplication::notify () from /usr/lib/libQtGui.so.4
> #12 0xb72dd456 in QCoreApplication::notifyInternal ()
> from /usr/lib/libQtCore.so.4
> #13 0xb72e081f in ?? () from /usr/lib/libQtCore.so.4
> #14 0x08318b38 in ?? ()
> #15 0x08bcfeb0 in ?? ()
> #16 0xaa4bd118 in ?? ()
> #17 0xb72233d7 in ?? () from /usr/lib/libQtCore.so.4
> #18 0x08317e9c in ?? ()
> ---Type <return> to continue, or q <return> to quit---
> #19 0xb7362e20 in ?? () from /usr/lib/libQtCore.so.4
> #20 0xbfc9a878 in ?? ()
> #21 0xb72dd92d in QCoreApplicationPrivate::sendPostedEvents ()
> from /usr/lib/libQtCore.so.4
> Backtrace stopped: frame did not save the PC
> (gdb)
>
> 2008/1/25, Albert Santoni <[EMAIL PROTECTED]>:
> Hi Oriol,
>
> Sorry for the delay. I've never seen those MIDI mapping
> warnings
> ("Warning: Missing <key> or <type> in MIDI map node:
> "#comment"")
> before, so they might have something to do with this crash.
>
> If you want to find the place where it hangs, I'd first
> generate a
> backtrace and post it here:
> http://mixxx.sourceforge.net/wiki/index.php/Backtraces
>
> I can help you pinpoint the spot where it crashes from the
> backtrace.
> There's a nice front-end to gdb that I use for debugging
> called
> "nemiver", and I'd recommend using it if you want to step
> through the
> program to see what happens before it crashes.
>
> Thanks,
>
> Albert
>
>
> On Fri, 2008-01-25 at 14:25 +0100, Oriol Puigbó wrote:
> > Hi again,
> >
> > I'd like to try debugging what's happening with the leds on
> the
> > BCD3000. Is there any kind of IDE I could use for running
> mixxx
> > step-by-step and try to discover where it hangs up?
> >
> > Cheers,
> >
> > Oriol
> >
> > 2008/1/19, Oriol Puigbó <[EMAIL PROTECTED]>:
> > Hi,
> >
> > I've been testing the leds with the BCD3000 on linux
> this
> > morning. The code in the xml file for a test led is:
> >
> > <lights>
> > <light>
> > <group>[Channel1]</group>
> > <key>play</key>
> > <status>0x7F</status>
> > <midino>0x12</midino>
> > <threshold>0.5</threshold>
> > </light>
> > </lights>
> >
> > However, when I try to load a song on Deck A, mixxx
> crashes. I
> > send below the last messages I see on the terminal
> where mixxx
> > was running. If I comment out the lights code shown
> above,
> > mixxx runs fine and I can control it using the
> BCD3000
> > (without the leds working). Any idea?
> >
> > Debug: SoundManager::getDeviceList
> > Debug: SoundManager::getDeviceList
> > Debug: SoundManager::getDeviceList
> > Debug: qstring_to_xtp result code -2
> > Debug: PowerMate: write(): Bad file descriptor
> > Debug: PowerMate: write(): Bad file descriptor
> > Debug: m_pHercules init: 0xbd47c78
> > Debug: Midi OK (Workaround not required)
> > Debug:
> >
> setupMappings( "/usr/local/share/mixxx/midi/BCD3000.midi.xml" )
> > Warning: Missing <key> or <type> in MIDI map node:
> "#comment"
> > Warning: No <midino> defined in MIDI map node:
> "#comment"
> > Warning: Missing <key> or <type> in MIDI map node:
> "#comment"
> > Warning: No <midino> defined in MIDI map node:
> "#comment"
> > Debug: Config value: "0 ch 1"
> > Warning: No <midino> defined in MIDI map node:
> "control"
> > Warning: No <midino> defined in MIDI map node:
> "control"
> > Warning: Missing <key> or <type> in MIDI map node:
> "#comment"
> > Warning: No <midino> defined in MIDI map node:
> "#comment"
> > Debug: Config value: "0 ch 1"
> > Warning: Missing <key> or <type> in MIDI map node:
> "#comment"
> > Warning: No <midino> defined in MIDI map node:
> "#comment"
> > Debug: Config value: "0 ch 1"
> > Debug: Setting "wheel" sensitivity to 30
> > Debug: MIDI Map: Value Translation: Range of values
> 63-65 ->
> > 64
> > Debug: Found option "spread64"
> > Debug: Option: 9
> > Debug: Setting "wheel" sensitivity to 30
> > Debug: MIDI Map: Value Translation: Range of values
> 63-65 ->
> > 64
> > Debug: Found option "spread64"
> > Debug: Option: 9
> > Warning: Missing <key> or <type> in MIDI map node:
> "#comment"
> > Warning: No <midino> defined in MIDI map node:
> "#comment"
> > Debug: Config value: "0 ch 1"
> > Debug: qstring_to_xtp result code -2
> > Warning: Qt: Locale not supported on X server
> > Debug: qstring_to_xtp result code -2
> > Debug: qstring_to_xtp result code -2
> > Debug: qstring_to_xtp result code -2
> > Debug: loadSettings: 1 0 "SlowFade"
> > Debug: slotApply crossfader: 1 "SlowFade"
> > Debug: qstring_to_xtp result code -2
> > Debug: qstring_to_xtp result code -2
> > 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)
> > Debug: Created new VinylControlXwax!
> > Debug: Xwax Vinyl control starting with a sample
> rate of:
> > 44100
> > Debug: Building timecode lookup tables...
> > Debug: Created new VinylControlXwax!
> > Debug: SoundDevicePortAudio::open() "4, BCD3000: USB
> Audio
> > (hw:1,0)"
> > Debug: m_dSampleRate 44100
> > Debug: iLatencyMSec: 15
> > Debug: output channels: 4 | input channels: 0
> > Debug: iLatencySamples: 2648
> > Debug: iLatencyMSec: 15
> > Debug: Opening stream with id 4
> > Debug: Opened PortAudio stream successfully...
> starting
> > Debug: PortAudio: Started stream successfully
> > Debug: iNumDevicesOpenedForOutput: 1
> > Debug: iNumDevicesOpenedForInput: 0
> > Debug: file length 22572288
> > Segmentation fault (core dumped)
> > [EMAIL PROTECTED]:~$
> >
> >
> >
> >
> >
> > 2008/1/11, Albert Santoni <[EMAIL PROTECTED]>:
> > Hi Ján,
> >
> > I've reviewed, tested, and committed your
> updated
> > patch. Nothing seemed
> > to break when I tested it with one of my
> MIDI
> > controllers, so if anyone
> > notices any odd MIDI stuff with ALSA on
> Linux in the
> > next week or so,
> > please speak up!
> >
> > While I was testing I noticed a minor bug in
> alsaseq
> > MIDI code we have
> > (unrelated to your patch). Sometimes when
> you select a
> > different MIDI
> > device in the options, it doesn't properly
> disconnect
> > from the previous
> > one, leaving you with two devices hooked up
> to the
> > Mixxx aseq port. (If
> > you crack open the Connect/MIDI tab in
> qjackctl,
> > you'll see what I
> > mean.) It's not a biggie, but if someone
> feels like
> > fixing it, be my
> > guest. :)
> >
> > Thanks,
> > Albert
> >
> > On Tue, 2008-01-08 at 12:07 +0100, Jan
> Jockusch wrote:
> > > Hello list,
> > >
> > > I know everyone is deep into testing, but
> I think
> > one small bonus should
> > > be added for us Jack/ALSA users, which is
> LED
> > control via MIDI. I
> > > implemented this specifically to enable
> LED control
> > on my DM2, but
> > > others will surely benefit as well.
> > >
> > > Albert and Adam: I am about the farthest
> from an
> > ALSA API expert you can
> > > imagine, so please check what I did. I
> believe that
> > the flags are all
> > > right, I think SND_SEQ_PORT_CAP_DUPLEX is
> > unnecessary. I also found that
> > > the constructor does not need to connect
> the port,
> > because the
> > > subsequent devOpen() call does just that,
> so I
> > removed that segment.
> > >
> > > I hope this is good to commit.
> > >
> > > - Ján
> > >
> > >
> >
>
> -------------------------------------------------------------------------
> > > Check out the new SourceForge.net
> Marketplace.
> > > It's the best place to buy or sell
> services for
> > > just about anything Open Source.
> > >
> >
>
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> > >
> _______________________________________________
> > > Mixxx-devel mailing list
> > > [email protected]
> > >
> >
> https://lists.sourceforge.net/lists/listinfo/mixxx-devel
> >
> >
> >
>
> -------------------------------------------------------------------------
> > Check out the new SourceForge.net
> Marketplace.
> > It's the best place to buy or sell services
> for
> > just about anything Open Source.
> >
>
> http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
> >
> _______________________________________________
> > Mixxx-devel mailing list
> > [email protected]
> >
> https://lists.sourceforge.net/lists/listinfo/mixxx-devel
> >
> >
> >
>
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by: Microsoft
> > Defy all challenges. Microsoft(R) Visual Studio 2008.
> > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> > _______________________________________________ Mixxx-devel
> mailing list [email protected]
> https://lists.sourceforge.net/lists/listinfo/mixxx-devel
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________ Mixxx-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mixxx-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mixxx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mixxx-devel