[squeak-dev] Morphic yellow cross of death

Bob Arning arning315 at comcast.net
Tue Sep 24 02:43:02 UTC 2013


I'll think about this some more, but my current suspicion centers on:

styleInBackgroundProcess: aText

     self terminateBackgroundStylingProcess.
     stylingEnabled ifTrue:[
         text := aText copy.
         self monitor critical: [
             sem := Semaphore new.
             [sem notNil
                 ifTrue: [
                     sem wait.
                     view ifNotNil:[view stylerStyledInBackground: text]]
             ] forkAt: Processor activePriority.
             backgroundProcess :=
                 [self privateStyle: text.
                 sem signal]
                     forkAt: Processor userBackgroundPriority] ]

I'm a little concerned about the

             ] forkAt: Processor activePriority.

resulting in a process (1) running at the same priority as the UI 
process and (2) that will modify the state of a text morph on the 
screen. If such a modification is interrupted by a higher-priority 
process, the resumed process will not be the interrupted one, but the UI 
process which may proceed to display the world, includeing the partially 
modified text morph.

If you can figure out how to make the error happen easily, then things 
to try:
- increase the priority a bit
             [sem notNil
                 ifTrue: [
                     sem wait.
                     view ifNotNil:[view stylerStyledInBackground: text]]
             ] forkAt: Processor activePriority+1.
- use
     WorldState addDeferredUIMessage: [view ifNotNil:[view 
stylerStyledInBackground: text]]
instead of a separate process
- disable background styling

One or more of these might make the problem go away. Assuming you can 
force the problem to happen reliably. ;-)


Cheers,
Bob

On 9/23/13 8:53 PM, Nicolas Cellier wrote:
> I was trying to merge tim's change with mine, so the image was 
> definitely not clean.
> This involved many action, correcting SyntaxError, etc... breaking an 
> image, killing the process, and restarting all over again.
> If I remember, I got such error first in a MC merge window.
> I also remember some strange warning 'This modal dialog was 
> interrupted, please close it'... This could be from MCTool answer:
> Generally, the red squeare is not solitary, they like to burst in 
> flock, so I suspect some ill state of the World, like having several 
> UI processes? But currently my image show no extra Process in the 
> ProcessBrowser
>
>
> 2013/9/24 Bob Arning <arning315 at comcast.net 
> <mailto:arning315 at comcast.net>>
>
>     One more question:
>
>     - Were there any processes running other than those standard in
>     all Squeaks?
>
>     Cheers,
>     Bob
>
>     On 9/23/13 7:43 PM, Nicolas Cellier wrote:
>>     After replacing doOneCycle with displayWorldSafely, I got much
>>     more stable morphs...
>>     But see yet another red square attached...
>>
>>
>>
>>
>>     2013/9/18 Bob Arning <arning315 at comcast.net
>>     <mailto:arning315 at comcast.net>>
>>
>>         So, the question is do they really need #doOneCycle or
>>         something less, like #displayWorldSafely
>>
>>         Cheers,
>>         Bob
>>
>>         On 9/17/13 6:36 PM, Nicolas Cellier wrote:
>>>         Ah we cross posted, good find!
>>>
>>>         Those guys messing with World doOneCycle are just like the
>>>         sorcerer's apprentice...
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130923/baca267f/attachment.htm


More information about the Squeak-dev mailing list