Bug 124799

Summary: K3B wrong status on cancelling.
Product: [Applications] k3b Reporter: Warlock_BA <warlock_ba>
Component: Burning/HardwareAssignee: Sebastian Trueg <trueg>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 0.12.x   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Burn Window Screenshot

Description Warlock_BA 2006-04-03 01:08:31 UTC
Version:           0.12.10 (using KDE KDE 3.5.1)
Installed from:    Fedora RPMs
Compiler:          GCC 4.1 I think ... 
OS:                Linux

I use a AMD64, Fedora 5 PC, with a LG -4167B burner. I never had problems until this:

I failed burning a DVD (but I think that was the DVD's fault). Then I tried to burn another one.
Scenario: DVD is in drive, hit burn. K3B than takes a long time to respond. I cancel the burning. After 5-10 seconds, K3B starts burning the DVD and finishes it successfull, but it says Canceled as status on finishing the DVD. (but from the scrolling log, all actions were like for a normal write, including Burn successfull @ XXX speed, where XXX is speed number, but I can't remember it exactly).
I can even send you a screenshot of the BURN window, if that helps. Just mail.

Regards,
Andrei
Comment 1 Warlock_BA 2006-04-03 01:09:45 UTC
Created attachment 15430 [details]
Burn Window Screenshot
Comment 2 Sebastian Trueg 2006-04-27 11:58:31 UTC
yes, please provide a screenshot.
Comment 3 Warlock_BA 2006-04-27 13:34:01 UTC
well, the screenshot is attached :) just check it :D
Comment 4 Sebastian Trueg 2006-11-18 14:53:01 UTC
SVN commit 605883 by trueg:

A little improved cancellation handling. This will get all much better after the libk3b rewrite post-1.0

BUG: 124799


 M  +16 -4     datacd/k3bdatajob.cpp  
 M  +1 -1      datadvd/k3bdvdjob.cpp  


--- trunk/extragear/multimedia/k3b/libk3b/projects/datacd/k3bdatajob.cpp #605882:605883
@@ -792,10 +792,22 @@
 
 void K3bDataJob::slotDetermineMultiSessionMode( K3bDevice::DeviceHandler* dh )
 {
-  d->usedMultiSessionMode = getMultiSessionMode( dh->diskInfo() );
+  //
+  // This is a little workaround for the bad cancellation handling in this job
+  // see cancel()
+  //
+  if( d->canceled ) {
+    if( active() ) {
+      cleanup();
+      jobFinished( false );
+    }
+  }
+  else {
+    d->usedMultiSessionMode = getMultiSessionMode( dh->diskInfo() );
 
-  // carry on with the writing
-  prepareWriting();
+    // carry on with the writing
+    prepareWriting();
+  }
 }
 
 
@@ -872,7 +884,7 @@
     return false;
   }
   else
-    return true;
+    return !d->canceled;
 }
 
 
--- trunk/extragear/multimedia/k3b/libk3b/projects/datadvd/k3bdvdjob.cpp #605882:605883
@@ -197,7 +197,7 @@
 				  K3bDevice::STATE_INCOMPLETE :
 				  K3bDevice::STATE_EMPTY );
 
-  if( foundMedium < 0 ) {
+  if( foundMedium < 0 || hasBeenCanceled() ) {
     return false;
   }