Bug 596 - Segfault when switching from loaded file to demo driver and back
Summary: Segfault when switching from loaded file to demo driver and back
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: File handling (show other bugs)
Version: unreleased development snapshot
Hardware: All All
: Normal normal
Target Milestone: PulseView 0.3.0
Assignee: Soeren Apel
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-13 13:43 CEST by Uwe Hermann
Modified: 2015-08-26 01:07 CEST (History)
3 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Uwe Hermann 2015-06-13 13:43:58 CEST
How to reproduce:

 - Start PV, load an .sr file.
 - Switch to the demo driver.
 - Switch back to the loaded file -> segfault.
Comment 1 Soeren Apel 2015-07-27 07:23:29 CEST
Backtrace:

#1  0x080bff6d in std::__throw_bad_weak_ptr () at /usr/lib/gcc/i686-pc-linux-gnu/4.8.4/include/g++-v4/bits/shared_ptr_base.h:76
#2  0xb70f974f in _M_add_ref_lock (this=<optimized out>) at /usr/lib/gcc/i686-pc-linux-gnu/4.8.4/include/g++-v4/bits/shared_ptr_base.h:240
#3  __shared_count (__r=..., this=0xbfffcffc) at /usr/lib/gcc/i686-pc-linux-gnu/4.8.4/include/g++-v4/bits/shared_ptr_base.h:699
#4  __shared_ptr<sigrok::Context> (__r=..., this=0xbfffcff8) at /usr/lib/gcc/i686-pc-linux-gnu/4.8.4/include/g++-v4/bits/shared_ptr_base.h:807
#5  shared_ptr<sigrok::Context> (__r=std::weak_ptr (empty) 0x0, this=0xbfffcff8) at /usr/lib/gcc/i686-pc-linux-gnu/4.8.4/include/g++-v4/bits/shared_ptr.h:249
#6  shared_from_this (this=0x8134b50) at /usr/lib/gcc/i686-pc-linux-gnu/4.8.4/include/g++-v4/bits/shared_ptr.h:557
#7  shared_from_this (this=0x8134b50) at ./bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp:210
#8  sigrok::Context::load_session (this=0x8134b50, filename="1mhz_clock_1channels.sr")
    at bindings/cxx/classes.cpp:291
#9  0x080b1275 in pv::devices::SessionFile::create (this=0x8332828) at pulseview/pv/devices/sessionfile.cpp:41
#10 0x0809f22f in pv::Session::set_device (this=this@entry=0xbfffe974, device=std::shared_ptr (count 21, weak 1) 0x8332828)
    at pulseview/pv/session.cpp:135
#11 0x08096d04 in pv::MainWindow::select_device (this=0xbfffe95c, device=std::shared_ptr (count 21, weak 1) 0x8332828)
    at pulseview/pv/mainwindow.cpp:205
#12 0x080bceb5 in pv::toolbars::MainBar::on_device_selected (this=0x8178168) at pulseview/pv/toolbars/mainbar.cpp:545
#13 0x080eb975 in pv::toolbars::MainBar::qt_static_metacall (_o=<optimized out>, _id=<optimized out>, _a=<optimized out>, _c=<optimized out>)
    at pulseview/pv/toolbars/moc_mainbar.cxx:55
#14 0xb72a8f17 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/qt4/libQtCore.so.4
#15 0x080edbc7 in pv::widgets::DeviceToolButton::device_selected (this=this@entry=0x8178184) at pulseview/pv/widgets/moc_devicetoolbutton.cxx:107
#16 0x080da92a in pv::widgets::DeviceToolButton::on_action (this=0x8178184, action=0x84420f0) at pulseview/pv/widgets/devicetoolbutton.cpp:124
Comment 3 Uwe Hermann 2015-08-26 01:07:30 CEST
Fixed in 8fe262de9a59039431bd3b4d9a7b3ee4a4429d4d, thanks!