Bug 243492

Summary: Palapeli 1.1 crashes with Qt 4.7 beta1
Product: [Applications] palapeli Reporter: Honza Bartoš <thingwath>
Component: generalAssignee: Stefan Majewsky <majewsky>
Status: RESOLVED FIXED    
Severity: crash CC: annma, kde-games-bugs, lindsay.mathieson
Priority: NOR    
Version: 1.1   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Honza Bartoš 2010-07-03 14:06:31 UTC
Version:           1.1 (KDE SC 4.5) (using Devel) 
OS:                Linux

Palapeli from kde-redhat unstable repository (containing rc1 of KDE 4.5) crashes with Qt 4.7.0 beta1 when I try to open any puzzle. Either by creating a new one, or trying some older one.

Reproducible: Always

Steps to Reproduce:
Run palapeli, open any puzzle.

Actual Results:  
With qt 4.7.0 beta1, Palapeli will segfault, with qt 4.6, everything is OK and I can play the game.


Backtrace from gdb is 68,000 frames long and it's mostly in Qt code, with some moc-generated code from palapeli. It has been suggested that this is a Qt problem. See this original thread: http://lists.fedoraproject.org/pipermail/kde/2010-July/007497.html
Comment 1 Anne-Marie Mahfouf 2010-07-03 14:49:01 UTC
Reproduced with 4.5 branch and qt 4.7

It loops and segfaults, here is the beginning of the backtrace:

(gdb) bt
#0  0xb67551a6 in QCommonStyle::sizeFromContents (this=0x9eceef8, 
    ct=QStyle::CT_ScrollBar, opt=0xbf4e23d8, csz=@0xbf4e2440, widget=0xa007cc0)
    at styles/qcommonstyle.cpp:4732
#1  0xb72e09e3 in KStyle::sizeFromContents (this=0x9eceef8, type=QStyle::CT_ScrollBar, 
    option=0xbf4e23d8, contentsSize=@0xbf4e2440, widget=0xa007cc0)
    at /usr/local/4.5-src/kdelibs/kdeui/kernel/kstyle.cpp:4235
#2  0xb4c3052e in Oxygen::Style::sizeFromContents (this=0x9eceef8, 
    type=QStyle::CT_ScrollBar, option=0xbf4e23d8, contentsSize=@0xbf4e2440, 
    widget=0xa007cc0)
    at /usr/local/4.5-src/kdebase/workspace/kstyles/oxygen/oxygenstyle.cpp:6801
#3  0xb690cbdd in QScrollBar::sizeHint (this=0xa007cc0) at widgets/qscrollbar.cpp:503
#4  0xb694edaf in QAbstractScrollArea::maximumViewportSize (this=0xa02d648)
    at widgets/qabstractscrollarea.cpp:586
#5  0xb6b472bd in QGraphicsViewPrivate::recalculateContentSize (this=0xa062850)
    at graphicsview/qgraphicsview.cpp:370
#6  0xb6b4fd91 in QGraphicsView::updateSceneRect (this=0xa02d648, rect=@0xa03c72c)
    at graphicsview/qgraphicsview.cpp:2646
#7  0xb6b54d4f in QGraphicsView::qt_metacall (this=0xa02d648, 
    _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbf4e2838)
    at .moc/debug-shared/moc_qgraphicsview.cpp:161
#8  0x0809083b in Palapeli::View::qt_metacall (this=0xa02d648, 
    _c=QMetaObject::InvokeMetaMethod, _id=35, _a=0xbf4e2838)
    at /home/annma/kde/build/kdegames/palapeli/src/view.moc:87
#9  0xb5d2a582 in QMetaObject::metacall (object=0xa02d648, 
    cl=QMetaObject::InvokeMetaMethod, idx=35, argv=0xbf4e2838)
    at kernel/qmetaobject.cpp:237
#10 0xb5d3f419 in QMetaObject::activate (sender=0xa024ba0, m=0x80c8a68, 
    local_signal_index=1, argv=0xbf4e2838) at kernel/qobject.cpp:3272
