squeak crash when updating morph in background

ALR alr.dev at free.fr
Fri Aug 29 18:37:48 UTC 2003


I'm trying to fill a PluggableMultiColumnListMorph with 2 columns in a
background process and I'm experiencing serious crashes.

The list morph is created and filled in a background process with:
[AccountListMorph testODBC ] forkAt: Processor userBackgroundPriority.
The list is about 8000 records.
At the end of my background process, I do a 'changed' on my list morph.
The list is then drawn, but if I click on it in the middle of the drawing
process (as *power users* usually do), that is to say when the first column
is on the screen but the second did not yet appeared, I have various
crashes, ranging from serious to very serious.
At least I have identified 2 kinds of crashes:


1)st crash :(snip from stack, in a ***System error handling failed*** white
window)
<CODE>
    MessageNotUnderstood: area
    ...
    UndefinedObject(Object)>>doesNotUnderstand
    WorldState>>drawWorld:submorphs:invalidAreasOn:
    ...
    Array(ArrayedCollection)>>sort:
    WordState>>drawWorld:submorphs:invalidAreasOn:
</CODE>

I suppose the problem is that one of the 'recList' r1 or r2 is nil in :
WorldState>>drawWorld:submorphs:invalidAreasOn:
 ... rectList _ rectList asArray sort:[:r1 :r2| r1 area > r2 area].
(the recList is build by damageRecorder.)
...Pourquoi tant de haine/Why so much hatred (correct?)  ???


2) nd crash (recoverable, ie does not really crash the system)
<CODE>
    Array(Object)>>error:
    Array(Object)>>errorSubscriptBounds
    Array(Object)>>at:
    AccountListMorph(PluggableMultiColumnMorph)>>unhighlightSelection
    AccountListMorph(PluggableMultiColumnMorph)>>selectedMorph
    AccountListMorph(PluggableMultiColumnMorph)>>selectionIndex:
    AccountListMorph(PluggableMultiColumnMorph)>>setListIndex:
etc...
</CODE>


I'll try to add nil tests in thoses methods (WorldState>>drawWorld and
PluggableMultiColumnMorph>>unhighListSelection) but before introducing
my bugs in the system I would like to have advices from experienced squeak
developpers.
My feeling is that there must be races condition problems with the UI thread
and my background process.
Are there any 'trade-off' about UI and multi-threading issues ?

All comments are welcome.


Alain





More information about the Squeak-dev mailing list