Bug 438954 - Crashes after showing background activity warning
Summary: Crashes after showing background activity warning
Status: RESOLVED FIXED
Alias: None
Product: xdg-desktop-portal-kde
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
: 437852 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-06-20 16:18 UTC by Ilgaz Öcal
Modified: 2021-07-03 01:38 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.22.3


Attachments
Backtrace (5.69 KB, text/plain)
2021-06-23 16:42 UTC, Ilgaz Öcal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ilgaz Öcal 2021-06-20 16:18:43 UTC
SUMMARY


STEPS TO REPRODUCE
1. Install any flatpak from flathub.org
2. Run it (e.g. remmina)
3. It will show a warning once you switch to another application "running in background", click "allow"

OBSERVED RESULT
xdg-desktop-portal.kde crashes (no report e-mail given so it isn't reported)

EXPECTED RESULT
It should normally quit

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20210616
KDE Plasma Version: 5.22.0
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.2
Kernel Version: 5.12.10-1-default (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-5200U CPU @ 2.20GHz
Memory: 7.7 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 5500
ADDITIONAL INFORMATION
wayland is enabled, tried to backtrace but had to cancel after two and a half hours (gdb stuck I guess)
Comment 1 Alois Wohlschlager 2021-06-23 13:58:47 UTC
I don't see an "allow" button, do you mean the close button or the "find out more" button?

Please try to create a backtrace again after cleaning the debuginfod cache (sometimes, stale or corrupt entries there seem to make gdb hang).
Comment 2 Ilgaz Öcal 2021-06-23 16:42:39 UTC
Created attachment 139621 [details]
Backtrace

I managed to get a backtrace now. Attached. About "Allow" in prompt: It first alerts you saying application is running in background. You click "Find out more" and secondary prompt appears having 2 options "allow" and "force quit".
Comment 3 Bug Janitor Service 2021-06-25 15:22:33 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/xdg-desktop-portal-kde/-/merge_requests/39
Comment 4 Jan Grulich 2021-06-25 15:43:18 UTC
*** Bug 437852 has been marked as a duplicate of this bug. ***
Comment 5 Jan Grulich 2021-06-28 06:13:06 UTC
Git commit dbfd0203a37ccbab746072df118afcdc639a9811 by Jan Grulich.
Committed on 28/06/2021 at 06:12.
Pushed by grulich into branch 'master'.

Background portal: avoid crash when allowing app to run in background

We need to return as soon as possible from the notification callback, otherwise it can
happen that the notification is closed and deleted while we block the callback with
a message dialog.

M  +21   -16   src/background.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/dbfd0203a37ccbab746072df118afcdc639a9811
Comment 6 Jan Grulich 2021-06-28 06:13:46 UTC
Git commit 0260e5962a2f8c3dc07e2233fdcea3576cadfa7a by Jan Grulich.
Committed on 28/06/2021 at 06:13.
Pushed by grulich into branch 'Plasma/5.22'.

Background portal: avoid crash when allowing app to run in background

We need to return as soon as possible from the notification callback, otherwise it can
happen that the notification is closed and deleted while we block the callback with
a message dialog.

M  +21   -16   src/background.cpp

https://invent.kde.org/plasma/xdg-desktop-portal-kde/commit/0260e5962a2f8c3dc07e2233fdcea3576cadfa7a