Crash in Qt when resizing windows

Matt Rogers mattr at kde.org
Fri Aug 25 03:40:43 BST 2006


On Thursday 24 August 2006 21:33, Matt Rogers wrote:
> On Thursday 24 August 2006 00:34, Simon Hausmann wrote:
> > On Thursday 24. August 2006 02:48, Matt Rogers wrote:
> > > Hi,
> > >
> > > While resizing the KDevelop main window, I've noticed that I see a lot
> > > of the following in my debug output:
> > >
> > > QPixmap: Invalid pixmap parameters
> > > QPainter::begin: Cannot paint on a null pixmap
> >
> > If these turn out to be the source of the problem setting a breaking in
> > Qt where the warnings are might help to track down the reason. Or
> > alternatively set QT_FATAL_WARNINGS=1 and continue from the core dump :)
>
> I started having a similar crash in other places, so I dug around with gdb
> a bit, and here's what I found:
>
> Using the backtrace sent in my first message as the reference point, the
> paint device in frame #5 is null, and that paint device is created up in
> frame #9 by instantiating a QPainter with a QPixmap pointer as the paint
> device. The d-pointer for QPainter has both a device member and an engine
> member. The d-pointer's device member is set correctly. but the engine's
> paint device is is still set to zero, and eventually, that causes the
> crash. My guess is that the engine's paint device should be set to the same
> paint device that the QPainter holds in its d-pointer.
>

And after looking at the code, I guessed wrong, so I'll let the pros handle 
this one. :)

-- 
Matt




More information about the kde-core-devel mailing list