Review Request: Fix ReadOnlyPart crash for non-local files

Alessandro Diaferia alediaferia at gmail.com
Mon Apr 6 12:41:58 BST 2009


As done with my patch, in the last mail i sent to the mailing list (sorry
for duplicating) just connecting to the finished() signal solves the issue..
But i don't really know whether my approach is correct or not.

2009/4/6 Raphael Kubo da Costa <kubito at gmail.com>

>
>
> > On 2009-04-05 12:37:46, Aaron Seigo wrote:
> > > shouldn't the job emit the result signal before being autodeleted in
> this case? seems like a bug in kio to me ...
>
> That's true, I've come to the conclusion that this patch is actually pretty
> hackish.
>
> Actually, the problem is in kdelibs/kdeui/kuiserverjobtracker.cpp (lines
> 84-85) -- it's connecting the signal emitted when the Stop button in the job
> tracker is pressed to a call to KJob::kill without passing KJob::EmitResult
> as an argument. By default, the argument is KJob::Quietly, which does not
> emit the result signal.
>
> However, I don't know how it can be fixed with the current structure --
> kdelibs/kdeui/kstatusbarjobtracker.cpp implements a killJob method, but
> KUiServerJobTracker doesn't store the job as a member.
>
>
> - Raphael
>
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/524/#review830
> -----------------------------------------------------------
>
>
> On 2009-04-04 18:57:16, Raphael Kubo da Costa wrote:
> >
> > -----------------------------------------------------------
> > This is an automatically generated e-mail. To reply, visit:
> > http://reviewboard.kde.org/r/524/
> > -----------------------------------------------------------
> >
> > (Updated 2009-04-04 18:57:16)
> >
> >
> > Review request for kdelibs.
> >
> >
> > Summary
> > -------
> >
> > As the listed bugs say, when a URL is passed to a program and its
> ReadOnlyPart opens it, the program crashes when closed if the transfer is
> stoppped before it's finished. Calling "ark www.foo.bar/baz.zip" or "okular
> www.foo.bar/baz.pdf" both present this behaviour.
> >
> > This patch makes the registered FileCopyJob not autodelete itself when
> the transfer is stopped, thus making ReadOnlyPart::abortLoad not access a
> dead object.
> >
> >
> > This addresses bugs 186722, 186980, 187538, and 188231.
> >     https://bugs.kde.org/show_bug.cgi?id=186722
> >     https://bugs.kde.org/show_bug.cgi?id=186980
> >     https://bugs.kde.org/show_bug.cgi?id=187538
> >     https://bugs.kde.org/show_bug.cgi?id=188231
> >
> >
> > Diffs
> > -----
> >
> >   /trunk/KDE/kdelibs/kparts/part.cpp 948889
> >
> > Diff: http://reviewboard.kde.org/r/524/diff
> >
> >
> > Testing
> > -------
> >
> > Both Ark and Okular stopped crashing here.
> >
> >
> > Thanks,
> >
> > Raphael
> >
> >
>
>
Cheers

-- 
Alessandro Diaferia
KDE Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090406/48f2a824/attachment.htm>


More information about the kde-core-devel mailing list