[Kde-games-devel] Review Request: Attempt to fix null pointer issue in Game::map.
Michael Reeves
reeves.87 at gmail.com
Wed Aug 8 21:11:23 UTC 2012
> On Aug. 7, 2012, 9:42 p.m., Albert Astals Cid wrote:
> > Do you have a sequence of actions that show the need for this if protection? i.e. what do i have to do so that the game crashes without this patch? Or is it all purely theorical?
The call of GameView::gameOver inside GameView::startNewGame is reproducable.
1)setup a game with no human players the game must end without stopping to wait for input.
2)from the new game dialog quickly hit return, return, cntrl+N
You may have to do this few times to get the crash. The window of opportunity for this to happen is very small. It will most likely be GameView::gameOver that triggers the crash. I can provide a stack trace for this if needed as I can reliably reproduce GameView::gameOver inside GameView::startNewGame on unpatched code. GameView::startNewGame could theorically happpen as well thanks to these lines in localGame.cpp:
./localgame.cpp:34: qApp->processEvents(); // Really important : ignoring this will not apply the change soon enough
./localgame.cpp:43: qApp->processEvents(); // Really important : ignoring this will not apply the change soon enough
Oddly my stack trace now looks like the one in the bug but still only happens in unpatched code.
- Michael
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://svn.reviewboard.kde.org/r/7013/#review10914
-----------------------------------------------------------
On Aug. 6, 2012, 7:05 p.m., Michael Reeves wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://svn.reviewboard.kde.org/r/7013/
> -----------------------------------------------------------
>
> (Updated Aug. 6, 2012, 7:05 p.m.)
>
>
> Review request for KDE Games.
>
>
> Description
> -------
>
> Attempt to fix crash due to null Map pointer. Prevents calling GameView::startNewGame or GameView::gameOver before GameView is fully ready the cause of my variant.
>
>
> This addresses bug 296290.
> https://bugs.kde.org/show_bug.cgi?id=296290
>
>
> Diffs
> -----
>
> /branches/KDE/4.8/kdegames/konquest/gameview.h 1308596
> /branches/KDE/4.8/kdegames/konquest/gameview.cc 1308596
>
> Diff: http://svn.reviewboard.kde.org/r/7013/diff/
>
>
> Testing
> -------
>
> It fixes a related variant I was able to produce on my machine. I am unable to reproduce the bug as reported. Attempted to work around issue based on the stack traces alone.
>
>
> Thanks,
>
> Michael Reeves
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20120808/b6d01560/attachment.html>
More information about the kde-games-devel
mailing list