3.8.1 Sloooooow redraw with debugger

Bill Schwab BSchwab at anest.ufl.edu
Fri Oct 27 21:09:06 UTC 2006


Todd,

A relatively long time ago, I was doing some MIDI/Morphic experiments,
and deliberately avoided stepping for a few reasons.  High on the list
was that separate threads were a better model for what I would
ultimately want to do with Squeak, and IMHO were easier to understand
given that multiple things were happening on their own time scales.

Making a long story short, I managed to hang Morphic in a big way, and
needed a tool to debug it.  I approached it with a variant of a trick I
use in Dolphin, specifically for deployed executables, where I hook
control-break to export call stacks on all non-dead threads.  Squeak is
different because the VM is (in my experience at least) interactive even
if Morphic hangs.  Dolphin deployed executables will hang if the message
loop stops [*], leaving control-break as the escape valve.  In Squeak,
it appears that hacking the debug menu is sufficient.  I simply replaced
the dump of the active thread with all non-dead threads, IIRC, putting
the active one on top.  I also cleaned up the new lines a little to make
the output look better.  If there is interest, I can try to gather up a
change set for it.  It was invaluable to me in finding the problem I
had, and suspect it would be useful to others.

Bill

[*]  Please do not conclude that this is common, but I have encountered
when COM based things failed to respond, when I managed to deadlock the
GUI thread, etc.  The control-break trick saved my hide a few times.



Todd Blanchard:
As a point of technique - how do I do this with the UI being
unresponsive?

On Oct 27, 2006, at 10:40 AM, Andreas Raab wrote:

>
> If you see it happen you should immediately make a snapshot of the
> processes you have running and see if any of them might do the
> equivalent of what you see above. It might also be triggered by
> overrides in packages you use.
>
> Cheers,
> - Andreas
>




Wilhelm K. Schwab, Ph.D.
University of Florida
Department of Anesthesiology
PO Box 100254
Gainesville, FL 32610-0254

Email: bills at anest4.anest.ufl.edu
Tel: (352) 846-1285
FAX: (352) 392-7029




More information about the Squeak-dev mailing list