[Kde-games-devel] Port of KMahjongg

Albert Astals Cid aacid at kde.org
Tue Aug 14 17:05:29 UTC 2012


El Dimarts, 14 d'agost de 2012, a les 08:46:48, Christian Krippendorf va 
escriure:
> Am Montag, 13. August 2012, 23:32:30 schrieb Albert Astals Cid:
> > El Dissabte, 11 d'agost de 2012, a les 07:52:43, Christian Krippendorf va
> > 
> > escriure:
> > > Am Mittwoch, 1. August 2012, 20:09:46 schrieb Albert Astals Cid:
> > > > El Diumenge, 22 de juliol de 2012, a les 21:47:14, Christian
> > > > Krippendorf
> > > > va
> > > > 
> > > > escriure:
> > > > > Hey guys,
> > > > 
> > > > Let me be the evil guy, what's the benefit of this port?
> > > 
> > > Not using some deprecated stuff enymore like KGameCanvas?
> > > BTW: There is nothing evil to tell me what is bad, how to learn
> > > otherwise.
> > > 
> > > :-)
> > 
> > Ok
> > 
> > > > > the port of kmahjongg is now done in many ways. Just few bugs are
> > > > > out
> > > > > there, but that should be solved quickly for me. My question now
> > > > > following:
> > > > > 
> > > > > Can please anyone review my code out of the design? This is my first
> > > > > port to QGraphics-Framework and i'm really not sure if i had done
> > > > > all
> > > > > design things right. Maybe some functionallity should be in another
> > > > > class etc. etc. Just code design things.
> > > > > 
> > > > > The branch is branches/work/krippendorf the mainly affected files
> > > > > are:
> > > > > 
> > > > > GameItem.h/cpp - QGraphicsItem
> > > > > GameView.h/cpp - QGraphicsView
> > > > > GameScene.h/cpp - QGraphicsScene
> > > > 
> > > > public QObject, public QGraphicsItem
> > > > 
> > > >   you probably want just
> > > > 
> > > > public QGraphicsObject
> > > > 
> > > > The main design problem i see is the typical one in which you make
> > > > your
> > > > Item also be your Model, i.e. you are storing the gridpos in GameItem
> > > > that is both your "logical" model and your "phisical" representation
> > > > (the
> > > > QGraphicsItem), usually it is better to have this separated, so you
> > > > can
> > > > throw away QGraphicsItem and put there MegaCoolStuff without having to
> > > > change your model. Not sure if i'm making sense here.
> > > 
> > > Yearh sounds right. I will have a look of seperating the data and the
> > > view
> > > more. Thanks!
> > 
> > Good luck, my side (suggesting) is certainly easier than yours (doing the
> > actual separation)
> > 
> > > > > Cause before i finished, i would have a short feedback. Surely cause
> > > > > of
> > > > > code style and some bugs i will start a code review on the review
> > > > > board
> > > > > later. This should just be a short and simple code design question.
> > > > > 
> > > > > I hope i filled up the right classes with the right functionality
> > > > > :-).
> > > > 
> > > > I know you asked for "code design" stuff, but after installing
> > > > kmhajongg
> > > > from your branch all i get is an empty gray box that crashes when i
> > > > press
> > > > the "new" toolbar button.
> > > 
> > > [christian at christian-desktop krippendorf]$ svn info
> > > Pfad: .
> > > Working Copy Root Path: /home/christian/Develop/KDE/krippendorf
> > > URL: svn+ssh://svn.kde.org/home/kde/branches/work/krippendorf
> > > Basis des Projektarchivs: svn+ssh://svn.kde.org/home/kde
> > > Revision: 1310174
> > > Letzte geänderte Rev: 1306531
> > > Letztes Änderungsdatum: 2012-07-19 15:16:41 +0200 (Do, 19. Jul 2012)
> > > 
> > > KDE Version 4.8.3 - ArchLinux
> > > 
> > > I do a clean build and all works fine without any crashes. Maybe u find
> > > the
> > > time to give me more informations about that.
> > 
> > Which information do you want?
> 
> Which KDE Version you are using? 

With this particular build, 4.8.4.

> Which distribution? 

Ubuntu

> Your svn repo information of the build one? 

The same you have

Path: .
URL: svn+ssh://aacid@svn.kde.org/home/kde/branches/work/krippendorf
Repository Root: svn+ssh://aacid@svn.kde.org/home/kde
Repository UUID: 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Revision: 1310650
Node Kind: directory
Schedule: normal
Last Changed Author: krippendorf
Last Changed Rev: 1306531
Last Changed Date: 2012-07-19 15:16:41 +0200 (dj, 19 jul 2012)


> Backtrace of the crash?

Attached, as well as the command output and the strace output.

Cheers,
  Albert

