Mantis - Squeak Packages
Viewing Issue Advanced Details
7188 IRCBot major random 09-12-08 23:04 12-30-08 18:46
45 open  
0007188: Image freezing
I've had several instances lately where an Image with IRCBot running and connnected where the image will freeze. I can interrupt it and examination indicates that it is related to the Transcript. Are we using processes/threads with IRCBot? If so we must be careful about writing to the transcript from a non-UI thread.

10-09-08 09:42   
Each instance of IRCBot launches a thread (from IRCClientConnection>>startLoop) to read the socket every 50ms.

Will it be enough to put a semaphore to avoid Transcript writing at the same time ?
10-09-08 13:50   
Should be corrected in FS46.mcz
10-09-08 20:11   
Actually you could address this a little more simply by wrapping each call to the Transcript with

WorldState addDeferredUIMessage: [ Transcript <blah> ]

Hard to tell this from the image, I just barely recollected this but a search on the wiki turns up a little info like [^]

I know you've already implemented this with a semaphore, but I would suggest going back and using addDeferredUIMessage: because it simplifies the code and, at least for those knowledgeable about it, it is more intention revealing. Or I can do it at some point.

I'm afraid I haven't had much time to give the bot lately and am not likely to have much time for a while now.
12-30-08 18:46   
Hi Francois! With IRCBot3-FS.47 it looks like you have gotten back into the IRCBot hacking mood and have at least begun to address this issue. That's great as work on the bot never seems to move up in my own todo list. Thank you very much.