Qt-interest Archive, February 2008
Crashes with QRegion
Message 1 in thread
In my project, the image editor Krita, we keep track of which areas are
dirtied and need to be recomposited using QRegion. The whole application is
very much multi-threaded, but we protect all accesses to the dirty region
using QMutexes.
However, we frequently get crashes when adding or substracting a rect to or
from a QRegion, especially when the QRegion::rects() starts degenerating into
scanlines. See, for instance, http://bugs.kde.org/show_bug.cgi?id=154369.
Now I was wondering whether we are abusing QRegion, whether we should
QPainterPath instead or whether it's a bug in QRegion?
--
[ signature omitted ]
Message 2 in thread
On Monday 04 February 2008 11:34:56 Boudewijn Rempt wrote:
> In my project, the image editor Krita, we keep track of which areas are
> dirtied and need to be recomposited using QRegion. The whole application is
> very much multi-threaded, but we protect all accesses to the dirty region
> using QMutexes.
>
> However, we frequently get crashes when adding or substracting a rect to or
> from a QRegion, especially when the QRegion::rects() starts degenerating
into
> scanlines. See, for instance, http://bugs.kde.org/show_bug.cgi?id=154369.
>
> Now I was wondering whether we are abusing QRegion, whether we should
> QPainterPath instead or whether it's a bug in QRegion?
Hi,
in which version(s) of Qt do you experience these crashes? Unless you use
QRegion::setRects() (where you really have to know what you're doing) using
QRegion should be fine, so it could be a bug in QRegion.
--
[ signature omitted ]
Message 3 in thread
On Monday 04 February 2008, HÃvard Wall wrote:
> in which version(s) of Qt do you experience these crashes? Unless you use
> QRegion::setRects() (where you really have to know what you're doing) using
> QRegion should be fine, so it could be a bug in QRegion.
I'm currently using 4.3.3, but with earlier 4.3 versions we had the same
problem. I'm not using setRects, just adding and subtracting single rects
using += and -=.
--
[ signature omitted ]