> 
> Thanks for that.
> 
> > > Sorry for answering takes so much time.
> > 
> > No worries, we are all busy :-)
> > 
> > Cheers,
> > 
> >   Albert
> >   
> > > > Cheers,
> > > > 
> > > >   Albert
> > > >   
> > > > > Thx in advance. Greedings.
> > > > 
> > > > _______________________________________________
> > > > kde-games-devel mailing list
> > > > kde-games-devel at kde.org
> > > > https://mail.kde.org/mailman/listinfo/kde-games-devel
> > 
> > _______________________________________________
> > kde-games-devel mailing list
> > kde-games-devel at kde.org
> > https://mail.kde.org/mailman/listinfo/kde-games-devel
-------------- next part --------------
Application: KMahjongg (kmahjongg), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[KCrash Handler]
#6  0x000000000042d000 in GameView::setStatusText (this=0x0, rText=...) at /home/kdeunstable/krippendorf/kmahjongg/GameView.cpp:856
#7  0x000000000042af61 in GameView::createNewGame (this=0x0, lGameNumber=-1) at /home/kdeunstable/krippendorf/kmahjongg/GameView.cpp:169
#8  0x00000000004156d9 in KMahjongg::startNewGame (this=0x1712af0, item=-1) at /home/kdeunstable/krippendorf/kmahjongg/kmahjongg.cpp:353
#9  0x000000000041569f in KMahjongg::newGame (this=0x1712af0) at /home/kdeunstable/krippendorf/kmahjongg/kmahjongg.cpp:347
#10 0x0000000000416d1d in KMahjongg::qt_static_metacall (_o=0x1712af0, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7fffe2efac20) at /home/kdeunstable/krippendorf/build/kmahjongg/kmahjongg.moc:87
#11 0x00007fe91bcef281 in QMetaObject::activate (sender=0x17641f0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fffe2efac20) at kernel/qobject.cpp:3547
#12 0x00007fe91b057132 in QAction::triggered (this=<optimized out>, _t1=false) at .moc/release-shared/moc_qaction.cpp:277
#13 0x00007fe91b05731f in QAction::activate (this=0x17641f0, event=<optimized out>) at kernel/qaction.cpp:1257
#14 0x00007fe91b42cd4a in QAbstractButtonPrivate::click (this=0x1781d40) at widgets/qabstractbutton.cpp:530
#15 0x00007fe91b42cffc in QAbstractButton::mouseReleaseEvent (this=0x1818250, e=0x7fffe2efb500) at widgets/qabstractbutton.cpp:1123
#16 0x00007fe91b4ea5da in QToolButton::mouseReleaseEvent (this=<optimized out>, e=<optimized out>) at widgets/qtoolbutton.cpp:718
#17 0x00007fe91b0ae144 in QWidget::event (this=0x1818250, event=0x7fffe2efb500) at kernel/qwidget.cpp:8362
#18 0x00007fe91b05d894 in notify_helper (e=0x7fffe2efb500, receiver=0x1818250, this=0x156a8c0) at kernel/qapplication.cpp:4559
#19 QApplicationPrivate::notify_helper (this=0x156a8c0, receiver=0x1818250, e=0x7fffe2efb500) at kernel/qapplication.cpp:4531
#20 0x00007fe91b0630bf in QApplication::notify (this=<optimized out>, receiver=0x1818250, e=0x7fffe2efb500) at kernel/qapplication.cpp:4102
#21 0x00007fe91c7419e6 in KApplication::notify (this=0x7fffe2efc1f0, receiver=0x1818250, event=0x7fffe2efb500) at ../../kdeui/kernel/kapplication.cpp:311
#22 0x00007fe91bcdae9c in QCoreApplication::notifyInternal (this=0x7fffe2efc1f0, receiver=0x1818250, event=0x7fffe2efb500) at kernel/qcoreapplication.cpp:876
#23 0x00007fe91b05e862 in sendEvent (event=<optimized out>, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#24 QApplicationPrivate::sendMouseEvent (receiver=0x1818250, event=0x7fffe2efb500, alienWidget=0x1818250, nativeWidget=0x1795b10, buttonDown=0x1818250, lastMouseReceiver=..., spontaneous=true) at kernel/qapplication.cpp:3170
#25 0x00007fe91b0ddbf5 in QETWidget::translateMouseEvent (this=0x1795b10, event=<optimized out>) at kernel/qapplication_x11.cpp:4617
#26 0x00007fe91b0dcbae in QApplication::x11ProcessEvent (this=0x7fffe2efc1f0, event=0x7fffe2efbdd0) at kernel/qapplication_x11.cpp:3732
#27 0x00007fe91b1060d2 in x11EventSourceDispatch (s=0x156c200, callback=0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#28 0x00007fe916307d53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#29 0x00007fe9163080a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#30 0x00007fe916308164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007fe91bd0a3bf in QEventDispatcherGlib::processEvents (this=0x153bbe0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#32 0x00007fe91b105d5e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#33 0x00007fe91bcd9c82 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#34 0x00007fe91bcd9ed7 in QEventLoop::exec (this=0x7fffe2efc170, flags=...) at kernel/qeventloop.cpp:204
#35 0x00007fe91bcdef67 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1148
#36 0x0000000000412e7b in main (argc=1, argv=0x7fffe2efc648) at /home/kdeunstable/krippendorf/kmahjongg/main.cpp:64
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OUTPUT.zip
Type: application/zip
Size: 16518 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20120814/6a2e64fc/attachment-0002.zip>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: STRACE.zip
Type: application/zip
Size: 50922 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20120814/6a2e64fc/attachment-0003.zip>


More information about the kde-games-devel mailing list