Bug 384348 - Please, put a confirmation dialog for canceling operations
Summary: Please, put a confirmation dialog for canceling operations
Status: RESOLVED FIXED
Alias: None
Product: partitionmanager
Classification: Applications
Component: general (show other bugs)
Version: 3.0
Platform: Kubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Andrius Štikonas
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-04 11:38 UTC by whoisroot
Modified: 2017-09-06 12:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 3.1.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description whoisroot 2017-09-04 11:38:47 UTC
I just lost a 890GB LUKS partition because I misclicked the cancel button instead of the "Details >>" one, and since it had no confirmation, it stopped the process immediately and corrupted the LUKS header. Also, it crashed right after. I`m trying to reproduce the error right now, but a little afraid to lose more data...

A confirmation button is not hard to implement, and it could mean the difference from between a calm and clean operation and days of headache and lost work :(
Comment 1 Andrius Štikonas 2017-09-04 15:46:08 UTC
Sorry for your data loss :(.

I'll try to reproduce it myself on a USB stick...
Comment 2 Andrius Štikonas 2017-09-04 18:24:27 UTC
Do you remember what operation you were doing?
Growing, shrinking or moving?

I do get a crash when cancelling an operation, I even got it on non LUKS file system, so probably some regression. However, I wasn't able to completely lose data.
Comment 3 whoisroot 2017-09-05 20:05:16 UTC
I was moving the LUKS partition when the crash occurred. I tried to reproduce the the bug again by resizing and moving the EFI partition of the disk and cancelling the operation as soon as possible. It destroyed the partition table of the disk (no problem, the data was already lost anyway). I'm using the default installed version of partitionmanager on a live usb of Kubuntu 17.04.
Comment 4 Andrius Štikonas 2017-09-05 20:14:37 UTC
Cancellation works safely in the last kde4 based version 1.1.0 but doesn't work in 1.2.0.

So it looks like KF5 porting bug :(. I'll try to bisect it further to see if I can determine which commit caused this.

By the way, the dialog is actually shown in kde4 version. What happens here is that as soon as "Cancel" is clicked, KDE Partition Manager grays it out and waits until current operation is completed and then asks whether to cancel the remaining operations.
Comment 5 Andrius Štikonas 2017-09-05 21:26:05 UTC
The first bad commit is dcdffadc3ec2990b8c4dc4f3333f101dd2b50d7a:

Port away from KDialog.

This commit is fairly large but most likely the bug is in applyprogressdialog.cpp
Comment 6 Andrius Štikonas 2017-09-05 23:08:25 UTC
Git commit feb2e374e496c65011e036f2a611fa7cc5b4e940 by Andrius Štikonas.
Committed on 05/09/2017 at 23:07.
Pushed by stikonas into branch 'master'.

Fix a crash when clicking cancel in ApplyProgressDialog.

M  +2    -2    src/gui/applyprogressdialog.cpp

https://commits.kde.org/partitionmanager/feb2e374e496c65011e036f2a611fa7cc5b4e940