[Kde-games-devel] KSudoku minimum size patch (and crash report)

Dmitry Suzdalev dimsuzkde at gmail.com
Thu Jan 17 22:29:57 CET 2008


Hi Johannes!

I started KSudoku *first time* and it appeared in a very tiny-sized window.
Not only KSudoku, but many of our kdegames suffer from this issue.
(for this reason I'll CC kde-games-devel).
To reproduce just do: rm ~/.kde4/share/config/ksudokurc && ksudoku

The fix is simple:
We need to set some reasonable minimum size to our mainwindows (or central 
widgets they contain).

Simple call

setMinimumSize( reasonable_width, reasonable_height);

will fix it.

See patch for KSudoku attached.
(if you approve it, I can commit and backport to 4.0 branch)
I guess we'll need to determine which games need these fixes and fix them :)

Now to the second part - the crash =)
It happens  (100% reproducible) when I start some sudoku game and try to 
resize the window. I.e. grab the window corner and drag it around - shrink 
window to its minimum, then enlarge to its maximum, and so on. After you drag 
for some time it'll crash with SIGFPE.
Backtrace attached.

Hope this helps,
Dmitry.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksudoku-minimum-size.diff
Type: text/x-patch
Size: 401 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-games-devel/attachments/20080118/b548f10f/attachment.bin 
-------------- next part --------------
Using host libthread_db library "/lib/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 0xb633a6c0 (LWP 4698)]
[KCrash handler]
#6  0x0807a27d in ksudoku::QSudokuButton::updateData (this=0x8bd84a0)
    at /home/ezhik/kdesvn/kdegames/ksudoku/src/gui/views/qsudokubutton.cpp:377
#7  0x0807b556 in ksudoku::QSudokuButton::resize (this=0x8bd84a0)
    at /home/ezhik/kdesvn/kdegames/ksudoku/src/gui/views/qsudokubutton.cpp:163
#8  0x08077592 in ksudoku::SudokuView::resizeEvent (this=0x8c209b8)
    at /home/ezhik/kdesvn/kdegames/ksudoku/src/gui/views/sudokuview.cpp:334
#9  0xb6a2c07d in QWidget::event (this=0x8c209b8, event=0xbf8fa84c)
    at kernel/qwidget.cpp:6487
#10 0xb69e81dd in QApplicationPrivate::notify_helper (this=0x8aaf110, 
    receiver=0x8c209b8, e=0xbf8fa84c) at kernel/qapplication.cpp:3556
#11 0xb69ee318 in QApplication::notify (this=0xbf8fbcf0, receiver=0x8c209b8, 
    e=0xbf8fa84c) at kernel/qapplication.cpp:3497
#12 0xb78d56f1 in KApplication::notify (this=0xbf8fbcf0, receiver=0x8c209b8, 
    event=0xbf8fa84c)
    at /home/ezhik/kdesvn/kdelibs/kdeui/kernel/kapplication.cpp:314
#13 0xb7d2a6db in QCoreApplication::notifyInternal (this=0xbf8fbcf0, 
    receiver=0x8c209b8, event=0xbf8fa84c) at kernel/qcoreapplication.cpp:530
#14 0xb6a55f3e in QWidgetPrivate::setGeometry_sys (this=0x8bdcef0, x=68, y=4, 
    w=146, h=123, isMove=true)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:200
#15 0xb6a2813f in QWidget::setGeometry (this=0x8c209b8, r=@0xbf8fa988)
    at kernel/qwidget.cpp:4970
#16 0xb6a0d8ae in QWidgetItem::setGeometry (this=0x8c26f20, rect=@0xbf8faaa8)
    at ../../include/QtGui/../../src/gui/kernel/qwidget.h:935
#17 0xb69f2e7c in QBoxLayout::setGeometry (this=0x8c49288, r=@0xbf8fab3c)
    at kernel/qboxlayout.cpp:853
#18 0xb6a0a97e in QLayoutPrivate::doResize (this=0x8c48cd8, r=@0xbf8faf48)
    at kernel/qlayout.cpp:595
#19 0xb6a0aece in QLayout::widgetEvent (this=0x8c49288, e=0x0)
    at kernel/qlayout.cpp:619
