Bug 479863

Summary: Does not finish the burning process of a iso image but the DVD risults burnt without errors
Product: [Applications] k3b Reporter: Paolo Berti <pbcv4n>
Component: generalAssignee: k3b developers <k3b>
Status: REPORTED ---    
Severity: normal CC: michalm, pbcv4n, trueg
Priority: NOR    
Version: 19.12   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: the error output of k3b

Description Paolo Berti 2024-01-15 20:29:00 UTC
Created attachment 164926 [details]
the error output of k3b

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Start burning a iso image. Writing mode: auto. Verify written data
2. at around 98% 
2. 
3. 

OBSERVED RESULT
at around 98% it stops without verifying and gives a error message

EXPECTED RESULT
should verify without error

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Ububtu 20.04.6
(available in About System)
KDE Plasma Version: 19.12.3
KDE Frameworks Version: 5.67.0
Qt Version: 5.12.8

ADDITIONAL INFORMATION
Comment 1 Paolo Berti 2024-01-16 11:19:05 UTC
WORK AROUND FOR THE K3b problem: hang at the end of DVD-R[W] DAO recording.

The problem was observed with image sizes not divisible by 32KB and firmware version EL01. It manifests itself as I/O error in the last WRITE command, which is caused by latter's timeout. The recording per se is properly completed by unit and no data loss occurs. To work around the timeout condition, pad input image file up to the nearest 32KB boundary or avoid DAO recordings.

One way to pad is to:

perl -e '$blk=32*1024; $nm=@ARGV[0]; $sz=(stat($nm))[7]; truncate($nm,int(($sz+$blk-1)/$blk)*$blk);' ubuntu-20.04.6-desktop-amd64-b.iso

(ref: http://fy.chalmers.se/~appro/linux/DVD+RW/hcn.html)

IT WORKED FOR ME!!!
Comment 2 Paolo Berti 2024-01-16 11:20:30 UTC
WORK AROUND FOR THE K3b problem: hang at the end of DVD-R[W] DAO recording.

The problem was observed with image sizes not divisible by 32KB and firmware version EL01. It manifests itself as I/O error in the last WRITE command, which is caused by latter's timeout. The recording per se is properly completed by unit and no data loss occurs. To work around the timeout condition, pad input image file up to the nearest 32KB boundary or avoid DAO recordings.

One way to pad is to:

perl -e '$blk=32*1024; $nm=@ARGV[0]; $sz=(stat($nm))[7]; truncate($nm,int(($sz+$blk-1)/$blk)*$blk);' ubuntu-20.04.6-desktop-amd64-b.iso

(ref: http://fy.chalmers.se/~appro/linux/DVD+RW/hcn.html)

IT WORKED FOR ME!!!
Comment 3 Paolo Berti 2024-01-18 14:44:18 UTC
WORK AROUND FOR THE K3b problem: hang at the end of DVD-R[W] DAO recording.

The problem was observed with image sizes not divisible by 32KB. It manifests itself as I/O error in the last WRITE command, which is caused by latter's timeout. The recording per se is properly completed by unit and no data loss occurs. To work around the timeout condition, pad input image file up to the nearest 32KB boundary or avoid DAO recordings.

One way to pad is to:

perl -e '$blk=32*1024; $nm=@ARGV[0]; $sz=(stat($nm))[7]; truncate($nm,int(($sz+$blk-1)/$blk)*$blk);' example.iso

(ref: http://fy.chalmers.se/~appro/linux/DVD+RW/hcn.html)

IT WORKED FOR ME!!!

HELP FOR A RESOLVE
The bug is described and a diagnosis is given here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=794868

It gives this patch to the growisofs_mmc.cpp file as a definitive solution:
________________________________________________________________________
- if (!(errcode=cmd.transport (WRITE,(void *)buff,size)))
+ if (!(errcode=cmd.transport (WRITE,(void *)buff,nbl*2048)))
     break;
________________________________________________________________________
In the source package of dvd+rw-7.1-14build1 (used by Ubuntu 20.04.6), the file growisofs_mmc.cpp, at line n. 527, has exactly:
if (!(errcode=cmd.transport (WRITE,(void *)buff,size)))
So, corrected as above can resolve the bug.

I am not a c++ expert and am not able to do it by my self.
Comment 4 Paolo Berti 2024-01-29 18:05:16 UTC
I did the patch above described to growisofs_mmc.cpp and compiled from source (not easy at all):(https://salsa.debian.org/optical-media-team/dvd-rw-tools).

The resulted growisofs executable, placed in /usr/bin/, worked well without any error while burning the iso file.
(ubuntu-20.04.6-desktop-amd64.iso)
Comment 5 Paolo Berti 2024-01-29 18:07:37 UTC
I did the patch above described to growisofs_mmc.cpp and compiled from source (not easy at all):(https://salsa.debian.org/optical-media-team/dvd-rw-tools).

The resulted growisofs executable, placed in /usr/bin/, worked well without any error while burning the iso file.
(ubuntu-20.04.6-desktop-amd64.iso)