[Kde-games-devel] Bugs (showstoppers?) in KGoldrunner

Ian Wadham ianw2 at optusnet.com.au
Thu Nov 29 22:04:56 CET 2007


Re your backtrace: I think KGrGame::newGame (-1, -1) is getting
invoked prematurely in your environment, i.e. after the first resize event
but before the second resize event.  After that it would be all downhill.
See items #13 to #11 and #7 to #5 below (reading backwards).

Please could you put a kDebug() trace in KGrGame::newGame to
confirm this idea.  You should always get that trace, on stderr, whether
or not you have set the source to ignore the first resize event.

Cheers, Ian W.

Appendix:
kgoldrunner.cpp does a queued metaCall to KGrGame::newGame,
just before it exits.  The idea is to let the main window finish its own
deferred events, then load the last level played (or Tutorial, level 1),
behind the quick start dialog.  Because you cannot pass parameters,
newGame gets default parameters (-1, -1) for game and level.  It
then uses the config values which were retrieved during KGrGame
construction.

In your case, the saved game and level were "sot" level 0.  That is
the "ENDE" screen (Game Over), which is handled as a special case
by loadLevel().  I tested that case on my setup, using the same theme
as you (Geek City), and it worked fine.

KGrGame::setBlankLevel() is, I agree, a rather suspect, palaeolithic
piece of code.  One might almost say pre-Cambrian.  It goes back
to v0.1 days.  "for (int j=0;j<20;j++)" ... Ugh!  I used to kick bums for
writing absolute numerics in code.  That was in 1968 ...  Now you can
see why I want to re-write the game engine.  Nevertheless, I do not
think setBlankLevel() is the culprit here, unless you are somehow
getting into Edit mode prematurely ... that would do a view->paintCell() ...

On Fri, 30 Nov 2007 12:08 am, Luciano Montanaro wrote:
<snip>
> [KCrash handler]
> #5  0x0000000000412a08 in QListData::size (this=0x0) at
> at /home/mikelima/qt-copy/include/QtCore/../../src/corelib/tools/qlist.h:82
>
> #6  0x0000000000412f40 in QList<QPixmap>::at (this=0x0, i=0) at
> /home/mikelima/qt-copy/include/QtCore/../../src/corelib/tools/qlist.h:386
>
> #7  0x000000000041256e in KGrPlayField::setTile (this=0x7ea3a0, x=0, y=0,
> tilenum=0) at
> /home/mikelima/kde/src/KDE/kdegames-git/kgoldrunner/src/kgrplayfield.cpp:44
>
<snip>
> #11 0x00000000004327ce in KGrGame::loadLevel (this=0x9371b0, levelNo=0) at
> /home/mikelima/kde/src/KDE/kdegames-git/kgoldrunner/src/kgrgame.cpp:568
>
> #12 0x0000000000432f8c in KGrGame::newGame (this=0x9371b0, lev=-1,
> gameIndex=-1) at
> /home/mikelima/kde/src/KDE/kdegames-git/kgoldrunner/src/kgrgame.cpp:494
>
> #13 0x0000000000434ef5 in KGrGame::qt_metacall (this=0x9371b0,
>     _c=QMetaObject::InvokeMetaMethod, _id=16, _a=0xb23f30) at
> /home/mikelima/kde/build/KDE/kdegames-git/kgoldrunner/src/kgrgame.moc:162





> #14 0x00002b2f97e133a1 in QMetaCallEvent::placeMetaCall (this=0x876e00,
> object=0x9371b0) at kernel/qobject.cpp:538
> #15 0x00002b2f97e1827f in QObject::event (this=0x9371b0, e=0x876e00)
>     at kernel/qobject.cpp:1130
> #16 0x00002b2f99a82251 in QApplicationPrivate::notify_helper
> (this=0x679260, receiver=0x9371b0, e=0x876e00) at
> kernel/qapplication.cpp:3558 #17 0x00002b2f99a82570 in QApplication::notify
> (this=0x7fff13226090, receiver=0x9371b0, e=0x876e00) at
> kernel/qapplication.cpp:3117 #18 0x00002b2f9ae7e83c in KApplication::notify
> (this=0x7fff13226090, receiver=0x9371b0, event=0x876e00)
>     at /home/mikelima/kde/src/KDE/kdelibs/kdeui/kernel/kapplication.cpp:319
> #19 0x00002b2f97e06696 in QCoreApplication::notifyInternal (
>     this=0x7fff13226090, receiver=0x9371b0, event=0x876e00)
>     at kernel/qcoreapplication.cpp:532
> #20 0x00002b2f97e098bd in QCoreApplication::sendEvent (receiver=0x9371b0,
>     event=0x876e00)
>     at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:202
> #21 0x00002b2f97e06be4 in QCoreApplicationPrivate::sendPostedEvents (
>     receiver=0x0, event_type=0, data=0x65d970)
>     at kernel/qcoreapplication.cpp:1115
> #22 0x00002b2f97e06d40 in QCoreApplication::sendPostedEvents (receiver=0x0,
>     event_type=-1) at kernel/qcoreapplication.cpp:1003
> #23 0x00002b2f97e2e7e1 in postEventSourceDispatch (s=0x680810)
>     at kernel/qeventdispatcher_glib.cpp:209
> #24 0x00002b2f9f463e54 in g_main_context_dispatch ()
>    from /usr/lib/libglib-2.0.so.0
> #25 0x00002b2f9f46714d in ?? () from /usr/lib/libglib-2.0.so.0
> #26 0x00002b2f9f46761e in g_main_context_iteration ()
>    from /usr/lib/libglib-2.0.so.0
> #27 0x00002b2f97e2dd9e in QEventDispatcherGlib::processEvents
> (this=0x6791b0, flags=@0x7fff13225ef0) at
> kernel/qeventdispatcher_glib.cpp:340 #28 0x00002b2f99b11ebb in
> QGuiEventDispatcherGlib::processEvents ( this=0x6791b0,
> flags=@0x7fff13225f40)
>     at kernel/qguieventdispatcher_glib.cpp:193
> #29 0x00002b2f97e03981 in QEventLoop::processEvents (this=0x7fff13225ff0,
>     flags=@0x7fff13225fb0) at kernel/qeventloop.cpp:142
> #30 0x00002b2f97e03ad6 in QEventLoop::exec (this=0x7fff13225ff0,
>     flags=@0x7fff13226010) at kernel/qeventloop.cpp:184
> #31 0x00002b2f97e06e4c in QCoreApplication::exec ()
>     at kernel/qcoreapplication.cpp:761
> #32 0x00002b2f99a81e28 in QApplication::exec () at
> kernel/qapplication.cpp:3055
> #33 0x000000000043b7af in main (argc=1, argv=0x7fff132264a8)
>     at /home/mikelima/kde/src/KDE/kdegames-git/kgoldrunner/src/main.cpp:80
> #0  0x00002b2f9e0772b0 in nanosleep () from /lib/libc.so.6
>
>
> _______________________________________________
> kde-games-devel mailing list
> kde-games-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-games-devel


More information about the kde-games-devel mailing list