Page 1 of 1

Segfault in RGB-Audio-Matrix - Linux

Posted: Wed Jul 15, 2015 8:34 am
by 1358
Hi,

qlc+ segfaults on creating an audio spectrum rgb matrix

Code: Select all

$ valgrind qlcplus --leak-check=full --show-reachable --track-origins=yes
==14384== Memcheck, a memory error detector
==14384== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==14384== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==14384== Command: qlcplus --leak-check=full --show-reachable --track-origins=yes
==14384== 

Q Light Controller Plus version 4.9.0
This program is licensed under the terms of the Apache 2.0 license.
Copyright (c) Heikki Junnila (hjunnila@users.sf.net)
Copyright (c) Massimo Callegari (massimocallegari@yahoo.it)

==14384== Warning: set address range perms: large range [0x3a056000, 0xba056000) (defined)
==14384== Invalid read of size 1
==14384==    at 0x12C30158: usb_parse_descriptor (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==14384==    by 0x12C305AC: usb_parse_configuration (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==14384==    by 0x12C3258C: usb_os_find_devices (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==14384==    by 0x12C2FB5F: usb_find_devices (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==14384==    by 0x12817A94: QLCFTDI::widgets() (in /usr/lib/qt4/plugins/qlcplus/libdmxusb.so)
==14384==    by 0x128047F4: DMXUSB::rescanWidgets() (in /usr/lib/qt4/plugins/qlcplus/libdmxusb.so)
==14384==    by 0x4F07A8D: IOPluginCache::load(QDir const&) (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x5274BE5: App::initDoc() (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x5278AB8: App::init() (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x5279CBD: App::startup() (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x401FAE: ??? (in /usr/bin/qlcplus)
==14384==    by 0x706CA3F: (below main) (libc-start.c:289)
==14384==  Address 0x12044d68 is 0 bytes after a block of size 216 alloc'd
==14384==    at 0x4C2BBA0: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==14384==    by 0x12C3253C: usb_os_find_devices (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==14384==    by 0x12C2FB5F: usb_find_devices (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==14384==    by 0x12817A94: QLCFTDI::widgets() (in /usr/lib/qt4/plugins/qlcplus/libdmxusb.so)
==14384==    by 0x128047F4: DMXUSB::rescanWidgets() (in /usr/lib/qt4/plugins/qlcplus/libdmxusb.so)
==14384==    by 0x4F07A8D: IOPluginCache::load(QDir const&) (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x5274BE5: App::initDoc() (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x5278AB8: App::init() (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x5279CBD: App::startup() (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x401FAE: ??? (in /usr/bin/qlcplus)
==14384==    by 0x706CA3F: (below main) (libc-start.c:289)
==14384== 
==14384== Conditional jump or move depends on uninitialised value(s)
==14384==    at 0x5302158: RGBMatrixEditor::slotPreviewTimeout() (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x53FD744: ??? (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x67D21EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67D67B2: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x5B049BB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==14384==    by 0x5B0B4D7: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==14384==    by 0x67BD1CC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67EEE9A: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67EBE90: timerSourceDispatch(_GSource*, int (*)(void*), void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x95C4C3C: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==14384==    by 0x95C4F1F: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==14384==    by 0x95C4FCB: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==14384== 
==14384== Thread 5 AudioCaptureAlsa:
==14384== Conditional jump or move depends on uninitialised value(s)
==14384==    at 0x4EB6405: AudioCapture::processData() (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x4EB69BC: AudioCapture::run() (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x66B26FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x88B46A9: start_thread (pthread_create.c:333)
==14384==    by 0x7152EEC: clone (clone.S:109)
==14384== 
==14384== Conditional jump or move depends on uninitialised value(s)
==14384==    at 0x4EB581C: AudioCapture::fillBandsData(int) (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x4EB655A: AudioCapture::processData() (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x4EB69BC: AudioCapture::run() (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x66B26FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x88B46A9: start_thread (pthread_create.c:333)
==14384==    by 0x7152EEC: clone (clone.S:109)
==14384== 
==14384== Conditional jump or move depends on uninitialised value(s)
==14384==    at 0x4EB583C: AudioCapture::fillBandsData(int) (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x4EB655A: AudioCapture::processData() (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x4EB69BC: AudioCapture::run() (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x66B26FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x88B46A9: start_thread (pthread_create.c:333)
==14384==    by 0x7152EEC: clone (clone.S:109)
==14384== 
==14384== Conditional jump or move depends on uninitialised value(s)
==14384==    at 0x4EB5825: AudioCapture::fillBandsData(int) (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x4EB655A: AudioCapture::processData() (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x4EB69BC: AudioCapture::run() (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x66B26FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x88B46A9: start_thread (pthread_create.c:333)
==14384==    by 0x7152EEC: clone (clone.S:109)
==14384== 
==14384== Conditional jump or move depends on uninitialised value(s)
==14384==    at 0x4EB5861: AudioCapture::fillBandsData(int) (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x4EB655A: AudioCapture::processData() (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x4EB69BC: AudioCapture::run() (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x66B26FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x88B46A9: start_thread (pthread_create.c:333)
==14384==    by 0x7152EEC: clone (clone.S:109)
==14384== 
==14384== Thread 1:
==14384== Conditional jump or move depends on uninitialised value(s)
==14384==    at 0x4F11D51: RGBAudio::rgbMap(QSize const&, unsigned int, int) (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x4F14A4F: RGBMatrix::previewMap(int) (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x53021BB: RGBMatrixEditor::slotPreviewTimeout() (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x53FD744: ??? (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x67D21EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67D67B2: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x5B049BB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==14384==    by 0x5B0B4D7: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==14384==    by 0x67BD1CC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67EEE9A: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67EBEC8: idleTimerSourceDispatch(_GSource*, int (*)(void*), void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x95C4C3C: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==14384== 
==14384== Use of uninitialised value of size 8
==14384==    at 0x4F11D94: RGBAudio::rgbMap(QSize const&, unsigned int, int) (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x4F14A4F: RGBMatrix::previewMap(int) (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x53021BB: RGBMatrixEditor::slotPreviewTimeout() (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x53FD744: ??? (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x67D21EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67D67B2: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x5B049BB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==14384==    by 0x5B0B4D7: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==14384==    by 0x67BD1CC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67EEE9A: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67EBEC8: idleTimerSourceDispatch(_GSource*, int (*)(void*), void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x95C4C3C: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==14384== 
==14384== Invalid read of size 8                                                                                                                                                    pts/1 1035
==14384==    at 0x4F11D94: RGBAudio::rgbMap(QSize const&, unsigned int, int) (in /usr/lib/libqlcplusengine.so.1.0.0)                                                                        \253\2734==    by 0x4F14A4F: RGBMatrix::previewMap(int) (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x53021BB: RGBMatrixEditor::slotPreviewTimeout() (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x53FD744: ??? (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x67D21EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67D67B2: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x5B049BB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==14384==    by 0x5B0B4D7: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==14384==    by 0x67BD1CC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67EEE9A: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67EBEC8: idleTimerSourceDispatch(_GSource*, int (*)(void*), void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x95C4C3C: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==14384==  Address 0xfffffffc0ce55600 is not stack'd, malloc'd or (recently) free'd
==14384== 
==14384== 
==14384== Process terminating with default action of signal 11 (SIGSEGV)
==14384==  Access not within mapped region at address 0xFFFFFFFC0CE55600
==14384==    at 0x4F11D94: RGBAudio::rgbMap(QSize const&, unsigned int, int) (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x4F14A4F: RGBMatrix::previewMap(int) (in /usr/lib/libqlcplusengine.so.1.0.0)
==14384==    by 0x53021BB: RGBMatrixEditor::slotPreviewTimeout() (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x53FD744: ??? (in /usr/lib/libqlcplusui.so.1.0.0)
==14384==    by 0x67D21EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67D67B2: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x5B049BB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==14384==    by 0x5B0B4D7: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==14384==    by 0x67BD1CC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67EEE9A: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x67EBEC8: idleTimerSourceDispatch(_GSource*, int (*)(void*), void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==14384==    by 0x95C4C3C: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==14384==  If you believe this happened as a result of a stack
==14384==  overflow in your program's main thread (unlikely but
==14384==  possible), you can try to increase the size of the
==14384==  main thread stack using the --main-stacksize= flag.
==14384==  The main thread stack size used in this run was 8388608.
==14384== 
==14384== HEAP SUMMARY:
==14384==     in use at exit: 8,557,206 bytes in 68,167 blocks
==14384==   total heap usage: 446,798 allocs, 378,631 frees, 108,249,212 bytes allocated
==14384== 
==14384== LEAK SUMMARY:
==14384==    definitely lost: 15,040 bytes in 46 blocks
==14384==    indirectly lost: 49,527 bytes in 2,124 blocks
==14384==      possibly lost: 954,553 bytes in 10,781 blocks
==14384==    still reachable: 7,538,086 bytes in 55,216 blocks
==14384==         suppressed: 0 bytes in 0 blocks
==14384== Rerun with --leak-check=full to see details of leaked memory
==14384== 
==14384== For counts of detected and suppressed errors, rerun with: -v
==14384== Use --track-origins=yes to see where uninitialised values come from
==14384== ERROR SUMMARY: 413908 errors from 10 contexts (suppressed: 0 from 0)
Killed

Re: Segfault in RGB-Audio-Matrix

Posted: Wed Jul 15, 2015 9:10 am
by 1358
Build width debug symbols directly from git (current HEAD):

Code: Select all

$ valgrind qlcplus --leak-check=full --show-reachable --track-origins=yes
==25081== Memcheck, a memory error detector
==25081== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==25081== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==25081== Command: qlcplus --leak-check=full --show-reachable --track-origins=yes
==25081== 

Q Light Controller Plus version 4.9.2 GIT
This program is licensed under the terms of the Apache 2.0 license.
Copyright (c) Heikki Junnila (hjunnila@users.sf.net)
Copyright (c) Massimo Callegari (massimocallegari@yahoo.it)

==25081== Warning: set address range perms: large range [0x3a056000, 0xba056000) (defined)
==25081== Invalid read of size 1
==25081==    at 0x16E72158: usb_parse_descriptor (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==25081==    by 0x16E725AC: usb_parse_configuration (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==25081==    by 0x16E7458C: usb_os_find_devices (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==25081==    by 0x16E71B5F: usb_find_devices (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==25081==    by 0x16A2DD92: QLCFTDI::widgets() (qlcftdi-libftdi.cpp:143)
==25081==    by 0x16A1A72E: DMXUSB::rescanWidgets() (dmxusb.cpp:66)
==25081==    by 0x16A1A66D: DMXUSB::init() (dmxusb.cpp:45)
==25081==    by 0x4F5C69E: IOPluginCache::load(QDir const&) (ioplugincache.cpp:74)
==25081==    by 0x53545D7: App::initDoc() (app.cpp:441)
==25081==    by 0x5352C42: App::init() (app.cpp:236)
==25081==    by 0x5352669: App::startup() (app.cpp:168)
==25081==    by 0x403E42: main (main.cpp:328)
==25081==  Address 0x15736b58 is 0 bytes after a block of size 216 alloc'd
==25081==    at 0x4C2BBA0: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x16E7453C: usb_os_find_devices (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==25081==    by 0x16E71B5F: usb_find_devices (in /lib/x86_64-linux-gnu/libusb-0.1.so.4.4.4)
==25081==    by 0x16A2DD92: QLCFTDI::widgets() (qlcftdi-libftdi.cpp:143)
==25081==    by 0x16A1A72E: DMXUSB::rescanWidgets() (dmxusb.cpp:66)
==25081==    by 0x16A1A66D: DMXUSB::init() (dmxusb.cpp:45)
==25081==    by 0x4F5C69E: IOPluginCache::load(QDir const&) (ioplugincache.cpp:74)
==25081==    by 0x53545D7: App::initDoc() (app.cpp:441)
==25081==    by 0x5352C42: App::init() (app.cpp:236)
==25081==    by 0x5352669: App::startup() (app.cpp:168)
==25081==    by 0x403E42: main (main.cpp:328)
==25081== 
==25081== Conditional jump or move depends on uninitialised value(s)
==25081==    at 0x540971B: RGBMatrixEditor::slotPreviewTimeout() (rgbmatrixeditor.cpp:577)
==25081==    by 0x55375FD: RGBMatrixEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_rgbmatrixeditor.cpp:115)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x69637B2: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5C919BB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==25081==    by 0x5C984D7: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==25081==    by 0x694A1CC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x697BE9A: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x6978EC8: idleTimerSourceDispatch(_GSource*, int (*)(void*), void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x8ECAC3C: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==25081==    by 0x8ECAF1F: ??? (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==25081==    by 0x8ECAFCB: g_main_context_iteration (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==25081== 
==25081== Conditional jump or move depends on uninitialised value(s)
==25081==    at 0x4F67AE5: RGBAudio::rgbMap(QSize const&, unsigned int, int) (rgbaudio.cpp:151)
==25081==    by 0x4F69B5F: RGBMatrix::previewMap(int) (rgbmatrix.cpp:234)
==25081==    by 0x54098C3: RGBMatrixEditor::slotPreviewTimeout() (rgbmatrixeditor.cpp:602)
==25081==    by 0x55375FD: RGBMatrixEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_rgbmatrixeditor.cpp:115)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x69637B2: QObject::event(QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5C919BB: QApplicationPrivate::notify_helper(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==25081==    by 0x5C984D7: QApplication::notify(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==25081==    by 0x694A1CC: QCoreApplication::notifyInternal(QObject*, QEvent*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x697BE9A: QTimerInfoList::activateTimers() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x6978EC8: idleTimerSourceDispatch(_GSource*, int (*)(void*), void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x8ECAC3C: g_main_context_dispatch (in /lib/x86_64-linux-gnu/libglib-2.0.so.0.4400.1)
==25081== 
==25081== Thread 5 AudioCaptureAlsa:
==25081== Invalid read of size 8
==25081==    at 0x683A1B0: QMutex::unlock() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x4F00DFA: AudioCapture::run() (audiocapture.cpp:245)
==25081==    by 0x683F6FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x81BA6A9: start_thread (pthread_create.c:333)
==25081==    by 0x72DFEEC: clone (clone.S:109)
==25081==  Address 0xeb91dd8 is 24 bytes inside a block of size 104 free'd
==25081==    at 0x4C2D2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x4F04119: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:35)
==25081==    by 0x4F225A3: Doc::destroyAudioCapture() (doc.cpp:264)
==25081==    by 0x53ECE2B: InputOutputManager::slotAudioInputChanged() (inputoutputmanager.cpp:337)
==25081==    by 0x553640F: InputOutputManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputmanager.cpp:71)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5536906: InputOutputPatchEditor::audioInputDeviceChanged() (moc_inputoutputpatcheditor.cpp:137)
==25081==    by 0x53F356D: InputOutputPatchEditor::slotAudioDeviceItemChanged(QTreeWidgetItem*, int) (inputoutputpatcheditor.cpp:981)
==25081==    by 0x5536791: InputOutputPatchEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputpatcheditor.cpp:81)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x623848F: QTreeWidget::itemChanged(QTreeWidgetItem*, int) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081== 
==25081== Invalid read of size 1
==25081==    at 0x683A1B3: QMutex::unlock() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x4F00DFA: AudioCapture::run() (audiocapture.cpp:245)
==25081==    by 0x683F6FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x81BA6A9: start_thread (pthread_create.c:333)
==25081==    by 0x72DFEEC: clone (clone.S:109)
==25081==  Address 0xebc2654 is 4 bytes inside a block of size 40 free'd
==25081==    at 0x4C2D2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x4F00868: AudioCapture::~AudioCapture() (audiocapture.cpp:49)
==25081==    by 0x4F040BD: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:31)
==25081==    by 0x4F0410D: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:35)
==25081==    by 0x4F225A3: Doc::destroyAudioCapture() (doc.cpp:264)
==25081==    by 0x53ECE2B: InputOutputManager::slotAudioInputChanged() (inputoutputmanager.cpp:337)
==25081==    by 0x553640F: InputOutputManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputmanager.cpp:71)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5536906: InputOutputPatchEditor::audioInputDeviceChanged() (moc_inputoutputpatcheditor.cpp:137)
==25081==    by 0x53F356D: InputOutputPatchEditor::slotAudioDeviceItemChanged(QTreeWidgetItem*, int) (inputoutputpatcheditor.cpp:981)
==25081==    by 0x5536791: InputOutputPatchEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputpatcheditor.cpp:81)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081== 
==25081== Invalid read of size 4
==25081==    at 0x683A1E7: QMutex::unlock() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x4F00DFA: AudioCapture::run() (audiocapture.cpp:245)
==25081==    by 0x683F6FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x81BA6A9: start_thread (pthread_create.c:333)
==25081==    by 0x72DFEEC: clone (clone.S:109)
==25081==  Address 0xebc2650 is 0 bytes inside a block of size 40 free'd
==25081==    at 0x4C2D2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x4F00868: AudioCapture::~AudioCapture() (audiocapture.cpp:49)
==25081==    by 0x4F040BD: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:31)
==25081==    by 0x4F0410D: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:35)
==25081==    by 0x4F225A3: Doc::destroyAudioCapture() (doc.cpp:264)
==25081==    by 0x53ECE2B: InputOutputManager::slotAudioInputChanged() (inputoutputmanager.cpp:337)
==25081==    by 0x553640F: InputOutputManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputmanager.cpp:71)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5536906: InputOutputPatchEditor::audioInputDeviceChanged() (moc_inputoutputpatcheditor.cpp:137)
==25081==    by 0x53F356D: InputOutputPatchEditor::slotAudioDeviceItemChanged(QTreeWidgetItem*, int) (inputoutputpatcheditor.cpp:981)
==25081==    by 0x5536791: InputOutputPatchEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputpatcheditor.cpp:81)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081== 
==25081== Invalid read of size 1
==25081==    at 0x4F00DFF: AudioCapture::run() (audiocapture.cpp:227)
==25081==    by 0x683F6FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x81BA6A9: start_thread (pthread_create.c:333)
==25081==    by 0x72DFEEC: clone (clone.S:109)
==25081==  Address 0xeb91dd0 is 16 bytes inside a block of size 104 free'd
==25081==    at 0x4C2D2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x4F04119: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:35)
==25081==    by 0x4F225A3: Doc::destroyAudioCapture() (doc.cpp:264)
==25081==    by 0x53ECE2B: InputOutputManager::slotAudioInputChanged() (inputoutputmanager.cpp:337)
==25081==    by 0x553640F: InputOutputManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputmanager.cpp:71)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5536906: InputOutputPatchEditor::audioInputDeviceChanged() (moc_inputoutputpatcheditor.cpp:137)
==25081==    by 0x53F356D: InputOutputPatchEditor::slotAudioDeviceItemChanged(QTreeWidgetItem*, int) (inputoutputpatcheditor.cpp:981)
==25081==    by 0x5536791: InputOutputPatchEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputpatcheditor.cpp:81)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x623848F: QTreeWidget::itemChanged(QTreeWidgetItem*, int) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081== 
==25081== Invalid read of size 8
==25081==    at 0x683A3B6: QMutex::lock() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x4F00D84: AudioCapture::run() (audiocapture.cpp:229)
==25081==    by 0x683F6FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x81BA6A9: start_thread (pthread_create.c:333)
==25081==    by 0x72DFEEC: clone (clone.S:109)
==25081==  Address 0xeb91dd8 is 24 bytes inside a block of size 104 free'd
==25081==    at 0x4C2D2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x4F04119: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:35)
==25081==    by 0x4F225A3: Doc::destroyAudioCapture() (doc.cpp:264)
==25081==    by 0x53ECE2B: InputOutputManager::slotAudioInputChanged() (inputoutputmanager.cpp:337)
==25081==    by 0x553640F: InputOutputManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputmanager.cpp:71)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5536906: InputOutputPatchEditor::audioInputDeviceChanged() (moc_inputoutputpatcheditor.cpp:137)
==25081==    by 0x53F356D: InputOutputPatchEditor::slotAudioDeviceItemChanged(QTreeWidgetItem*, int) (inputoutputpatcheditor.cpp:981)
==25081==    by 0x5536791: InputOutputPatchEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputpatcheditor.cpp:81)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x623848F: QTreeWidget::itemChanged(QTreeWidgetItem*, int) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081== 
==25081== Invalid read of size 1
==25081==    at 0x683A3B9: QMutex::lock() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x4F00D84: AudioCapture::run() (audiocapture.cpp:229)
==25081==    by 0x683F6FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x81BA6A9: start_thread (pthread_create.c:333)
==25081==    by 0x72DFEEC: clone (clone.S:109)
==25081==  Address 0xebc2654 is 4 bytes inside a block of size 40 free'd
==25081==    at 0x4C2D2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x4F00868: AudioCapture::~AudioCapture() (audiocapture.cpp:49)
==25081==    by 0x4F040BD: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:31)
==25081==    by 0x4F0410D: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:35)
==25081==    by 0x4F225A3: Doc::destroyAudioCapture() (doc.cpp:264)
==25081==    by 0x53ECE2B: InputOutputManager::slotAudioInputChanged() (inputoutputmanager.cpp:337)
==25081==    by 0x553640F: InputOutputManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputmanager.cpp:71)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5536906: InputOutputPatchEditor::audioInputDeviceChanged() (moc_inputoutputpatcheditor.cpp:137)
==25081==    by 0x53F356D: InputOutputPatchEditor::slotAudioDeviceItemChanged(QTreeWidgetItem*, int) (inputoutputpatcheditor.cpp:981)
==25081==    by 0x5536791: InputOutputPatchEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputpatcheditor.cpp:81)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081== 
==25081== Invalid read of size 4
==25081==    at 0x683A3C6: QMutex::lock() (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x4F00D84: AudioCapture::run() (audiocapture.cpp:229)
==25081==    by 0x683F6FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x81BA6A9: start_thread (pthread_create.c:333)
==25081==    by 0x72DFEEC: clone (clone.S:109)
==25081==  Address 0xebc2650 is 0 bytes inside a block of size 40 free'd
==25081==    at 0x4C2D2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x4F00868: AudioCapture::~AudioCapture() (audiocapture.cpp:49)
==25081==    by 0x4F040BD: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:31)
==25081==    by 0x4F0410D: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:35)
==25081==    by 0x4F225A3: Doc::destroyAudioCapture() (doc.cpp:264)
==25081==    by 0x53ECE2B: InputOutputManager::slotAudioInputChanged() (inputoutputmanager.cpp:337)
==25081==    by 0x553640F: InputOutputManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputmanager.cpp:71)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5536906: InputOutputPatchEditor::audioInputDeviceChanged() (moc_inputoutputpatcheditor.cpp:137)
==25081==    by 0x53F356D: InputOutputPatchEditor::slotAudioDeviceItemChanged(QTreeWidgetItem*, int) (inputoutputpatcheditor.cpp:981)
==25081==    by 0x5536791: InputOutputPatchEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputpatcheditor.cpp:81)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081== 
==25081== Invalid read of size 1
==25081==    at 0x4F00D89: AudioCapture::run() (audiocapture.cpp:230)
==25081==    by 0x683F6FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x81BA6A9: start_thread (pthread_create.c:333)
==25081==    by 0x72DFEEC: clone (clone.S:109)
==25081==  Address 0xeb91dd1 is 17 bytes inside a block of size 104 free'd
==25081==    at 0x4C2D2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x4F04119: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:35)
==25081==    by 0x4F225A3: Doc::destroyAudioCapture() (doc.cpp:264)
==25081==    by 0x53ECE2B: InputOutputManager::slotAudioInputChanged() (inputoutputmanager.cpp:337)
==25081==    by 0x553640F: InputOutputManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputmanager.cpp:71)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5536906: InputOutputPatchEditor::audioInputDeviceChanged() (moc_inputoutputpatcheditor.cpp:137)
==25081==    by 0x53F356D: InputOutputPatchEditor::slotAudioDeviceItemChanged(QTreeWidgetItem*, int) (inputoutputpatcheditor.cpp:981)
==25081==    by 0x5536791: InputOutputPatchEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputpatcheditor.cpp:81)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x623848F: QTreeWidget::itemChanged(QTreeWidgetItem*, int) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081== 
==25081== Invalid read of size 4
==25081==    at 0x4F00D98: AudioCapture::run() (audiocapture.cpp:230)
==25081==    by 0x683F6FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x81BA6A9: start_thread (pthread_create.c:333)
==25081==    by 0x72DFEEC: clone (clone.S:109)
==25081==  Address 0xeb91de4 is 36 bytes inside a block of size 104 free'd
==25081==    at 0x4C2D2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x4F04119: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:35)
==25081==    by 0x4F225A3: Doc::destroyAudioCapture() (doc.cpp:264)
==25081==    by 0x53ECE2B: InputOutputManager::slotAudioInputChanged() (inputoutputmanager.cpp:337)
==25081==    by 0x553640F: InputOutputManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputmanager.cpp:71)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5536906: InputOutputPatchEditor::audioInputDeviceChanged() (moc_inputoutputpatcheditor.cpp:137)
==25081==    by 0x53F356D: InputOutputPatchEditor::slotAudioDeviceItemChanged(QTreeWidgetItem*, int) (inputoutputpatcheditor.cpp:981)
==25081==    by 0x5536791: InputOutputPatchEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputpatcheditor.cpp:81)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x623848F: QTreeWidget::itemChanged(QTreeWidgetItem*, int) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081== 
==25081== Invalid read of size 8
==25081==    at 0x4F00DA3: AudioCapture::run() (audiocapture.cpp:232)
==25081==    by 0x683F6FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x81BA6A9: start_thread (pthread_create.c:333)
==25081==    by 0x72DFEEC: clone (clone.S:109)
==25081==  Address 0xeb91dc0 is 0 bytes inside a block of size 104 free'd
==25081==    at 0x4C2D2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x4F04119: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:35)
==25081==    by 0x4F225A3: Doc::destroyAudioCapture() (doc.cpp:264)
==25081==    by 0x53ECE2B: InputOutputManager::slotAudioInputChanged() (inputoutputmanager.cpp:337)
==25081==    by 0x553640F: InputOutputManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputmanager.cpp:71)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5536906: InputOutputPatchEditor::audioInputDeviceChanged() (moc_inputoutputpatcheditor.cpp:137)
==25081==    by 0x53F356D: InputOutputPatchEditor::slotAudioDeviceItemChanged(QTreeWidgetItem*, int) (inputoutputpatcheditor.cpp:981)
==25081==    by 0x5536791: InputOutputPatchEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputpatcheditor.cpp:81)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x623848F: QTreeWidget::itemChanged(QTreeWidgetItem*, int) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081== 
==25081== Invalid read of size 4
==25081==    at 0x4F00DB3: AudioCapture::run() (audiocapture.cpp:232)
==25081==    by 0x683F6FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x81BA6A9: start_thread (pthread_create.c:333)
==25081==    by 0x72DFEEC: clone (clone.S:109)
==25081==  Address 0xeb91de4 is 36 bytes inside a block of size 104 free'd
==25081==    at 0x4C2D2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x4F04119: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:35)
==25081==    by 0x4F225A3: Doc::destroyAudioCapture() (doc.cpp:264)
==25081==    by 0x53ECE2B: InputOutputManager::slotAudioInputChanged() (inputoutputmanager.cpp:337)
==25081==    by 0x553640F: InputOutputManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputmanager.cpp:71)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5536906: InputOutputPatchEditor::audioInputDeviceChanged() (moc_inputoutputpatcheditor.cpp:137)
==25081==    by 0x53F356D: InputOutputPatchEditor::slotAudioDeviceItemChanged(QTreeWidgetItem*, int) (inputoutputpatcheditor.cpp:981)
==25081==    by 0x5536791: InputOutputPatchEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputpatcheditor.cpp:81)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x623848F: QTreeWidget::itemChanged(QTreeWidgetItem*, int) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==                                                                                                                                                                           pts/1 1109
==25081== Invalid read of size 4                                                                                                                                                            \253\2731==    at 0x6A2BD24: ??? (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x683F6FE: QThreadPrivate::start(void*) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x81BA6A9: start_thread (pthread_create.c:333)
==25081==    by 0x72DFEEC: clone (clone.S:109)
==25081==  Address 0xeb91e2e is 6 bytes after a block of size 104 free'd
==25081==    at 0x4C2D2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x4F04119: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:35)
==25081==    by 0x4F225A3: Doc::destroyAudioCapture() (doc.cpp:264)
==25081==    by 0x53ECE2B: InputOutputManager::slotAudioInputChanged() (inputoutputmanager.cpp:337)
==25081==    by 0x553640F: InputOutputManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputmanager.cpp:71)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5536906: InputOutputPatchEditor::audioInputDeviceChanged() (moc_inputoutputpatcheditor.cpp:137)
==25081==    by 0x53F356D: InputOutputPatchEditor::slotAudioDeviceItemChanged(QTreeWidgetItem*, int) (inputoutputpatcheditor.cpp:981)
==25081==    by 0x5536791: InputOutputPatchEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputpatcheditor.cpp:81)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x623848F: QTreeWidget::itemChanged(QTreeWidgetItem*, int) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081== 
==25081== Warning: client switching stacks?  SP change: 0x1ef38e28 --> 0xd14b8320
==25081==          to suppress, use: --max-stackframe=2992108792 or greater
==25081== Invalid read of size 1
==25081==    at 0x6A2BD9D: ??? (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==  Address 0x2dacb529 is not stack'd, malloc'd or (recently) free'd
==25081== 
==25081== 
==25081== Process terminating with default action of signal 11 (SIGSEGV)
==25081==  Access not within mapped region at address 0x2DACB529
==25081==    at 0x6A2BD9D: ??? (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==  If you believe this happened as a result of a stack
==25081==  overflow in your program's main thread (unlikely but
==25081==  possible), you can try to increase the size of the
==25081==  main thread stack using the --main-stacksize= flag.
==25081==  The main thread stack size used in this run was 8388608.
==25081== 
==25081== HEAP SUMMARY:
==25081==     in use at exit: 15,507,734 bytes in 98,225 blocks
==25081==   total heap usage: 967,935 allocs, 869,710 frees, 173,761,949 bytes allocated
==25081== 
==25081== LEAK SUMMARY:
==25081==    definitely lost: 20,123 bytes in 52 blocks
==25081==    indirectly lost: 77,406 bytes in 3,308 blocks
==25081==      possibly lost: 961,050 bytes in 9,817 blocks
==25081==    still reachable: 14,449,155 bytes in 85,048 blocks
==25081==         suppressed: 0 bytes in 0 blocks
==25081== Rerun with --leak-check=full to see details of leaked memory
==25081== 
==25081== For counts of detected and suppressed errors, rerun with: -v
==25081== Use --track-origins=yes to see where uninitialised values come from
==25081== ERROR SUMMARY: 163 errors from 16 contexts (suppressed: 0 from 0)
Getötet


Re: Segfault in RGB-Audio-Matrix

Posted: Wed Jul 15, 2015 9:18 am
by plugz
Hi,

What did you click on in QLC+ for this to happen ? Does this happen at startup ? Does this happen only when running QLC+ through valgrind ?

Re: Segfault in RGB-Audio-Matrix

Posted: Wed Jul 15, 2015 9:41 am
by plugz
Did you, by any chance, go to the Input Output tab and change the Audio Input at some point for QLC+ to crash ?

Re: Segfault in RGB-Audio-Matrix

Posted: Wed Jul 15, 2015 9:41 am
by 1358
Hi,
plugz wrote:What did you click on in QLC+ for this to happen ? Does this happen at startup ? Does this happen only when running QLC+ through valgrind ?
I can repruduce this every time by preforming the following steps:

1. start qlcplus
2. Devices -> new rgb panel, default values (universe 1, 10x10,...)
3. Functions -> new rgb matrix
4. Group -> rgb panel
5. figure -> audio spectrum
6. SIGSEGFAULT (immediately)

This happens always. (standalone, gdb, valgrind, w/ & w/o debug symbols)

However I thought that a valgrind stacktrace with line numbers might be more helpful than just a "qlcplus crashs" comment :)
In the 2nd post I used
a25facd0d175908ad6e8e3c8e737cabda01a6ca3
QLC+_4.9.1-18-ga25facd


plugz wrote:Did you, by any chance, go to the Input Output tab and change the Audio Input at some point for QLC+ to crash ?
Ah, good point. It seems as if qlcplus only segfaults if a loopback device is selected as input source (snd-aloop)

Edit: to be more precise: this device crashes qlcplus:
$ aplay -l
card 2: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
Subdevices: 2/2
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
card 2: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]
Subdevices: 2/2
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1

Re: Segfault in RGB-Audio-Matrix - Linux

Posted: Thu Jul 16, 2015 8:41 am
by plugz

Code: Select all

==25081==  Address 0xeb91e2e is 6 bytes after a block of size 104 free'd
==25081==    at 0x4C2D2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25081==    by 0x4F04119: AudioCaptureAlsa::~AudioCaptureAlsa() (audiocapture_alsa.cpp:35)
==25081==    by 0x4F225A3: Doc::destroyAudioCapture() (doc.cpp:264)
==25081==    by 0x53ECE2B: InputOutputManager::slotAudioInputChanged() (inputoutputmanager.cpp:337)
==25081==    by 0x553640F: InputOutputManager::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputmanager.cpp:71)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x5536906: InputOutputPatchEditor::audioInputDeviceChanged() (moc_inputoutputpatcheditor.cpp:137)
==25081==    by 0x53F356D: InputOutputPatchEditor::slotAudioDeviceItemChanged(QTreeWidgetItem*, int) (inputoutputpatcheditor.cpp:981)
==25081==    by 0x5536791: InputOutputPatchEditor::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (moc_inputoutputpatcheditor.cpp:81)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==25081==    by 0x623848F: QTreeWidget::itemChanged(QTreeWidgetItem*, int) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==25081==    by 0x695F1EB: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
From this stacktrace, I'd say in this run, the AudioCapture used by the RGBMatrix has been destroyed AFTER the RGB matrix was created.

Can you produce a trace with these steps:
1358 wrote:1. start qlcplus
2. Devices -> new rgb panel, default values (universe 1, 10x10,...)
3. Functions -> new rgb matrix
4. Group -> rgb panel
5. figure -> audio spectrum
6. SIGSEGFAULT (immediately)
? Thanks :)

Re: Segfault in RGB-Audio-Matrix - Linux

Posted: Thu Jul 16, 2015 1:05 pm
by plugz
I've made changes fixing some audio input crashes, can you update your git repository and report here ?