[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: koffice/libs/guiutils
From:       Cyrille Berger <cberger () cberger ! net>
Date:       2009-03-30 21:22:26
Message-ID: 20090330212226.GA7351 () diwi ! org
[Download RAW message or body]

On Mon, Mar 30, 2009, Thomas Zander wrote:
> On Monday 30. March 2009 20.26.31 Cyrille Berger wrote:
> > SVN commit 947009 by berger:
> >
> > "Fix:" random crash when drawing on a layer with an effect mask
> >
> >  M  +0 -1      KoProgressBar.cpp
> >  M  +11 -1     KoProgressUpdater.cpp
> >
> []
> >
> >  void KoProgressUpdater::scheduleUpdate() {
> > -    d->action->execute();
> > +//     d->action->execute();
> > +
> > +    // The previous line triggers random crashes, that are impossible to
> > track or to trully understand, +    // to fix that issue, I make directly
> > the following call, I believe this is a wrong change, since it +    //
> > probably have a significant performance impact (especially on small
> > operation) and +    // that a simple QThread running would be better, but
> > for now this change will have to do. +    //HACK
> > +    d->update();
> > +    d->updateUi();
> > +    // ENDHACK
> > +
> 
> I can understand your need to fix a bug, but this is rather extreme since you 
> throw away the whole concept of KoAction by executing the action and the 
> updating in the same thread.
I know. And I am no more happy than you about this change, but we are running
out of time, and I don't have a clue of what's going on, it's a random corruption
of the stack/memory program, and neither gdb nor valgrind provides meaningfull
information on what's going on. It might as well be that KoAction isn't at fault
and just make the crash harder to get, but before the patch, filter mask, less
than 10s of painting => crash, after the crash, filter mask more than 10 minutes
of painting => no crash. And I haven't had any drawbacks with it.

> I think this introduces more problems that it solves :(
I don't think so.
 
> Have you checked that the usage of the updater is the same as in the unit 
> tests or the print dialog?  I have run them hundreds of times and never got 
> random crashes.
If you have a better solution, I take it. Also note that Krita is much more
multithreaded than kword, which means the problem might lies in Threadweaver,
or QtConcurent, since both of them are used in krita, and one of them is used
in KoProgressBar, unfortunately we are running out of time to find a correct
solution.

> Please also test if printing of a multi page doc in kword still works.
It still works.

-- 
Cyrille Berger
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic