[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#341982: libqt3-mt: SIGFPE in QIconViewItem::paintItem when using kimdaba



The error occurs in qt-x11-free-3.3.6.patched/src/iconview/qiconview.cpp:2061 (libqt3-mt 3:3.3.6-1), because there's no check if textRect( FALSE ).width() or textRect( FALSE ).height() is zero.

    if ( isSelected() ) {
        p->setBrush( QBrush( cg.highlight() ) );
        p->setPen( QPen( cg.highlight() ) );
        p->drawRoundRect( textRect( FALSE ),
                          1000 / textRect( FALSE ).width(),
			  1000 / textRect( FALSE ).height() );		
	p->setPen( QPen( cg.highlightedText() ) );

That gives us a nice division by zero.

In kimdaba the textrect is initialized by

QRect textRect(0,0,0,0);  // thumbnail.cpp:259

If the item's label does not contain any text, this error occurs.

When changing the line to
QRect textRect(0,0,1,1);
it's working fine.

11_qt_rubberband.dpatch causes this problem.

Cheers,
Christoph



Reply to: