Bug 409473 - Computer shutdown gets cancelled
Summary: Computer shutdown gets cancelled
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Applications
Component: general (show other bugs)
Version: 2.7.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Alex Bikadorov
URL:
Keywords:
: 411367 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-07-03 18:30 UTC by Darafei Praliaskouski
Modified: 2019-09-16 14:57 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darafei Praliaskouski 2019-07-03 18:30:25 UTC
SUMMARY


STEPS TO REPRODUCE
1. Try to shut down computer
2. "Shutdown was cancelled by Krusader"
3. File - Exit does nothing either


EXPECTED RESULT
It works

KDE Frameworks 5.59.0
Qt 5.12.2 (built against 5.12.2)
The xcb windowing system
Comment 1 Alex Bikadorov 2019-07-06 14:37:25 UTC
>File - Exit does nothing either

You mean you cannot close krusader in general? Can you figure out what is preventing this - is Krusader running some process like file copy action or something?
What functionality have you used in Krusader - just starting/closing Krusader does not work?
Comment 2 Darafei Praliaskouski 2019-07-06 14:47:49 UTC
Reproducer:
 - open Krusader
 - edit file, don't save
 - try to shut down computer
 - press "cancel" on pop up asking you to save your work
 - see the notification "shutdown canceled by Krusader"
 - close the edited document, don't save
 - File-Quit does not work anymore, nor shutdown - always cancelled by Krusader.

I believe first time I got there somehow without pressing Cancel on the request to save my work, but can't figure that way for now.
Comment 3 Alex Bikadorov 2019-07-06 18:27:39 UTC
There seems to be a difference between the quitting by the session manager and quitting by the mainwindow->quit() call.

Just one question because i cannot test this myself (I don't use KDE):
If you activate the "Warn on exit" setting in Settings->Configure Krusader->General, do you see the warning dialog of Krusader asking to quit when you try to logout in KDE?

And you use the inbuilt editor in Krusader i guess?

There is another report of this:
https://forum.kde.org/viewtopic.php?f=289&t=153379
Comment 4 Darafei Praliaskouski 2019-07-06 23:46:18 UTC
Yes, I use Katepart / F4 Editor.

If I enable warn on exit and try to logout, no warning is produced, only "Shutdown canceled by Krusader". File-Quit shows it, clicking Quit closes it.
Comment 5 Bug Janitor Service 2019-07-21 04:33:08 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 6 Darafei Praliaskouski 2019-07-21 07:45:32 UTC
^^^ comment above.
Comment 7 Alex Bikadorov 2019-07-21 18:55:40 UTC
I now switched to KDE and found at least two bugs when closing Krusader due to a session logout. One of them fitting your description.
Stay tuned...
Comment 8 Alex Bikadorov 2019-08-04 17:26:56 UTC
Proposed patch: https://phabricator.kde.org/D22932
Comment 9 Erik Quaeghebeur 2019-08-28 10:13:36 UTC
*** Bug 411367 has been marked as a duplicate of this bug. ***
Comment 10 Toni Asensi Esteve 2019-09-15 21:34:27 UTC
Darafei, if you know how to apply patches, you are a right candidate to test the proposal :-), its patch can be downloaded from https://phabricator.kde.org/D22932?download=true (from https://phabricator.kde.org/D22932).

To build Krusader: you can follow the instructions in https://cgit.kde.org/krusader.git/tree/INSTALL
Comment 11 Alex Bikadorov 2019-09-16 14:57:40 UTC
Git commit 45570506328aa606492fab43d8109f1cabe7cb99 by Alexander Bikadorov.
Committed on 16/09/2019 at 14:39.
Pushed by abikadorov into branch 'master'.

Remove 'isExiting' logic from closing sequence

The flag was preventing Krusader from exiting if Krusader::queryClose() was
called but the exit was later cancelled (e.g. by a file save dialog of
KrViewer).

And the destructor Krusader::~Krusader() is not called on a SIGTERM signal
anyways.

FIXED: [ 409473 ] Computer shutdown gets cancelled

M  +2    -6    krusader/krusader.cpp
M  +0    -1    krusader/krusader.h

https://commits.kde.org/krusader/45570506328aa606492fab43d8109f1cabe7cb99