This is the first time I tried using drumkv1.
I built drumkv1 from today's git HEAD 80d65c41
I loaded one sample (a snare drum)
Connected MIDI Out from Qtractor to drumkv1 MIDI in.
Started play in Qtractor.
When the first snare note is sent, drumkv1 crashed.
This behavior happens every time I try it (5 times now).
I rebuilt it with --enable-debug.
Here's the backtrace:
$ gdb /usr/local/bin/drumkv1_jack GNU gdb (Debian 7.7.1+dfsg-5) 7.7.1 Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from /usr/local/bin/drumkv1_jack...done. (gdb) run Starting program: /usr/local/bin/drumkv1_jack [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffeaadb700 (LWP 18353)] [New Thread 0x7fffe9e83700 (LWP 18354)] [New Thread 0x7fffe9682700 (LWP 18355)] [New Thread 0x7fffe8e46700 (LWP 18358)] [New Thread 0x7fffe85c4700 (LWP 18359)] drumkv1widget::activateElement(36) drumkv1widget::updateSchedNotify(0, 0x0000) drumkv1widget::loadPreset("/home/genie/sub/studio/drumkv1/test.drumkv1") drumkv1widget::clearSampleFile() drumkv1widget::activateElement(36) drumkv1widget::updateSchedNotify(0, 0x0000) drumkv1widget::updateSchedNotify(4, 0xffffffff) drumkv1widget::updateSchedNotify(3, 0x0000) drumkv1widget::updateSchedNotify(3, 0x0000) drumkv1widget::updateSchedNotify(3, 0x0000) drumkv1widget::updateSchedNotify(3, 0x0000) drumkv1widget::updateSchedNotify(3, 0x0000) drumkv1widget::updateSchedNotify(3, 0x0000) drumkv1widget::updateSchedNotify(3, 0x0000) drumkv1widget::updateSchedNotify(4, 0xffffffff) drumkv1widget::updateSchedNotify(3, 0x0000) Program received signal SIGBUS, Bus error. [Switching to Thread 0x7fffe85c4700 (LWP 18359)] 0x00007ffff7230a3c in drumkv1_formant::Impl::vtab_coeffs(drumkv1_formant::Coeffs&, drumkv1_formant::Vtab const*, unsigned int, float) () from /usr/local/lib/libdrumkv1.so.0 (gdb) bt #0 0x00007ffff7230a3c in drumkv1_formant::Impl::vtab_coeffs(drumkv1_formant::Coeffs&, drumkv1_formant::Vtab const*, unsigned int, float) () from /usr/local/lib/libdrumkv1.so.0 #1 0x00007ffff7230bf8 in drumkv1_formant::Impl::reset_coeffs() () from /usr/local/lib/libdrumkv1.so.0 #2 0x00007ffff7230cfe in drumkv1_formant::reset_coeffs() () from /usr/local/lib/libdrumkv1.so.0 #3 0x00007ffff7226682 in drumkv1_formant::update (this=0x65f768, cutoff=100, reso=0) at drumkv1_formant.h:234 #4 0x00007ffff7226377 in drumkv1_formant::reset_filters (this=0x65f768, cutoff=100, reso=0) at drumkv1_formant.h:121 #5 0x00007ffff7221134 in drumkv1_impl::process_midi (this=0x662cc0, data=0x7fffe85c39d0 "\231&C\004\002", size=3) at drumkv1.cpp:1512 #6 0x00007ffff7223df9 in drumkv1::process_midi (this=0x65b8a0, data=0x7fffe85c39d0 "\231&C\004\002", size=3) at drumkv1.cpp:2231 #7 0x000000000040a2e5 in drumkv1_jack::process (this=0x65b8a0, nframes=128) at drumkv1_jack.cpp:271 #8 0x0000000000409b44 in drumkv1_jack_process (nframes=128, arg=0x65b8a0) at drumkv1_jack.cpp:112 #9 0x00007ffff795ce2f in ?? () from /usr/lib/x86_64-linux-gnu/libjack.so.0 #10 0x00007ffff51a6064 in start_thread (arg=0x7fffe85c4700) at pthread_create.c:309 #11 0x00007ffff46b962d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111 (gdb)
I don't know why the bt doesn't have line numbers for the functions in libdrumkv1.so, maybe because I didn't do make clean before ./configure --enable-debug
Anyway, even without exact line number, my guess is m_srate is 0, here:
const float Ri = ::expf(-M_PI * Bi / m_srate);
re. SIGBUS in drumkv1...
Oh, I forgot, one possibly useful clue:
I noticed that when connecting jack audio outs of drumkv1 to system.playback ins, it (both qjackctl and qtractor connections) refused to connect drumkv1.out_2 to system.playback_2. It drew the connection line and then a fraction of a second later erased the line. This also happens every time.
One time it emitted this message:
cannot complete execution of the processing graph (Resource temporarily unavailable)
jack_client_thread: graph error - exiting from JACK
but I think that time it crashed with SIGSEGV. This was before I build it with debug
re. SIGBUS in drumkv1...
After trying it again, this time I see a SIGSEGV, in same function.
re. SIGBUS in drumkv1...
reading from the above dump... hmm...
how come the "cutoff" filter parameter has a 3.125 value? the maximum sane value is 1.0.
i guess that's one suspect that some parameters values are borked if not the whole preset :/
you seem to be loading a "test.drumkv1" preset file: can you check if all the parameters have sane values, especially the ones named after DCF1_CUTOFF ?
cheers
re. SIGBUS in drumkv1...
preset version="0.5.1" name="test"
re. SIGBUS in drumkv1...
preset version="0.5.1" ?? last time you ran drumkv1 it was almost four (4) years ago?
i'm afraid things just aren't so backwards compatible nowadays :)
please try to get rid of the ancient configuration file
~/.config/rncbc.org/drumkv1.conf
and start again.hth.
cheers
re. SIGBUS in drumkv1...
cutoff=3.125 doesn't appear to have come from the preset file, the value there is 100, as shown in my previous message.
The drumkv1.conf looks OK to me:
In any case, a program shouldn't crash simply because it was fed some unexpected data.
Because sometimes it crashes with SIGBUS, and other times with SIGSEGV, that indicates to me there is some memory corrupted, i.e. bad pointer or buffer overflow somewhere. Corrupt m_srate to 0, and later you get a SIGBUS. Corrupt some index or pointer, later you get a SIGSEGV.
Maybe the cutoff=3.125 also came from someone scribbling in memory they shouldn't have.
re. SIGBUS in drumkv1...
your .conf file have these lines that are causing it to load an outdated preset file on every startup:
have you tried as said before? or you can just remove the lines above from the .conf, it serves either way to the purpose at hand.
byee
Add new comment