Bug 207563 - k3b does not recognize finished burn process
Summary: k3b does not recognize finished burn process
Status: RESOLVED FIXED
Alias: None
Product: k3b
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Trueg
URL:
Keywords:
: 198889 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-09-16 12:29 UTC by Moritz Isselstein
Modified: 2011-01-03 13:15 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot with finished dvd but running dialogue/clock (273.77 KB, image/png)
2009-09-16 12:32 UTC, Moritz Isselstein
Details
Just a pic of what it looks like. (167.93 KB, image/jpeg)
2009-09-25 06:06 UTC, Matt
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Isselstein 2009-09-16 12:29:44 UTC
Version:           1.67.0 (using 4.3.1 (KDE 4.3.1) "release 163", KDE:KDE4:Factory:Desktop / openSUSE_11.1)
Compiler:          gcc
OS:                Linux (x86_64) release 2.6.27.29-0.1-default

When burning data on a DVD-RW k3b finishes and reports it finishes in the burning dialogue, but it keeps on running. (Elapsed time clock still ticking, buffers full, etc.) I can abort and use the DVD but I would like k3b to recognize that it has finished burning the dvd.

Steps to reproduce:
1. burn a dvd-rw with data
2. wait until oblivion - it never says finished - waited for 2+ hours
Aborting is not possible, i have to kill k3b

Expected behaviour: 
exiting dialogue and returning to k3b upon finish. else giving me a popup that it has finished and then let me decide what to do next, at least that i do not have to kill k3b
Comment 1 Moritz Isselstein 2009-09-16 12:32:27 UTC
Created attachment 36991 [details]
Screenshot with finished dvd but running dialogue/clock

As you can see the burning process finished but the buffers are still full and the elapsed time clocked has ticked. session never closes (stays at 0%).
Comment 2 Moritz Isselstein 2009-09-16 20:22:07 UTC
Version installed: k3b-1.66.0.svn1009369-4.18
Comment 3 Michal Ziabkowski 2009-09-18 00:04:54 UTC
I've noticed the same bug. Each burn hangs at the "Closing session" message. Clicking Cancel does nothing, so I'm forced to manually eject the disk and kill K3b. I'd appreciate it if somebody took a look at this, since it makes burning pretty cumbersome.

Here are some excepts from lastlog.log:
[System] K3b Version: 1.67.0 (rev 1024803)
[System] KDE Version: 4.3.1 (KDE 4.3.1)
[System] QT Version:  4.5.2
[System] Kernel:      2.6.31-gentoo
[cdrecord] Wodim version: 1.1.9
[...]
[mkisofs] 2230009 extents written (4355 MB)
[cdrecord] Track 01: 4344 of 4355 MB written (fifo 100%) [buf  99%]  12.3x.
[cdrecord] Track 01: 4345 of 4355 MB written (fifo 100%) [buf  99%]  12.7x.
[cdrecord] Track 01: 4346 of 4355 MB written (fifo 100%) [buf  99%]  12.3x.
[cdrecord] Track 01: 4347 of 4355 MB written (fifo 100%) [buf  99%]  12.7x.
[cdrecord] Track 01: 4348 of 4355 MB written (fifo 100%) [buf  99%]  12.3x.
[cdrecord] Track 01: 4349 of 4355 MB written (fifo 100%) [buf  99%]  12.7x.
[cdrecord] Track 01: 4350 of 4355 MB written (fifo 100%) [buf  98%]  12.2x.
[cdrecord] Track 01: 4351 of 4355 MB written (fifo 100%) [buf  98%]  12.7x.
[cdrecord] Track 01: 4352 of 4355 MB written (fifo 100%) [buf  98%]  12.2x.
[cdrecord] Track 01: 4353 of 4355 MB written (fifo 100%) [buf  98%]  12.6x.
[cdrecord] Track 01: 4354 of 4355 MB written (fifo 100%) [buf  98%]  12.2x.
[cdrecord] Track 01: 4355 of 4355 MB written (fifo 100%) [buf  98%]  12.6x.
[cdrecord] Track 01: Total bytes read/written: 4567058432/4567058432 (2230009 sectors).
[cdrecord] Writing  time:  326.519s
[cdrecord] Average write speed  10.7x.
[cdrecord] Min drive buffer fill was 92%
[cdrecord] Fixating...
[cdrecord] Fixating time:   16.231s
[cdrecord] wodim: fifo had 71936 puts and 71936 gets.
[cdrecord] wodim: fifo was 0 times empty and 10523 times full, min fill was 40%.
Comment 4 Matt 2009-09-25 06:06:05 UTC
Created attachment 37166 [details]
Just a pic of what it looks like.

