Palapeli - MergeGroup and Teleport
Christian Ehrlicher
Ch.Ehrlicher at gmx.de
Sun Sep 10 10:08:20 UTC 2017
Hi,
Palapeli crashes when a piece which gets merged is teleported to another
scene. To trigger this in a reproducible way, increase the animation
time in MergeGroup::start() to e.g. 2000ms to have time to start the
teleport.
Then create a new view and make sure to mark it as destination of the
teleport. After this start a merge and while the merge is ongoing,
teleport this piece to the other view.
You'll get a crash either in GamePlay::updateSavedGame(),
GamePlay::transferPieces(), SelectPieceInteractor::stopInteraction(),
... everywhere when accessing the piece in the destination view.
I've three possible solutions:
- avoid a teleport during a ongoing merge
- make sure to get informed when a Piece is destroyed (Piece is derived
from QObject so it should be easy)
- use QPointer<> instead raw pointers and check for != nullptr before
accessing the piece in everywhere
The first one would avoid the crash but I think the other two would also
help to prevent the crashes in the bugtracker.
What do you think?
Christian
More information about the kde-games-devel
mailing list