On Sun, Feb 16, 2003 at 04:29:38PM -0000, Michael Camacho wrote: > > That old problem. :) > > Would it be possible to have a flag for each open window, or something, such > that when the original game finishes, the window cannot be updated with more > results? > > I think you came up with something like this once, although I suppose it > wasn't implemented, hehe. Actually I thought this problem was fixed. ;( Obviously not. gGo keeps a record of all currently open observed and own games (seperated for each type) with the gameID as identifier. So everytime you open a new board the gameID and a pointer to the window is stored. This allows a couple of things like resuming adjourned games in the same window etc. and is needed for most communication between the parser and the GUI. At some point the window entry has to be removed again. This should happen everytime when a game is finished, which can have several reasons like scored, resigned, timeout, adjourned, unobserved or window closed. Obviously one of those cases doesn't remove the gameID entry properly, but I did not find out yet which. Score, resign and unobserve seems to work. The code is pretty seperated, as the IGS messages for those mentioned cases are very different, which makes it a bit difficult to find the reason. And what adds to the chaos, some IGS messages send first the toggle-quiet-false game-has-ended message and second another string, some other messages do it vice versa. So if you have toggle quiet false you get all game-has-ended messages twice. However, I cannot rely on that as the user might have toggle quiet true. And to make matters even worse, the second message differs depending on your toggle-quiet status, so I cannot simply check for the second message and ignore the first. This makes the whole thing quite horrible. Yes, occasionally I really hate the IGS protocol... And to make it worst, sometimes IGS doesnt tell the game ID at all, just prints a string like "Black resigns.". WHICH game of the three I observe??? Very cool. (gGo forces "toggle quiet false" on login, as that tells the ID in another resign message, however this comes after the "Black resigns", so if we manually turned quiet true, we have a problem. Just to give an example...) Because of the explained partial chaos, I am not too positive I will ever fix this properly, because occasionally the client can only guess which game has ended when you observe several games at the same time (and maybe play in another one, which again alters the original observe messages). On the other hand, I personally didn't get this bug anymore at all since release 0.3.2. But I mainly observe, maybe it gets more common when you observe and start an own game. Note: When an observed gameID record is removed, .ggo.log has a line like: "IGSGameObserver.removeGame() 123". You might watch out if this is missing. If you spot something like that, send me the logfile, please. Peter