timfel / etoys-spur

A repository to track Etoys development, keep external sources, and build all-in-one bundles
MIT License
0 stars 0 forks source link

when endlessly creating to many kedma turtles the image hangs #19

Closed JensLincke closed 7 years ago

JensLincke commented 7 years ago

Alt+. does also not seem to work anymore then. (experienced in the non etoys friendly mode... if this makes any difference)

JensLincke commented 7 years ago

The squeak vm did not consume any CPU

JensLincke commented 7 years ago

I had to use the task manager to kill it, not even the task bar and close window worked.

JensLincke commented 7 years ago

Found the bug! Due to the changed implementation of semaphores in squeak there was a deadlock between drawing code and model update code in kedama.

We fixed this my replacing critical: with critical: ifLocked: and do nothing.

KedamaMorph>>#drawTurtlesOnForm: aForm

    turtlesToDisplay do: [:exampler |
        (self isVisible: exampler) ifTrue: [
            turtlesDictSemaphore critical: [
                exampler turtles drawOn: aForm.
            ] ifLocked: [

            ]
        ].
    ].
JensLincke commented 7 years ago

@marceltaeumel helped me find and fix it

timfel commented 7 years ago

I applied this fix in trunk