Adding new game to KPat – trying to figure out crashing bug
Shlomi Fish
shlomif at shlomifish.org
Sat Oct 13 10:14:37 BST 2018
Hi Mr. Hufthammer,
On Fri, 12 Oct 2018 19:35:38 +0200
Karl Ove Hufthammer <karl at huftis.org> wrote:
> Hi, KDE game developers,
>
> I’m trying to add a new solitaire variant to KPat, based on the old
> Windows game Midnight Sunitaire. I don’t know if it has a chance to ever
> be accepted in the *official* release (for one, it doesn’t have a
> solver), but I find it fun to play.
>
> I have gotten it to a state where it seems to work fine, except for one,
> quite severe, bug. If I press the ‘Demo’ button, KPat tries to solve the
> game. But when it runs out of legal moves to make, KPat just crashes.
>
> My initial guess for reason for the crash was that I hadn’t implemented
> a solver. KPat then seems to just pick random(?) valid moves. But I have
> tried *removing* the solver for other games, and KPat does *not* crash
> for these games when it runs out of valid moves; the demo just stops.
>
> I have examined my code, but haven’t be able to figure out the reason
> for the crash. I can’t see any significant difference between the
> implementation of my new solitaire variant and the other solitaire
> variants in KPat. Are there any developers here willing to take a look?
> I can upload the source code (e.g. to Phabricator).
>
I can try taking a look. Note that you can also push a branch to a
forked repository on github, gitlab, bitbucket.org, SourceForge, etc.
Have you tried seeing
https://community.kde.org/Guidelines_and_HOWTOs/Debugging ?
-- Shlomi
>
> Regards,
> Karl Ove Hufthammer
>
--
-----------------------------------------------------------------
Shlomi Fish http://www.shlomifish.org/
My Favourite FOSS - http://www.shlomifish.org/open-source/favourite/
Fortran - there isn’t a way to do it... oh wait! Now there is.
— http://www.shlomifish.org/humour/ways_to_do_it.html
Please reply to list if it's a mailing list post - http://shlom.in/reply .
More information about the kde-games-devel
mailing list