#20 0xb69e8125 in QApplicationPrivate::notify_helper (this=0x8aaf110, 
    receiver=0x8bff8e0, e=0xbf8faf3c) at kernel/qapplication.cpp:3536
#21 0xb69ee318 in QApplication::notify (this=0xbf8fbcf0, receiver=0x8bff8e0, 
    e=0xbf8faf3c) at kernel/qapplication.cpp:3497
#22 0xb78d56f1 in KApplication::notify (this=0xbf8fbcf0, receiver=0x8bff8e0, 
    event=0xbf8faf3c)
    at /home/ezhik/kdesvn/kdelibs/kdeui/kernel/kapplication.cpp:314
#23 0xb7d2a6db in QCoreApplication::notifyInternal (this=0xbf8fbcf0, 
    receiver=0x8bff8e0, event=0xbf8faf3c) at kernel/qcoreapplication.cpp:530
#24 0xb6a55f3e in QWidgetPrivate::setGeometry_sys (this=0x8c4b4a0, x=0, y=69, 
    w=218, h=131, isMove=true)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:200
#25 0xb6a2813f in QWidget::setGeometry (this=0x8bff8e0, r=@0xbf8fb09c)
    at kernel/qwidget.cpp:4970
#26 0xb6d6faaf in QWidgetAnimator::animate (this=0x8b7c3a8, widget=0x8bff8e0, 
    _final_geometry=@0x8b7bed4, animate=false)
    at widgets/qwidgetanimator.cpp:134
#27 0xb6cd0c7a in QDockAreaLayout::apply (this=0x8b7beac, animate=false)
    at widgets/qdockarealayout.cpp:2768
#28 0xb6cf79a2 in QMainWindowLayoutState::apply (this=0x8b7be10, 
    animated=false) at widgets/qmainwindowlayout.cpp:201
#29 0xb6cf8fc0 in QMainWindowLayout::applyState (this=0x8b7be00, 
    newState=@0x8b7be10, animate=false) at widgets/qmainwindowlayout.cpp:1924
#30 0xb6cf9231 in QMainWindowLayout::setGeometry (this=0x8b7be00, 
    _r=@0xbf8fb20c) at widgets/qmainwindowlayout.cpp:1475
#31 0xb6a0a97e in QLayoutPrivate::doResize (this=0x8b82878, r=@0xbf8fb714)
    at kernel/qlayout.cpp:595
#32 0xb6a0aece in QLayout::widgetEvent (this=0x8b7be00, e=0x0)
    at kernel/qlayout.cpp:619
#33 0xb69e8125 in QApplicationPrivate::notify_helper (this=0x8aaf110, 
    receiver=0x8b83928, e=0xbf8fb708) at kernel/qapplication.cpp:3536
#34 0xb69ee318 in QApplication::notify (this=0xbf8fbcf0, receiver=0x8b83928, 
    e=0xbf8fb708) at kernel/qapplication.cpp:3497
#35 0xb78d56f1 in KApplication::notify (this=0xbf8fbcf0, receiver=0x8b83928, 
    event=0xbf8fb708)
    at /home/ezhik/kdesvn/kdelibs/kdeui/kernel/kapplication.cpp:314
#36 0xb7d2a6db in QCoreApplication::notifyInternal (this=0xbf8fbcf0, 
    receiver=0x8b83928, event=0xbf8fb708) at kernel/qcoreapplication.cpp:530
#37 0xb6a34b93 in QETWidget::translateConfigEvent (this=0x8b83928, 
    event=0xbf8fba7c)
    at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:203
#38 0xb6a3c1ae in QApplication::x11ProcessEvent (this=0xbf8fbcf0, 
    event=0xbf8fba7c) at kernel/qapplication_x11.cpp:2940
#39 0xb6a5e3f4 in x11EventSourceDispatch (s=0x8ab28f0, callback=0, 
    user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:135
#40 0xb651d1c6 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#41 0xb6520552 in ?? () from /usr/lib/libglib-2.0.so.0
#42 0x08ab0e40 in ?? ()
#43 0x00000000 in ?? ()
#0  0xffffe410 in __kernel_vsyscall ()


More information about the kde-games-devel mailing list