Bug 74604 - plastik causes crash while filling table in kopete
Summary: plastik causes crash while filling table in kopete
Status: RESOLVED FIXED
Alias: None
Product: kdelibs
Classification: Frameworks and Libraries
Component: kstyle (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Sandro Giessl
URL:
Keywords:
: 75421 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-08 19:26 UTC by Thomas Vollmer
Modified: 2004-02-18 17:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Vollmer 2004-02-08 19:26:38 UTC
Version:           (anon-) CVS HEAD from 08.02.2004 (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc 3.2 
OS:          Linux

Hi,

the descriped problem occurs not only within kopete, but reproducable from there.

When I use the kopete jabber to query the services of a jabber server I get a crash with the attached BT. BTW, it doesn't matter which qt-copy version is used (3.2.x or 3.3.x).

[New Thread 1024 (LWP 32056)]
[New Thread 2049 (LWP 32061)]
[KCrash handler]
#6  0x41b03612 in XSetForeground () from /usr/X11R6/lib/libX11.so.6
#7  0x414b1195 in obtain_gc (ref=0xbfffe2f0, gc=0xbfffe310, pix=1, dpy=0x0, 
    scrn=0, hd=0, painter_clip_serial=0) at kernel/qpainter_x11.cpp:481
#8  0x414b1eb8 in QPainter::updateBrush() (this=0xbfffe1f0)
    at kernel/qpainter_x11.cpp:874
#9  0x41560116 in QPainter::setBrush(QBrush const&) (this=0xbfffe1f0, 
    brush=@0xbfffe1e0) at kernel/qpainter.cpp:1020
#10 0x415628a3 in QPainter::fillRect(int, int, int, int, QBrush const&) (
    this=0xbfffe1f0, x=0, y=0, w=-1, h=18, brush=@0xbfffe1e0)
    at kernel/qpainter.cpp:2127
#11 0x41f02781 in PlastikStyle::renderSurface(QPainter*, QRect const&, QColor const&, QColor const&, QColor const&, int, unsigned) const ()
   from /opt/kde-cvs/lib/kde3/plugins/styles/plastik.so
#12 0x41f03424 in PlastikStyle::renderHeader(QPainter*, QRect const&, QColorGroup const&, bool, bool, bool, bool) const ()
   from /opt/kde-cvs/lib/kde3/plugins/styles/plastik.so
#13 0x41f07d4d in PlastikStyle::drawPrimitive(QStyle::PrimitiveElement, QPainter*, QRect const&, QColorGroup const&, unsigned, QStyleOption const&) const ()
   from /opt/kde-cvs/lib/kde3/plugins/styles/plastik.so
#14 0x4161d14b in QHeader::paintSection(QPainter*, int, QRect const&) (
    this=0x85f1d88, p=0xbfffec70, index=0, fr=@0xbfffec30)
    at widgets/qheader.cpp:1480
#15 0x4178f3c5 in QTableHeader::paintSection(QPainter*, int, QRect const&) (
    this=0x85f1d88, p=0xbfffec70, index=0, fr=@0xbfffec30)
    at table/qtable.cpp:6626
#16 0x4178f1f7 in QTableHeader::paintEvent(QPaintEvent*) (this=0x85f1d88, 
    e=0xbfffeff0) at table/qtable.cpp:6601
#17 0x41593aea in QWidget::event(QEvent*) (this=0x85f1d88, e=0xbfffeff0)
    at kernel/qwidget.cpp:4759
#18 0x414f9371 in QApplication::internalNotify(QObject*, QEvent*) (
    this=0xbffff300, receiver=0x85f1d88, e=0xbfffeff0)
    at kernel/qapplication.cpp:2614
#19 0x414f8fa1 in QApplication::notify(QObject*, QEvent*) (this=0xbffff300, 
    receiver=0x85f1d88, e=0xbfffeff0) at kernel/qapplication.cpp:2502
#20 0x4106ee2d in KApplication::notify(QObject*, QEvent*) (this=0xbffff300, 
    receiver=0x85f1d88, event=0xbfffeff0) at kapplication.cpp:506
#21 0x403639c5 in QApplication::sendEvent(QObject*, QEvent*) (
    receiver=0x85f1d88, event=0xbfffeff0)
    at /usr/lib/qt3-kde/include/qapplication.h:491
#22 0x414c34d1 in QWidget::repaint(QRegion const&, bool) (this=0x85f1d88, 
    reg=@0x8421bf4, erase=true) at kernel/qwidget_x11.cpp:1608
#23 0x414fa263 in QApplication::sendPostedEvents(QObject*, int) (receiver=0x0, 
    event_type=0) at kernel/qapplication.cpp:3237
#24 0x414fa00f in QApplication::sendPostedEvents() ()
    at kernel/qapplication.cpp:3151
#25 0x414a095d in QEventLoop::processEvents(unsigned) (this=0x8184628, flags=4)
    at kernel/qeventloop_x11.cpp:144
#26 0x4150d5fa in QEventLoop::enterLoop() (this=0x8184628)
    at kernel/qeventloop.cpp:198
#27 0x4150d516 in QEventLoop::exec() (this=0x8184628)
    at kernel/qeventloop.cpp:145
#28 0x414f94f5 in QApplication::exec() (this=0xbffff300)
    at kernel/qapplication.cpp:2737
#29 0x08061da0 in main ()
#30 0x41ce84c2 in __libc_start_main () from /lib/i686/libc.so.6
Comment 1 Sandro Giessl 2004-02-11 14:56:51 UTC
CVS commit by giessl: 

renderSurface etc. should never try to paint null pixmaps.

CCMAIL: 74604-done@bugs.kde.org


  M +9 -0      plastik.cpp   1.48


--- kdeartwork/styles/plastik/plastik.cpp  #1.47:1.48
@@ -261,4 +261,7 @@ void PlastikStyle::renderContour(QPainte
                                 const uint flags) const
 {
+    if((r.width() <= 0)||(r.height() <= 0))
+        return;
+
     const bool drawLeft = flags&Draw_Left;
     const bool drawRight = flags&Draw_Right;
@@ -374,4 +377,7 @@ void PlastikStyle::renderMask(QPainter *
                               const uint flags) const
 {
+    if((r.width() <= 0)||(r.height() <= 0))
+        return;
+
     const bool roundUpperLeft = flags&Round_UpperLeft;
     const bool roundUpperRight = flags&Round_UpperRight;
@@ -405,4 +411,7 @@ void PlastikStyle::renderSurface(QPainte
                                  const uint flags) const
 {
+    if((rect.width() <= 0)||(rect.height() <= 0))
+        return;
+
     // generate a unique key for this surface.
     QString key = QString("s %1 %2 %3 %4 %5 %6 %7")


Comment 2 Sandro Giessl 2004-02-18 17:16:22 UTC
*** Bug 75421 has been marked as a duplicate of this bug. ***