[squeak-dev] WorldState deferredUIMessages queue

Chris Muller ma.chris.m at gmail.com
Tue Mar 24 21:17:37 UTC 2009


(3.9 Morphic).  With Maui I occassionally get World lockups due to the
UI process waiting for the #next of the deferredUIMessages, which is
empty.

Specifically, the freeze, when it occurs, is always in
WorldState>>#runStepMethodsIn:.  There's a while loop to process
messages in the queue:

	"Dispatch deferred messages while maintaing rudimentary UI responsiveness."
	[i < numItems and: [(Time millisecondsSince: stamp) < limit]]
		whileTrue: [queue next value. i := i + 1].

and its hung waiting for "queue next".  But it seems like this
shouldn't be possible because, at the top of the method, "numItems" is
set to the size of the queue.

	numItems := queue size.

and so the only explanation is, somehow in processing one of the
messages, it causes another one to be removed from the queue.  This
appears to be possible if the first message calls a #doOneCycle,
leading it back through this same method..

I do have 4 or 5 #doOneCycles sprinkled around, in order to force
correct layout or screen redraws.  I'm pretty sure these are causing
the deadlock but.. when I tried taking some of them out I get the
layout/redraw problem..

Any advice is greatly appreciated.

 - Chris



More information about the Squeak-dev mailing list