Bug 705 - Segfault on exit if triggers are active
Summary: Segfault on exit if triggers are active
Status: RESOLVED FIXED
Alias: None
Product: PulseView
Classification: Unclassified
Component: Triggers (show other bugs)
Version: unreleased development snapshot
Hardware: All Linux
: Normal normal
Target Milestone: ---
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-22 18:45 CET by Daniel Elstner
Modified: 2016-04-19 15:00 CEST (History)
2 users (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Elstner 2015-11-22 18:45:33 CET
PulseView segfaults on exit if any triggers have been configured in the UI. The crash happens in the QIcon destructor, so the Qt version may also be a factor.

I'm on Ubuntu 15.10, which ships Qt 5.4.2. Backtrace below.

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5e7b6c8 in QIcon::~QIcon() () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
(gdb) bt
#0  0x00007ffff5e7b6c8 in QIcon::~QIcon() () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#1  0x00000000004c6d19 in QCache<QString, QIcon const>::clear (this=0x758ea0 <pv::view::LogicSignal::icon_cache_>)
    at /usr/include/x86_64-linux-gnu/qt5/QtCore/qcache.h:118
#2  QCache<QString, QIcon const>::~QCache (this=0x758ea0 <pv::view::LogicSignal::icon_cache_>, 
    __in_chrg=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qcache.h:87
#3  0x00007ffff4c26d32 in __run_exit_handlers (status=0, listp=0x7ffff4fb1698 <__exit_funcs>, 
    run_list_atexit=run_list_atexit@entry=true) at exit.c:82
#4  0x00007ffff4c26d85 in __GI_exit (status=<optimized out>) at exit.c:104
#5  0x00007ffff4c0da47 in __libc_start_main (main=0x460710 <main(int, char**)>, argc=3, argv=0x7fffffffe4c8, 
    init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffe4b8)
    at libc-start.c:323
#6  0x0000000000462c99 in _start ()
Comment 1 Soeren Apel 2015-11-22 19:01:18 CET
You're not the only one: 

https://github.com/OtterBrowser/otter-browser/issues/889
https://bugs.launchpad.net/ubuntu/+source/unity8/+bug/1238116
https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1505225
https://bugs.launchpad.net/ubuntu/+source/kdebase-workspace/+bug/515345

It's a Qt bug but some bug reports are old and long fixed, so I do wonder if there's something PV can do better.
Comment 2 Soeren Apel 2016-04-17 21:13:02 CEST
Thanks to Uwe it turns out that this was indeed a PV bug. Fix is here:

https://github.com/abraxa/pulseview/commit/ed2cec68674ac98de6bde7a399d12a0bb9c8dd05

It also fixes the same kind of bug for the pixmap cache.
Comment 3 Uwe Hermann 2016-04-19 15:00:06 CEST
Fixed in ed2cec68674ac98de6bde7a399d12a0bb9c8dd05, thanks!

Verified the fix, works fine for me.