[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-gnubg] "Cannot move, cannot move", reloaded

From: Jon Kinsey
Subject: Re: [Bug-gnubg] "Cannot move, cannot move", reloaded
Date: Wed, 02 Feb 2005 19:40:31 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041206 Thunderbird/1.0 Mnenhy/0.7

Petr Kadlec wrote:

I have once again experienced the "cannot move, cannot move" bug, so I
decided to look at it again. I tried the method I mentioned a few months
ago, and it still works and deterministically crashes gnubg.

I looked at the stack trace (you can take a look at the attachment if
the maillist passes it through, but it is not really interesting) and
the important thing is that there are many (I clicked dices many times)
identical layers of gnubg interleaved with libgtk. After checking the
source, IMHO the problem is that during the addition of the move to the
gamelist, PopMoveRecord is called, which in turn calls GTKSetMoveRecord,
which contains a message dispatch loop with gtk_main_iteration(). And,
obviously, during this call another dice click is detected... and here
we go again. Finally, this seems to end in a crash as PopGame tries to
delete the move list.

Unfortunately (as I have said before) I never worked with GTK, so I am
unable to dive into the problem too much. AFAICS, the basic idea of
calling gtk_main_iteration() deep inside the game logic code seems
not-really-right to me, but I understand that there is some logic with
enabling and disabling input, so that it is probably expected to work,
but ... well, it does not for me.

I finally got it to go wrong!  I'm just about to check in the fix.

You were right on lots of things, it was the gtk loop in setmoverecord.
 This is a great example of gtk 1.3 being rubbish, I had to add the
loop to make sure the list was updated correctly.  So now occasionally
the current move may not scroll in to view.  The way this is called
hints at deeper problems with the structure of the code.

Hopefully we will move on to 2.6 - I'll have a look at the calibrate
dialog/other things soon.


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]