[Kde-games-devel] kpat issues (in recent svn)

Parker Coates parker.coates at gmail.com
Fri May 8 20:30:12 CEST 2009


On Fri, May 8, 2009 at 11:34 AM, Parker Coates wrote:
> On Thu, May 7, 2009 at 1:59 PM, Matthew Woehlke wrote:
>> Anyone else notice that Grandfather's Clock crashes kpat? This has been
>> going on for several days, and is happening with recent SVN (my last
>> update was Tuesday or later).
>
> Seems to work fine here. I've played a couple games by hand and the
> demo's played a half dozen with no anomalies What are you doing to
> cause the crash? Do you have a back trace?

Okay, I am able to reproduce at will. It occurs when launching a game
of Grandfather's Clock if the window size is such that the cards
aren't already in the cache at the correct size.

The crash occurs in ClockSolver::translate_layout() when called from
DealerScene::slotSolverEnded(). My guess is that there is a race
condition between the solver thread and the cards actually being added
to the piles on game start. I have a simple patch to
ClockSolver::translate_layout() that stops the crash and seems to work
fine, but I'm hesitant to commit, because it only treats the symptom
of what appears to be a larger issue.

The second question is why this issue only started up recently. My
best guess is that it's due to the new Ancient Egyptians deck. Due to
it's detail, it takes longer to render, and so a race condition that
was never an issue before is now being exposed. On my machine, I can't
recreate the issue with any other deck. On a faster machine, this
might not be an issue at all.

I'm going to look into it, but I don't have much experience with
threading. My guess is that the solver thread is being started before
the scene is actually ready.

Parker


More information about the kde-games-devel mailing list