Bug 502502 - Sometimes "Cancel Logout" notifications are missing buttons
Summary: Sometimes "Cancel Logout" notifications are missing buttons
Status: RESOLVED DOWNSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: Session Management (show other bugs)
Version: 6.3.3
Platform: Manjaro Linux
: NOR critical
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-04-06 22:56 UTC by php4fan
Modified: 2025-04-10 19:00 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot (20.57 KB, image/png)
2025-04-07 21:15 UTC, php4fan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description php4fan 2025-04-06 22:56:22 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports

Please remove this comment after reading and before submitting - thanks!
***

SUMMARY


STEPS TO REPRODUCE
1.  Open some files in Kate, modify them and don't save
2.  From the Start menu on the bottom-left of the screen, do Restart
3.  A popup shows up in Kate asking whether to save changes, discard them, or CANCEL. Click Cancel.

After realizing that I had unsaved work in Kate (or any other app), I've decided to cancel rebooting, and I should be allowed to do so.

OBSERVED RESULT
This warning shows up on the bottom-right of the screen:

(oh come on, this still doesn't support pasting images? See attachment if I remember to attach it)

"The following application did not close:
Kate Logging out anyway in 2 minutes"

(note BTW the lack of a newline and any punctuation whatsoever after the name of the application)

WHAT?? Are you kidding me? I said Cancel. And now you tell me you are still going to reboot after a completely arbitrary amount of time and there is no "undo", "cancel", "abort", or "stop reboot" button?? And you are going to reboot ANYWAY, even if after the two minutes I haven't either saved the changes or closed Kate???
This is absolutely bat**it crazy.


EXPECTED RESULT
Either 
(1) When I'm prompted whether to save, discard changes or cancel and I choose cancel, cancel the reboot. I understand that maybe the "Cancel" refers to closing the application, but that used to cancel the reboot too and that made perfect sense. Closing the application is part of the shutdown, if I cancel that, it makes sense to abort the shutdown; also, it's the only opportunity you give me and it's the only reasonable third choice to saving the changes and discarding them, when that choice is the consequence of initiating a restart.
Or 
(2) Do as you do now, but when you show the baloon notification that you're going to reboot in 2 minutes, put a "CANCEL REBOOT" button there, or "abort" or whatever you want to call it.

SOFTWARE/OS VERSIONS
Operating System: Manjaro Linux 
KDE Plasma Version: 6.3.3
KDE Frameworks Version: 6.12.0
Qt Version: 6.8.2
Kernel Version: 6.6.84-1-MANJARO (64-bit)
Graphics Platform: Wayland
Processors: 12 × 12th Gen Intel® Core™ i7-1255U
Memory: 15.3 GiB of RAM
Graphics Processor: Intel® Iris® Xe Graphics
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: Vivobook_ASUSLaptop X1502ZA_F1502ZA
System Version: 1.0

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2025-04-07 19:42:17 UTC
When I do this, I see the same notification but it has a button labeled "Cancel Logout". Does yours not have this button? Can you take a screenshot of it so I can see what it looks like for you?
Comment 2 php4fan 2025-04-07 21:15:38 UTC
Created attachment 180080 [details]
screenshot

Luckily I did take a screenshot when this happened. I forgot to attach it. Here it is.

Now I have retried and I see that it usually does have the "Cancel logout" button. So the general design is ok, there just seems to be some misterious bug that sometimes prevents the button from showing.
Comment 3 Nate Graham 2025-04-08 16:42:35 UTC
OK, so the issue is that sometimes the buttons are both missing! That's not good. The fact that this happens on Wayland and Plasma 6.3 is troubling; we did a big refactor of notifications to make sure this kind of thing can't happen. So there are two options:
1. The sending app fails to ask for buttons, so it's at fault rather than the notification code
2. The sending app asks for buttons but the notification fails to show them, and is at fault itself

Do you ever see this in other contexts? Any other notifications missing buttons?

It would be great if we can establish a pattern of some sort.
Comment 4 php4fan 2025-04-08 23:30:15 UTC
Also note how the layout of the notification is broken, besides the missing buttons. The text "· Kate" (with the bullet point) should be on its own line. I wonder if the two things (broken layout and missing buttons) are related.

> Do you ever see this in other contexts? Any other notifications missing buttons?

Not that I remember. The notifications that I see most often are Filezilla's "Transfer finished" and Thunderbird's one for when I got new mail. These don't have buttons but I don't think they're supposed to. One thing that I've always found frustrating is that clicking on them doesn't bring up the application that generated them, but I don't suppose that's related.

I retried the reboot thing a few times and I haven't been able to reproduce the issue again.
Comment 5 Nate Graham 2025-04-09 19:22:41 UTC
Notifications for transferring files also have buttons. Are those ever missing?

Notifications from Telegram, NeoChat, and Discover also have buttons.
Comment 6 php4fan 2025-04-09 19:44:17 UTC
> Notifications for transferring files also have buttons. Are those ever missing?

No, not that I have ever noticed.

> Notifications from Telegram,

Same.

If they ever happened to be missing occasionally, however, I would be likely not to notice, because I never use them.
Comment 7 Nate Graham 2025-04-10 16:02:34 UTC
Has it *ever* happened again as originally described? If you engineer a situation where you have, say, KWrite open with a new empty file with "lalalalala" typed into it, and then you try to reboot, does the notification lack buttons again?
Comment 8 php4fan 2025-04-10 16:20:42 UTC
No, it only happened that one time.

> If you engineer a situation ...

I tried that and no.
Comment 9 Nate Graham 2025-04-10 17:21:45 UTC
Is there any chance you saw this issue while still actually running Plasma 6.2 because you had just updated to 6.3 using pacman or something and hadn't rebooted yet, and the issue appeared while you were in fact trying to reboot?
Comment 10 php4fan 2025-04-10 17:31:19 UTC
> Is there any chance you saw this issue while still actually running Plasma 6.2 

No. It's very likely that I had installed _some_ updates (which didn't say a restart was required) and I hadn't rebooted yet, but I was definitely already on Plasma 6.3.
Comment 11 Nate Graham 2025-04-10 18:00:29 UTC
Aha! I think we're getting closer. Any chance the update was the one that provided you with a Plasma minor point release, for example 6.3.3 or 6.3.4? If so, do you remember what exact Plasma version you already had on the system before the update?
Comment 12 php4fan 2025-04-10 18:27:35 UTC
> Any chance the update was the one that provided you with a Plasma minor point release

