<div id="__MailbirdStyleContent" style="font-size: 12pt;font-family: calibri;color: #000000">Hi, there.<div class="mb_sig"></div><div><br></div><div>Take this Morph here:</div><div><br></div><div><b>initialize</b></div><div>&nbsp; &nbsp;super initialize.</div><div>&nbsp; &nbsp;semaphore := Semaphore forMutualExclusion.</div><div><br></div><div><b>step</b></div><div>&nbsp; &nbsp;semaphore critical: [ [] repeat ].</div><div><br></div><div><b>drawOn: aCanvas</b></div><div>&nbsp; &nbsp;semaphore critical: [super drawOn: aCanvas].</div><div><br></div><div>If you create such a morph and open it in the world, the UI process will freeze because of that endless loop in the step method. Okay. The tricky thing is, that you cannot use [CMD]+[.] because the drawing code waits for the same semaphore that is currently used in the morph's step. You will not see a debugger appear. The freshly spawned UI process will block right awai. The well known big red cross/box does not appear because there is no place to detect this situation.</div><div><br></div><div>An easy fix would be to tell the application developer to use #critical:ifLocked: in that drawing code. If that semaphore is really necessary.</div><div><br></div><div>However, can there be a way for Morphic to detect such issues and flag that Morph for the big red box? (i.e. "morph setProperty: #errorOnDraw toValue: true") <b>Could there be a notification for the Morphic framework to look out for such as WaitOnCriticalSection to flag that morph as bad? </b>Could that primitive 86 send such a notification efficiently? Just once? ^__^</div><div><br></div><div>If yes, Morphic could draw its world like this (pseudo code!):</div><div>...</div><div>[aWorld displayWorld] on: <b>WaitOnCriticalSection</b> do: [:err |</div><div>&nbsp; &nbsp;err "..." findBadMorph &nbsp;"..." setProperty: #errorOnDraw toValue: true.]</div><div>...</div><div><br></div><div>Morphic would be more robust.&nbsp;</div><div><br></div><div><span style="font-size: 12pt;line-height: 1.5">Best,</span></div><div>Marcel</div><div><br></div><div><br></div><div><br></div></div>