Bug 412386 - Krunner crashed when used to switch to an open window
Summary: Krunner crashed when used to switch to an open window
Status: RESOLVED FIXED
Alias: None
Product: krunner
Classification: Plasma
Component: general (show other bugs)
Version: 5.16.90
Platform: Arch Linux Linux
: NOR crash
Target Milestone: ---
Assignee: Kai Uwe Broulik
URL:
Keywords: drkonqi
: 412109 412124 412459 412876 413188 413261 413263 413297 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-09-26 21:51 UTC by Szymon Uglis
Modified: 2019-11-15 14:43 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.17.1


Attachments
New crash information added by DrKonqi (75.63 KB, patch)
2019-09-26 21:51 UTC, Szymon Uglis
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Uglis 2019-09-26 21:51:54 UTC
Application: krunner (5.16.90)

Qt Version: 5.13.1
Frameworks Version: 5.62.0
Operating System: Linux 5.3.1-arch1-1-ARCH x86_64
Distribution: "Arch Linux"

-- Information about the crash:
- What I was doing when the application crashed:
I was reading website in Firefox and my song in spotify changed so I opened krunner and searched for spotify then selected spotify under open windows section.

After selecting entry in krunner from `windows` section, nothing happens, then after about 5 secs notification appears that says that krunner crashed.

The crash can be reproduced every time.

-- Backtrace (Reduced):
#6  0x00007f4fa3d8e8bb in KWindowInfo::KWindowInfo(KWindowInfo const&) () at /usr/lib/libKF5WindowSystem.so.5
#7  0x00007f4f9751088f in  () at /usr/lib/qt/plugins/krunner_windows.so
#8  0x00007f4f8ee1b0f1 in Plasma::RunnerContext::run(Plasma::QueryMatch const&) () at /usr/lib/libKF5Runner.so.5
#9  0x00007f4f8ee207a7 in Plasma::RunnerManager::run(Plasma::QueryMatch const&) () at /usr/lib/libKF5Runner.so.5
#10 0x00007f4f8ee8e173 in  () at /usr/lib/libmilou.so.5


The reporter indicates this bug may be a duplicate of or related to bug 412109.

Possible duplicates by query: bug 412381, bug 412300, bug 412296, bug 412218, bug 412123.

Reported using DrKonqi
Comment 1 Szymon Uglis 2019-09-26 21:51:54 UTC
Created attachment 122892 [details]
New crash information added by DrKonqi

DrKonqi auto-attaching complete backtrace.
Comment 2 Kai Uwe Broulik 2019-10-22 07:47:33 UTC
*** Bug 413188 has been marked as a duplicate of this bug. ***
Comment 3 Kai Uwe Broulik 2019-10-22 07:47:57 UTC
*** Bug 413261 has been marked as a duplicate of this bug. ***
Comment 4 Kai Uwe Broulik 2019-10-22 07:48:04 UTC
*** Bug 413263 has been marked as a duplicate of this bug. ***
Comment 5 Kai Uwe Broulik 2019-10-22 07:48:24 UTC
*** Bug 412109 has been marked as a duplicate of this bug. ***
Comment 6 Kai Uwe Broulik 2019-10-22 07:48:57 UTC
*** Bug 412459 has been marked as a duplicate of this bug. ***
Comment 7 Kai Uwe Broulik 2019-10-22 07:49:07 UTC
*** Bug 412876 has been marked as a duplicate of this bug. ***
Comment 8 Kai Uwe Broulik 2019-10-22 08:01:10 UTC
*** Bug 413297 has been marked as a duplicate of this bug. ***
Comment 9 Kai Uwe Broulik 2019-10-22 08:58:53 UTC
Git commit 549374ba5f1e2b611018c6cfc4a48104a5a8e72c by Kai Uwe Broulik.
Committed on 22/10/2019 at 08:58.
Pushed by broulik into branch 'Plasma/5.17'.

[Windows Runner] Gather window again when running result

Since we fixed RunnerManager::teardown to actually be emitted, the runner would throw away its gathered window info and then crash in run().
I couldn't figure out what the proper API was so this is a workaround to keep it from crashing at least.
However, the runner also didn't check whether the window was actually still valid by the time run() was called,
so querying for the window again once it is called and checking validity is a good thing either way imho.
In the future, this probably should be ported to using libtaskmanager :)
FIXED-IN: 5.17.1

Differential Revision: https://phabricator.kde.org/D24849

M  +7    -3    runners/windows/windowsrunner.cpp

https://commits.kde.org/plasma-workspace/549374ba5f1e2b611018c6cfc4a48104a5a8e72c
Comment 10 Nate Graham 2019-11-15 14:43:01 UTC
*** Bug 412124 has been marked as a duplicate of this bug. ***