I don't think so but I can't say with absolute certainty.
Comment 13 Nate Graham 2025-04-10 19:00:56 UTC
OK, then I'm a little bit less sure than I'd like to be, but I'm still fairly sure of what happened: you've been a victim of in-place upgrades.

Basically right after you updated your system, for anything currently running (like Plasma), the files on disk no longer matched the versions of those files in memory. If anything running needed to reach out to load something from the disk that wasn't already in memory, it would get a version that wasn't *necessarily* compatible with other files in memory.

When this happens, it manifests as extremely strange transient issues that go away after rebooting — exactly as happened here.

If there was a Plasma upgrade, then probably what happened was that the upgrade provided new versions of some of the notification files; there were several changes in Plasma 6.3 point releases. If, as mentioned earlier, you don't regularly see notifications with buttons, then it's quite possible that the file with the buttons in it never got loaded into memory. So then when Plasma tried to show you one such notification, it loaded the file, but got the one that was newly installed by the system update, and it was subtly incompatible with the in-memory files and broke, producing this issue.

If there was no Plasma upgrade then probably the above happened with a different file, something deeper in the system that caused Plasma's session restore system to believe it didn't need to ask the notification for any buttons.

Preventing horrible issues like this is one of the reasons why KDE recommends offline updates. I'm not sure whether Manjaro or Arch support offline updates now, but if they do, I would strongly recommend using them. If not, and switching distros isn't an option, it's always a good idea to reboot immediately after an upgrade. In this case, restarting plasmashell first is probably a good idea too, to prevent being bitten by this issue when you do try to reboot!