The CD Does not eject.  I hit cancel and nothing happens.  I have to -HUP k3b.  The CD is burned fine, though.
Comment 5 Matt 2009-09-25 06:07:23 UTC
(Sorry, I submitted the screen shot before the report... :-( )

Same here.  It's been this way for a while using SVN (couple months at least).  1.66.0_alpha2 does not do this.  I'm using SVN 1027903 now and it's still doing this.

OS: Linux 2.6.31 (but it's been back to .28 and same thing)
Qt: 4.5.1
KDE: 4.3.1
Cdrecord-ProDVD-ProBD-Clone 2.01.01a57
mkisofs 2.01.01a57

Anything else you need to know?


M.
Comment 6 Michal Ziabkowski 2009-09-28 15:03:41 UTC
And now for the strange part... I've just downgraded to 1.66.0_alpha2 and the same thing happens. I'll check whether it's connected to verification being enabled.
Comment 7 Michal Ziabkowski 2009-09-28 16:01:37 UTC
Burned a few dvds, with and without verification, with Multisession set to Auto, as well as No multisession. No change. I get "Closing session" and nothing happens.
Comment 8 Michal Ziabkowski 2009-10-05 21:47:07 UTC
I think this might be the root of the problem:

K3bQProcess::QProcess(0xa4075f0)
K3bQProcess::QProcess(0x0)
QObject::connect: Cannot queue arguments of type 'QProcess::ExitStatus'
(Make sure 'QProcess::ExitStatus' is registered using qRegisterMetaType().)
K3bQProcess::QProcess(0xa4075f0)

I'm actually suprised I didn't see it earlier.
Comment 9 Michal Ziabkowski 2009-10-07 18:25:05 UTC
I tried this:

--- libk3b/projects/k3bcdrecordwriter.cpp       (revision 1032365)
+++ libk3b/projects/k3bcdrecordwriter.cpp       (working copy)
@@ -37,6 +37,7 @@
 #include <kglobal.h>
 #include <ktemporaryfile.h>

+Q_DECLARE_METATYPE( QProcess::ExitStatus )

 class K3b::CdrecordWriter::Private
 {
@@ -108,6 +109,7 @@
     connect( &d->process, SIGNAL(stdoutLine(const QString&)), this, SLOT(slotStdLine(const QString&)) );

     // we use a queued connection to give the process object time to wrap up and return to a correct state
+    qRegisterMetaType<QProcess::ExitStatus>();
     connect( &d->process, SIGNAL(finished(int, QProcess::ExitStatus)), this, SLOT(slotProcessExited(int, QProcess::ExitStatus)), Qt::QueuedConnection );
 }


Unfortunately, while this does alleviate the problem (now the "Burn successfully finished" is displayed), the "Closing session" problem still remains.
Comment 10 Michał Małek 2009-10-11 09:11:28 UTC
SVN commit 1033802 by mmalek:

Fixed notification of process finish. Signal finished() weren't being emitted when there were some bytes left in stdout, _q_processDied() returned false and the next time _q_processDied() was called it returned before getting chance to emit finished() signal.
BUG: 207563

 M  +25 -12    k3bqprocess.cpp  
 M  +1 -0      k3bqprocess.h  
 M  +1 -0      k3bqprocess_p.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1033802
Comment 11 Michał Małek 2009-10-11 09:17:22 UTC
@Michal: please check with current trunk if you're still getting "QProcess::ExitStatus" issue. If yes, what version of Qt do you have?
Comment 12 Michal Ziabkowski 2009-10-11 14:31:16 UTC
Yes, I still get it:
K3bQProcess::QProcess(0x88e7040)
K3bQProcess::QProcess(0x0)
QObject::connect: Cannot queue arguments of type 'QProcess::ExitStatus'
(Make sure 'QProcess::ExitStatus' is registered using qRegisterMetaType().)
K3bQProcess::QProcess(0x88e7040)

Qt: 4.5.3
KDE: 4.3.2 (KDE 4.3.2)

On the plus side, with the QProcess::ExitStatus workaround applied current trunk works as intended, i.e. burns actually finish. Thanks.
Comment 13 Michał Małek 2009-10-11 17:55:42 UTC
Qt documentation is clear: for queued connections all arguments must be registered meta types. It's strange it works without it on my system (even though I have the same environment as you). Nevertheless, I will apply your patch.
Comment 14 Michał Małek 2009-10-11 17:58:21 UTC
SVN commit 1033934 by mmalek:

For queued connections all arguments must be registered meta types. Patch by Michal Ziabkowski. Thanks!
BUG: 207563

 M  +4 -0      k3bcdrecordwriter.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1033934
Comment 15 Michał Małek 2009-10-11 23:04:04 UTC
*** Bug 198889 has been marked as a duplicate of this bug. ***
Comment 16 Matt 2009-10-12 00:14:32 UTC
(In reply to comment #14)
> SVN commit 1033934 by mmalek:
> 
> For queued connections all arguments must be registered meta types. Patch by
> Michal Ziabkowski. Thanks!
> BUG: 207563
> 
>  M  +4 -0      k3bcdrecordwriter.cpp  
> 
> 
> WebSVN link: http://websvn.kde.org/?view=rev&revision=1033934


Just chiming in to confirm that the patch works.  I updated from SVN an hour or so after I got this mail notification and compiled and tested.  Data CDs close and Audio CDs close.  I haven't tested with anything DVD yet, though.

I'm sorry I can't give you an exact SVN rev, I'm not sure where in the source dir it is... :-(  If it's the top entry in .svn/entries then it's revision 1034080.

M.