Bug 372401

Summary: console crashed in background
Product: [Applications] konsole Reporter: Marcin Gryszkalis <mg>
Component: generalAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED FIXED    
Severity: crash Keywords: drkonqi
Priority: NOR    
Version: 16.08.1   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Marcin Gryszkalis 2016-11-12 21:00:12 UTC
Application: konsole (16.08.1)
 (Compiled from sources)
Qt Version: 5.6.1
Frameworks Version: 5.26.0
Operating System: Linux 4.4.2-gentoo-ines x86_64
Distribution: "Gentoo Base System release 2.3"

-- Information about the crash:
- What I was doing when the application crashed:
Nothing, ie. console was in background and different app was active.

Console had 2 windows with several tabs in each one.

-- Backtrace:
Application: Konsole (konsole), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7fe3d0cdf740 (LWP 4886))]

Thread 2 (Thread 0x7fe3bd7c0700 (LWP 4904)):
#0  0x00007fe3d0a24edd in poll () from /lib64/libc.so.6
#1  0x00007fe3c847a24c in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#2  0x00007fe3c847a35c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#3  0x00007fe3cd658a3c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#4  0x00007fe3cd60cbf2 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#5  0x00007fe3cd46cab4 in QThread::exec() () from /usr/lib64/libQt5Core.so.5
#6  0x00007fe3d10061bd in QDBusConnectionManager::run() () from /usr/lib64/libQt5DBus.so.5
#7  0x00007fe3cd47118b in QThreadPrivate::start(void*) () from /usr/lib64/libQt5Core.so.5
#8  0x00007fe3c9f3842c in start_thread () from /lib64/libpthread.so.0
#9  0x00007fe3d0a2de3d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fe3d0cdf740 (LWP 4886)):
[KCrash Handler]
#6  0x00007fe3d068a0e0 in Konsole::ProcessInfo::name(bool*) const () from /usr/lib64/libkonsoleprivate.so.16
#7  0x00007fe3d06a93cc in Konsole::Session::getDynamicTitle() () from /usr/lib64/libkonsoleprivate.so.16
#8  0x00007fe3d06b4849 in Konsole::SessionController::snapshot() () from /usr/lib64/libkonsoleprivate.so.16
#9  0x00007fe3cd6349bf in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#10 0x00007fe3cd6413d8 in QTimer::timerEvent(QTimerEvent*) () from /usr/lib64/libQt5Core.so.5
#11 0x00007fe3cd6358c3 in QObject::event(QEvent*) () from /usr/lib64/libQt5Core.so.5
#12 0x00007fe3ce1351dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#13 0x00007fe3ce139890 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#14 0x00007fe3cd60dfc0 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#15 0x00007fe3cd65807e in QTimerInfoList::activateTimers() () from /usr/lib64/libQt5Core.so.5
#16 0x00007fe3cd65858c in idleTimerSourceDispatch(_GSource*, int (*)(void*), void*) () from /usr/lib64/libQt5Core.so.5
#17 0x00007fe3c8479fd4 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
#18 0x00007fe3c847a2b0 in g_main_context_iterate.isra () from /usr/lib64/libglib-2.0.so.0
#19 0x00007fe3c847a35c in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
#20 0x00007fe3cd658a1f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#21 0x00007fe3cd60cbf2 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#22 0x00007fe3cd61457c in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#23 0x00007fe3d0d0834c in kdemain () from /usr/lib64/libkdeinit5_konsole.so
#24 0x00007fe3d0969780 in __libc_start_main () from /lib64/libc.so.6
#25 0x0000000000400769 in _start ()

Possible duplicates by query: bug 370762, bug 370652.

Reported using DrKonqi
Comment 1 Martin Sandsmark 2016-11-20 13:42:53 UTC
Git commit 40b1f0e851c115e1a2df79e7ec4bc4fe726d9e43 by Martin T. H. Sandsmark.
Committed on 20/11/2016 at 13:40.
Pushed by sandsmark into branch 'master'.

Only use foreground process info if valid

getProcessInfo() returned _foregroundProcessInfo without checking the
return value of updateForegroundProcessInfo() indicating whether
_foregroundProcessInfo was non-existent or invalid.

I think this might be the solution to a bunch of recent crash bugs,
but not closing them as I can't test.

Also skipping RB because it is a simple patch and RB is down from here.
Related: bug 372620, bug 372619, bug 372593

M  +1    -2    src/Session.cpp

http://commits.kde.org/konsole/40b1f0e851c115e1a2df79e7ec4bc4fe726d9e43
Comment 2 Kurt Hindenburg 2016-11-24 14:47:46 UTC
Git commit d28afb6664459cf28d73d7617b74c49711ce7a86 by Kurt Hindenburg, on behalf of Martin T. H. Sandsmark.
Committed on 24/11/2016 at 14:42.
Pushed by hindenburg into branch 'Applications/16.12'.

Only use foreground process info if valid

getProcessInfo() returned _foregroundProcessInfo without checking the
return value of updateForegroundProcessInfo() indicating whether
_foregroundProcessInfo was non-existent or invalid.

I think this might be the solution to a bunch of recent crash bugs,
but not closing them as I can't test.

Also skipping RB because it is a simple patch and RB is down from here.
Related: bug 372620, bug 372619, bug 372593
(cherry picked from commit 40b1f0e851c115e1a2df79e7ec4bc4fe726d9e43)

M  +1    -2    src/Session.cpp

https://commits.kde.org/konsole/d28afb6664459cf28d73d7617b74c49711ce7a86
Comment 3 Kurt Hindenburg 2019-07-12 03:24:33 UTC
Reopen if you can duplicate the issue in 19.08 - a lot has changed since 16.08