FedoraQt / MediaWriter

Fedora Media Writer - Write Fedora Images to Portable Media
GNU General Public License v2.0
715 stars 154 forks source link

Verification gets stuck when the image is corrupted, instead of displaying an error #714

Open kparal opened 4 months ago

kparal commented 4 months ago

When a corrupted image is written, the verification phase gets stuck and doesn't print any error. It looks like this, forever: stuck-verification

There is a notification shown informing you about the problem, but if you miss the notification, you simply don't know that something is wrong. notif

Relying just on the notification is a bad practice. The application window should display the information clearly, instead of getting stuck.

On standard output in terminal, the error is written out correctly:

W@65076ms: Writing failed: "Your drive is probably damaged.\n"

mediawriter-5.1.0-1.fc40.x86_64

kparal commented 4 months ago

How to create a corrupted iso:

$ cp Fedora-Workstation-Live-x86_64-40-1.14.iso corrupt.iso

$ dd if=/dev/zero of=corrupt.iso bs=1 count=1 seek=500M conv=notrunc
1+0 records in
1+0 records out
1 byte copied, 0,000458719 s, 2,2 kB/s

$ checkisomd5 -v corrupt.iso 
corrupt.iso:   cd376411ceeed10ca344e2592f2842f1
Fragment sums: 58f61fb6c84ef153c3cb58c775d4c898fb7c9e56b4ad32e6c2cd7f21cdf8
Fragment count: 20
Supported ISO: no
Press [Esc] to abort check.
Checking: 023.8%

The media check is complete, the result is: FAIL.

It is not recommended to use this media.