Bug 805 - PV crashes when pressing Run on an unusable device
Summary: PV crashes when pressing Run on an unusable device
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Acquisition (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-25 11:06 CEST by Uwe Hermann
Modified: 2016-06-24 23:35 CEST (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Hermann 2016-05-25 11:06:36 CEST
As reported by karlp on IRC, PV segfaults e.g. if a Saleae Logic16 is used, but the firmware files cannot be found or accessed. PV will show the Logic16 and allows pressing "Run", which then segfaults (confirmed by me as well):


karlp@terox:~$ LD_LIBRARY_PATH=$HOME/.local/lib gdb pulseview
GNU gdb (GDB) Fedora 7.10.1-31.fc23
Copyright (C) 2015 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
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-redhat-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from pulseview...done.
(gdb) run
Starting program: /home/karlp/.local/bin/pulseview 
Missing separate debuginfos, use: dnf debuginfo-install glibc-2.22-16.fc23.x86_64
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7fffde3d8700 (LWP 6691)]
srd: AttributeError: Failed to load decoder adns5020_spi: 'module' object has no attribute 'Decoder'
sr: ezusb: failed to open device: LIBUSB_ERROR_ACCESS.
sr: saleae-logic16: Firmware upload failed.
sr: saleae-logic16: Failed to open device: LIBUSB_ERROR_ACCESS.
sr: saleae-logic16: Unable to open device.
Failed to configure sample count. 
Failed to configure samplerate. 
[New Thread 0x7fffda349700 (LWP 6693)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffda349700 (LWP 6693)]
sigrok::Session::start (this=0x0) at bindings/cxx/classes.cpp:969
969		check(sr_session_start(_structure));
Missing separate debuginfos, use: dnf debuginfo-install adwaita-gtk2-theme-3.18.0-1.fc23.x86_64 adwaita-qt4-0.4-1.fc23.x86_64 atk-2.18.0-1.fc23.x86_64 boost-filesystem-1.58.0-11.fc23.x86_64 boost-system-1.58.0-11.fc23.x86_64 boost-test-1.58.0-11.fc23.x86_64 boost-thread-1.58.0-11.fc23.x86_64 bzip2-libs-1.0.6-19.fc23.x86_64 cairo-1.14.2-2.fc23.x86_64 dbus-glib-0.106-1.fc23.x86_64 dbus-libs-1.10.8-1.fc23.x86_64 elfutils-libelf-0.166-1.fc23.x86_64 elfutils-libs-0.166-1.fc23.x86_64 expat-2.1.1-1.fc23.x86_64 fontconfig-2.11.94-4.fc23.x86_64 freetype-2.6.0-3.fc23.x86_64 GConf2-3.2.6-15.fc23.x86_64 gdk-pixbuf2-2.32.3-1.fc23.x86_64 glib2-2.46.2-1.fc23.x86_64 glibmm24-2.46.2-1.fc23.x86_64 graphite2-1.3.6-1.fc23.x86_64 gtk2-2.24.30-1.fc23.x86_64 harfbuzz-1.0.6-1.fc23.x86_64 jbigkit-libs-2.1-4.fc23.x86_64 lcms2-2.7-2.fc23.x86_64 libattr-2.4.47-14.fc23.x86_64 libcanberra-0.30-10.fc23.x86_64 libcanberra-gtk2-0.30-10.fc23.x86_64 libcap-2.24-8.fc23.x86_64 libdatrie-0.2.8-6.fc23.x86_64 libdrm-2.4.66-1.fc23.x86_64 libffi-3.1-8.fc23.x86_64 libgcc-5.3.1-6.fc23.x86_64 libgcrypt-1.6.4-1.fc23.x86_64 libgpg-error-1.21-1.fc23.x86_64 libICE-1.0.9-3.fc23.x86_64 libicu-54.1-5.fc23.x86_64 libjpeg-turbo-1.4.1-2.fc23.x86_64 libmng-2.0.3-2.fc23.x86_64 libogg-1.3.2-4.fc23.x86_64 libpng-1.6.19-2.fc23.x86_64 libselinux-2.4-4.fc23.x86_64 libsigc++20-2.6.2-1.fc23.x86_64 libSM-1.2.2-3.fc23.x86_64 libstdc++-5.3.1-6.fc23.x86_64 libtdb-1.3.9-1.fc23.x86_64 libthai-0.1.21-2.fc23.x86_64 libtiff-4.0.4-1.fc23.x86_64 libtool-ltdl-2.4.6-8.fc23.x86_64 libusbx-1.0.21-0.1.git448584a.fc23.x86_64 libuuid-2.28-1.fc23.x86_64 libvorbis-1.3.4-5.fc23.x86_64 libwayland-client-1.9.0-1.fc23.x86_64 libwayland-server-1.9.0-1.fc23.x86_64 libX11-1.6.3-2.fc23.x86_64 libXau-1.0.8-5.fc23.x86_64 libxcb-1.11.1-1.fc23.x86_64 libXcomposite-0.4.4-7.fc23.x86_64 libXcursor-1.1.14-4.fc23.x86_64 libXdamage-1.1.4-7.fc23.x86_64 libXext-1.3.3-3.fc23.x86_64 libXfixes-5.0.1-5.fc23.x86_64 libXi-1.7.6-1.fc23.x86_64 libXinerama-1.1.3-5.fc23.x86_64 libXrandr-1.5.0-2.fc23.x86_64 libXrender-0.9.9-2.fc23.x86_64 libxshmfence-1.2-2.fc23.x86_64 libXxf86vm-1.1.4-2.fc23.x86_64 libzip-1.1-1.fc23.x86_64 mesa-libEGL-11.1.0-2.20151218.fc23.x86_64 mesa-libgbm-11.1.0-2.20151218.fc23.x86_64 mesa-libGL-11.1.0-2.20151218.fc23.x86_64 mesa-libglapi-11.1.0-2.20151218.fc23.x86_64 nss-softokn-freebl-3.23.0-1.0.fc23.x86_64 PackageKit-gtk3-module-1.0.11-1.fc23.x86_64 pango-1.38.1-1.fc23.x86_64 pcre-8.38-7.fc23.x86_64 pixman-0.34.0-1.fc23.x86_64 python3-libs-3.4.3-6.fc23.x86_64 qt-4.8.7-12.fc23.x86_64 qt-x11-4.8.7-12.fc23.x86_64 systemd-libs-222-14.fc23.x86_64 xz-libs-5.2.1-3.fc23.x86_64 zlib-1.2.8-9.fc23.x86_64
(gdb) bt
#0  0x00007ffff5c1e704 in sigrok::Session::start() (this=0x0) at bindings/cxx/classes.cpp:969
#1  0x0000000000483ae8 in pv::Session::sample_thread_proc(std::shared_ptr<pv::devices::Device>, std::function<void (QString)>) (this=0x7fffffffdb90, device=..., error_handler=...) at /home/karlp/src/sigrok-playground/pulseview/pv/session.cpp:470
#2  0x000000000048a53b in std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void (pv::Session::*)(std::shared_ptr<pv::devices::Device>, std::function<void (QString)>)> (pv::Session*, std::shared_ptr<pv::devices::Device>, std::function<void (QString)>)> >::_M_run() (__object=<optimized out>, this=<optimized out>) at /usr/include/c++/5.3.1/functional:600
#3  0x000000000048a53b in std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void (pv::Session::*)(std::shared_ptr<pv::devices::Device>, std::function<void (QString)>)> (pv::Session*, std::shared_ptr<pv::devices::Device>, std::function<void (QString)>)> >::_M_run() (this=<optimized out>) at /usr/include/c++/5.3.1/functional:1531
#4  0x000000000048a53b in std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void (pv::Session::*)(std::shared_ptr<pv::devices::Device>, std::function<void (QString)>)> (pv::Session*, std::shared_ptr<pv::devices::Device>, std::function<void (QString)>)> >::_M_run() (this=<optimized out>) at /usr/include/c++/5.3.1/functional:1520
#5  0x000000000048a53b in std::thread::_Impl<std::_Bind_simple<std::_Mem_fn<void (pv::Session::*)(std::shared_ptr<pv::devices::Device>, std::function<void (QString)>)> (pv::Session*, std::shared_ptr<pv::devices::Device>, std::function<void (QString)>)> >::_M_run() (this=<optimized out>) at /usr/include/c++/5.3.1/thread:115
#6  0x00007ffff4a48f20 in  () at /lib64/libstdc++.so.6
#7  0x00007ffff5e4860a in start_thread () at /lib64/libpthread.so.0
#8  0x00007ffff41b859d in clone () at /lib64/libc.so.6
(gdb)
Comment 2 Soeren Apel 2016-06-22 18:23:25 CEST
Oops, forgot to update the title of the commit as I kept the title of the first attempt that didn't work. Here's the same commit with the correct title: https://github.com/abraxa/pulseview/commit/1560e15f95dea801d557995f82b5a2969c9c2d38
Comment 3 Uwe Hermann 2016-06-24 23:35:57 CEST
Fixed in 7e0c99bf95836c89574b53ae3fa7840e2ddca77d, thanks!