How to reproduce: Connect a Rigol scope (e.g. DS1052E) via USB, start PulseView -> segfault. sigrok-cli seems to work OK: $ sigrok-cli -d rigol-ds --frames 1 -O analog FRAME-BEGIN CH1: 2.187500 V CH1: 3.750000 V [...] CH2: 3.318748 V CH2: 4.099998 V FRAME-END PulseView log: sr: scpi_usbtmc: Failed to set configuration: LIBUSB_ERROR_BUSY. sr: scpi_usbtmc: Failed to set configuration: LIBUSB_ERROR_BUSY. (process:24290): GLib-CRITICAL **: g_variant_ref: assertion 'value != NULL' failed Segmentation fault (core dumped) Backtrace: (gdb) bt #0 g_bit_lock (address=address@entry=0x20, lock_bit=lock_bit@entry=0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gbitlock.c:209 #1 0x00007f8de79dccc7 in g_variant_lock (value=0x0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gvariant-core.c:221 #2 g_variant_n_children (value=value@entry=0x0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gvariant-core.c:929 #3 0x00007f8de79d88a8 in g_variant_iter_init (iter=iter@entry=0x2408280, value=value@entry=0x0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gvariant.c:2943 #4 0x00007f8de79d88f5 in g_variant_iter_new (value=0x0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gvariant.c:2916 #5 0x00007f8de7f08c6c in Glib::VariantIter::VariantIter(Glib::VariantBase const&) () from /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1 #6 0x00000000004643a1 in pv::prop::binding::DeviceOptions::bind_enum(QString const&, Glib::VariantContainerBase, std::function<Glib::VariantBase ()>, std::function<void (Glib::VariantBase)>, std::function<QString (Glib::VariantBase)>) (this=this@entry=0x243c8e0, name=..., gvar_list=..., getter=..., setter=..., printer=...) at [...]/pulseview/pv/prop/binding/deviceoptions.cpp:147 #7 0x00000000004651af in pv::prop::binding::DeviceOptions::DeviceOptions (this=0x243c8e0, configurable=std::shared_ptr (count 2057, weak -1) 0x7fffef5df1d0) at [...]/pulseview/pv/prop/binding/deviceoptions.cpp:104 #8 0x000000000045ca0b in pv::popups::DeviceOptions::DeviceOptions (this=0x243c870, device=std::shared_ptr (count 35528064, weak -1) 0x7fffef5df2c0, parent=<optimized out>) at [...]/pulseview/pv/popups/deviceoptions.cpp:41 #9 0x0000000000468365 in pv::toolbars::SamplingBar::update_device_config_widgets (this=this@entry=0x23c0000) at [...]/pulseview/pv/toolbars/samplingbar.cpp:310 Python Exception <type 'exceptions.ValueError'> Cannot find type const std::map<std::shared_ptr<sigrok::Device>, std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::shared_ptr<sigrok::Device> >, std::allocator<std::pair<std::shared_ptr<sigrok::Device> const, std::basic_string<char, std::char_traits<char>, std::allocator<char> > > > >::_Rep_type: #10 0x0000000000468d83 in pv::toolbars::SamplingBar::set_device_list (this=0x23c0000, device_names=std::map with 2 elements, selected=std::shared_ptr (count 16, weak 1) 0x21e1e90) at [...]/pulseview/pv/toolbars/samplingbar.cpp:140 #11 0x000000000044358a in pv::MainWindow::update_device_list (this=this@entry=0x7fffef5df850) at [...]/pulseview/pv/mainwindow.cpp:389 #12 0x00000000004473f5 in pv::MainWindow::restore_ui_settings (this=this@entry=0x7fffef5df850) at [...]/pulseview/pv/mainwindow.cpp:352 #13 0x0000000000447c40 in pv::MainWindow::MainWindow (this=0x7fffef5df850, device_manager=..., open_file_name=0x0, parent=<optimized out>) at [...]/pulseview/pv/mainwindow.cpp:88 #14 0x000000000043aae4 in main (argc=1, argv=<optimized out>) at [...]/pulseview/main.cpp:144
Extremely confused as to what Python is doing in this backtrace... that's probably a clue.
Updated backtrace with PulseView + libsigrok as of today: [...] sr: scpi_usbtmc: Successfully sent SCPI command: ':CHAN1:DISP?'. sr: scpi: Got response: 'ON'. sr: scpi_usbtmc: Successfully sent SCPI command: ':CHAN2:DISP?'. sr: scpi: Got response: 'ON'. sr: rigol-ds: Current analog channel state: sr: rigol-ds: CH1 on sr: rigol-ds: CH2 on sr: scpi_usbtmc: Successfully sent SCPI command: ':TIM:SCAL?'. sr: scpi: Got response: '5.000e-04'. sr: rigol-ds: Current timebase 0.0005 sr: scpi_usbtmc: Successfully sent SCPI command: ':CHAN1:SCAL?'. sr: scpi: Got response: '2.000e+01'. sr: scpi_usbtmc: Successfully sent SCPI command: ':CHAN2:SCAL?'. sr: scpi: Got response: '2.000e+01'. sr: rigol-ds: Current vertical gain: sr: rigol-ds: CH1 20 sr: rigol-ds: CH2 20 sr: rigol-ds: Current vertical reference: sr: scpi_usbtmc: Successfully sent SCPI command: ':CHAN1:OFFS?'. sr: scpi: Got response: '4.000e+01'. sr: scpi_usbtmc: Successfully sent SCPI command: ':CHAN2:OFFS?'. sr: scpi: Got response: '-4.160e+01'. sr: rigol-ds: Current vertical offset: sr: rigol-ds: CH1 40 sr: rigol-ds: CH2 -41.6 sr: scpi_usbtmc: Successfully sent SCPI command: ':CHAN1:COUP?'. sr: scpi: Got response: 'DC'. sr: scpi_usbtmc: Successfully sent SCPI command: ':CHAN2:COUP?'. sr: scpi: Got response: 'DC'. sr: rigol-ds: Current coupling: sr: rigol-ds: CH1 DC sr: rigol-ds: CH2 DC sr: scpi_usbtmc: Successfully sent SCPI command: ':TRIG:EDGE:SOUR?'. sr: scpi: Got response: 'CH1'. sr: rigol-ds: Current trigger source CH1 sr: scpi_usbtmc: Successfully sent SCPI command: ':TIM:OFFS?'. sr: scpi: Got response: '0.000e+00'. sr: rigol-ds: Current horizontal trigger position 0 sr: scpi_usbtmc: Successfully sent SCPI command: ':TRIG:EDGE:SLOP?'. sr: scpi: Got response: 'POSITIVE'. sr: rigol-ds: Current trigger slope POSITIVE sr: hwdriver: sr_config_list(): key 30008 (timebase) sdi 0x13be740 cg NULL sr: hwdriver: sr_config_list(): key 30005 (triggersource) sdi 0x13be740 cg NULL (process:30647): GLib-CRITICAL **: g_variant_ref: assertion 'value != NULL' failed Segmentation fault (core dumped) (gdb) bt #0 g_bit_lock (address=address@entry=0x20, lock_bit=lock_bit@entry=0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gbitlock.c:209 #1 0x00007fb3529fccc7 in g_variant_lock (value=0x0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gvariant-core.c:221 #2 g_variant_n_children (value=value@entry=0x0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gvariant-core.c:929 #3 0x00007fb3529f88a8 in g_variant_iter_init (iter=iter@entry=0x2911680, value=value@entry=0x0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gvariant.c:2943 #4 0x00007fb3529f88f5 in g_variant_iter_new (value=0x0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gvariant.c:2916 #5 0x00007fb352f28c6c in Glib::VariantIter::VariantIter(Glib::VariantBase const&) () from /usr/lib/x86_64-linux-gnu/libglibmm-2.4.so.1 #6 0x000000000046df01 in pv::prop::binding::DeviceOptions::bind_enum(QString const&, Glib::VariantContainerBase, std::function<Glib::VariantBase ()>, std::function<void (Glib::VariantBase)>, std::function<QString (Glib::VariantBase)>) (this=this@entry=0x28e0c50, name=..., gvar_list=..., getter=..., setter=..., printer=...) at pv/prop/binding/deviceoptions.cpp:147 #7 0x000000000046ed0f in pv::prop::binding::DeviceOptions::DeviceOptions (this=0x28e0c50, configurable=std::shared_ptr (count 2057, weak -1) 0x7fff79237070) at pv/prop/binding/deviceoptions.cpp:104 #8 0x000000000046831b in pv::popups::DeviceOptions::DeviceOptions (this=0x28e0be0, device=std::shared_ptr (count 42210128, weak -1) 0x7fff79237160, parent=<optimized out>) at pv/popups/deviceoptions.cpp:41 #9 0x0000000000471775 in pv::toolbars::SamplingBar::update_device_config_widgets (this=this@entry=0x289e380) at pv/toolbars/samplingbar.cpp:321 #10 0x0000000000472054 in pv::toolbars::SamplingBar::on_device_selected (this=0x289e380) at pv/toolbars/samplingbar.cpp:437 #11 0x00007fb351aec90d in QMetaObject::activate (sender=sender@entry=0x289e3c0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=5, argv=argv@entry=0x7fff79237330) at kernel/qobject.cpp:3681 #12 0x00007fb351aecd77 in QMetaObject::activate (sender=sender@entry=0x289e3c0, m=m@entry=0x7fb3540c61a0 <QComboBox::staticMetaObject>, local_signal_index=local_signal_index@entry=5, argv=argv@entry=0x7fff79237330) at kernel/qobject.cpp:3547 #13 0x00007fb353aef0a1 in QComboBox::currentIndexChanged (this=this@entry=0x289e3c0, _t1=1) at .moc/moc_qcombobox.cpp:475 #14 0x00007fb353af1561 in QComboBoxPrivate::_q_emitCurrentIndexChanged (this=this@entry=0x28c7d90, index=...) at widgets/qcombobox.cpp:1278 #15 0x00007fb353af3ac9 in QComboBoxPrivate::setCurrentIndex (this=this@entry=0x28c7d90, mi=...) at widgets/qcombobox.cpp:2073 #16 0x00007fb353af3c26 in QComboBoxPrivate::_q_itemSelected (this=0x28c7d90, item=...) at widgets/qcombobox.cpp:1247 #17 0x00007fb351aec90d in QMetaObject::activate (sender=sender@entry=0x2963cc0, signalOffset=<optimized out>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff79237600) at kernel/qobject.cpp:3681 #18 0x00007fb351aecd77 in QMetaObject::activate (sender=sender@entry=0x2963cc0, m=m@entry=0x7fb3540e0020 <QComboBoxPrivateContainer::staticMetaObject>, local_signal_index=local_signal_index@entry=0, argv=argv@entry=0x7fff79237600) at kernel/qobject.cpp:3547 #19 0x00007fb353d6acb2 in QComboBoxPrivateContainer::itemSelected (this=this@entry=0x2963cc0, _t1=...) at .moc/moc_qcombobox_p.cpp:323 #20 0x00007fb353aef848 in QComboBoxPrivateContainer::eventFilter (this=0x2963cc0, o=0x29d0510, e=0x7fff79237ae0) at widgets/qcombobox.cpp:683 #21 0x00007fb351abdd0a in QCoreApplicationPrivate::sendThroughObjectEventFilters (this=this@entry=0x2641720, receiver=receiver@entry=0x29d0510, event=event@entry=0x7fff79237ae0) at kernel/qcoreapplication.cpp:1031 #22 0x00007fb3539def1c in QApplicationPrivate::notify_helper (this=0x2641720, receiver=0x29d0510, e=0x7fff79237ae0) at kernel/qapplication.cpp:3495 #23 0x00007fb3539e497c in QApplication::notify (this=0x29d0510, receiver=0x0, e=0x7fff79237ae0) at kernel/qapplication.cpp:3066 #24 0x000000000044cff6 in Application::notify (this=<optimized out>, receiver=<optimized out>, event=<optimized out>) at pv/application.cpp:38 #25 0x00007fb351abdf1b in QCoreApplication::notifyInternal (this=0x7fff79238350, receiver=receiver@entry=0x29d0510, event=event@entry=0x7fff79237ae0) at kernel/qcoreapplication.cpp:935 #26 0x00007fb3539e311a in sendSpontaneousEvent (event=0x7fff79237ae0, receiver=0x29d0510) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:240 #27 QApplicationPrivate::sendMouseEvent (receiver=0x29d0510, event=0x7fff79237ae0, alienWidget=0x29d0510, nativeWidget=0x2963cc0, buttonDown=<optimized out>, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:2539 #28 0x00007fb353a3b754 in QWidgetWindow::handleMouseEvent (this=0x2a19ad0, event=0x7fff79237f10) at kernel/qwidgetwindow.cpp:411 #29 0x00007fb353a3ddd3 in QWidgetWindow::event (this=0x2a19ad0, event=0x7fff79237f10) at kernel/qwidgetwindow.cpp:179 #30 0x00007fb3539def3c in QApplicationPrivate::notify_helper (this=0x2641720, receiver=0x2a19ad0, e=0x7fff79237f10) at kernel/qapplication.cpp:3499 #31 0x00007fb3539e4380 in QApplication::notify (this=0x7fff79238350, receiver=0x2a19ad0, e=0x7fff79237f10) at kernel/qapplication.cpp:3282 #32 0x000000000044cff6 in Application::notify (this=<optimized out>, receiver=<optimized out>, event=<optimized out>) at pv/application.cpp:38 #33 0x00007fb351abdf1b in QCoreApplication::notifyInternal (this=0x7fff79238350, receiver=0x2a19ad0, event=0x7fff79237f10) at kernel/qcoreapplication.cpp:935 #34 0x00007fb3541d45c3 in sendSpontaneousEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:240 #35 QGuiApplicationPrivate::processMouseEvent (e=0x2a1f520) at kernel/qguiapplication.cpp:1748 #36 0x00007fb3541d5e25 in QGuiApplicationPrivate::processWindowSystemEvent (e=e@entry=0x2a1f520) at kernel/qguiapplication.cpp:1549 #37 0x00007fb3541bb55f in QWindowSystemInterface::sendWindowSystemEvents (flags=...) at kernel/qwindowsysteminterface.cpp:579 #38 0x00007fb349c2df50 in userEventSourceDispatch (source=<optimized out>) at eventdispatchers/qeventdispatcher_glib.cpp:78 #39 0x00007fb3529c1c5d in g_main_dispatch (context=0x7fb3400016f0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:3111 #40 g_main_context_dispatch (context=context@entry=0x7fb3400016f0) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:3710 #41 0x00007fb3529c1f48 in g_main_context_iterate (context=context@entry=0x7fb3400016f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:3781 #42 0x00007fb3529c1ffc in g_main_context_iteration (context=0x7fb3400016f0, may_block=1) at /build/glib2.0-dt6trg/glib2.0-2.42.0/./glib/gmain.c:3842 #43 0x00007fb351b15537 in QEventDispatcherGlib::processEvents (this=0x26771e0, flags=...) at kernel/qeventdispatcher_glib.cpp:426 #44 0x00007fb351abb752 in QEventLoop::exec (this=this@entry=0x7fff792382b0, flags=..., flags@entry=...) at kernel/qeventloop.cpp:212 #45 0x00007fb351ac31cc in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1188 #46 0x00007fb3541cc19c in QGuiApplication::exec () at kernel/qguiapplication.cpp:1483 #47 0x00007fb3539dd595 in QApplication::exec () at kernel/qapplication.cpp:2744 #48 0x00000000004484de in main (argc=1, argv=<optimized out>) at main.cpp:164
Fixed in ef2986c0f3e0ce3346a28d86348d8cc1746e9b66, thanks!