#11 0xb6b2eae2 in QGraphicsScene::sceneRectChanged (this=0xa024ba0, _t1=@0xa03c72c)
    at .moc/debug-shared/moc_qgraphicsscene.cpp:193
#12 0xb6b1c896 in QGraphicsScene::sceneRect (this=0xa024ba0)
    at graphicsview/qgraphicsscene.cpp:1665
#13 0xb6b4c48c in QGraphicsView::sceneRect (this=0xa02d648)
    at graphicsview/qgraphicsview.cpp:1693
#14 0xb6b472ee in QGraphicsViewPrivate::recalculateContentSize (this=0xa062850)
    at graphicsview/qgraphicsview.cpp:373
#15 0xb6b4fd91 in QGraphicsView::updateSceneRect (this=0xa02d648, rect=@0xa03c72c)
    at graphicsview/qgraphicsview.cpp:2646
#16 0xb6b54d4f in QGraphicsView::qt_metacall (this=0xa02d648, 
    _c=QMetaObject::InvokeMetaMethod, _id=4, _a=0xbf4e2c38)
    at .moc/debug-shared/moc_qgraphicsview.cpp:161
#17 0x0809083b in Palapeli::View::qt_metacall (this=0xa02d648, 
    _c=QMetaObject::InvokeMetaMethod, _id=35, _a=0xbf4e2c38)
    at /home/annma/kde/build/kdegames/palapeli/src/view.moc:87
#18 0xb5d2a582 in QMetaObject::metacall (object=0xa02d648, 
    cl=QMetaObject::InvokeMetaMethod, idx=35, argv=0xbf4e2c38)
    at kernel/qmetaobject.cpp:237
#19 0xb5d3f419 in QMetaObject::activate (sender=0xa024ba0, m=0x80c8a68, 
    local_signal_index=1, argv=0xbf4e2c38) at kernel/qobject.cpp:3272
#20 0xb6b2eae2 in QGraphicsScene::sceneRectChanged (this=0xa024ba0, _t1=@0xa03c72c)
    at .moc/debug-shared/moc_qgraphicsscene.cpp:193
#21 0xb6b1c896 in QGraphicsScene::sceneRect (this=0xa024ba0)
    at graphicsview/qgraphicsscene.cpp:1665
#22 0xb6b4c48c in QGraphicsView::sceneRect (this=0xa02d648)
    at graphicsview/qgraphicsview.cpp:1693
#23 0xb6b472ee in QGraphicsViewPrivate::recalculateContentSize (this=0xa062850)
    at graphicsview/qgraphicsview.cpp:373
Comment 2 Anne-Marie Mahfouf 2010-07-03 14:54:46 UTC
Looking at the bactrace I noticed the crash is in Oxygen and indeed if I change the widget style to Motif (in SystemSettings, kcm_style) for example, there is no crash anymore.
Comment 3 Honza Bartoš 2010-07-03 15:25:18 UTC
I can open an existing puzzle with Motif style, but then I had a similar (most likely the same) crash when I tried to create a new puzzle. Also, it crashed in the same way with Plastique, Windows, GTK Style, it seemed to work in CDE, somehow. Anyway, it doesn't seem to be limited just to Oxygen style.
Comment 4 Stefan Majewsky 2010-07-05 23:18:59 UTC
I've compiled Qt 4.7-git here, and was able to reproduce the issue. I have first evidence that this is a Qt regression, and therefore upstream'd the bug again:

http://bugreports.qt.nokia.com/browse/QTBUG-11952
Comment 5 Stefan Majewsky 2010-07-14 15:55:11 UTC
SVN commit 1149883 by majewsky:

Fix the funny Qt 4.7 crash by breaking the occurring infinite loop with a queued signal delivery.

BUG: 243492

 M  +6 -1      constraintvisualizer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1149883
Comment 6 Stefan Majewsky 2010-07-14 15:58:57 UTC
SVN commit 1149885 by majewsky:

Backport r1149883.

CCBUG: 243492


 M  +6 -1      constraintvisualizer.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1149885
Comment 7 Stefan Majewsky 2010-07-16 16:59:04 UTC
*** Bug 244712 has been marked as a duplicate of this bug. ***