<div dir="auto"><div>Thanks Juan.  I should probably mention that this may surface a few background drawing bugs elsewhere in the image[1] or in your (i.e. anyone who is reading this) drawing code.  This isn't a bug in this code (at least so far that hasn't been my experience), it's #redrawNeeded getting out of the way and letting you see whatever the real issue is.<div dir="auto"><br></div><div dir="auto">[1] It wouldn't be surprising to find such bugs in process browser or the debugger.  Over the years I've had to submit some bug fixes that, while they seem to work fine, just felt odd at the time to me.</div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 3, 2019, 10:08 AM Juan Vuletich <<a href="mailto:juan@jvuletich.org">juan@jvuletich.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 6/1/2019 8:05 AM, Phil B via Cuis-dev wrote:<br>
> Every now and then when sending #redrawNeeded from a background <br>
> process, you'll probably find you get an 'attempt to index <br>
> non-existent element in an ordered collection' error in <br>
> DamageRecorder.  This is because DamageRecorder is not thread-safe <br>
> (OK, process-safe)  I've found this to be a miserable problem to deal <br>
> with because even if you're trying to be good and only message morphs <br>
> from the UI process, finding all the places/ways that #redrawNeeded <br>
> can get called can be tricky if your Morph is updating based on events <br>
> from background processes.<br>
><br>
> The attached changeset fixes that... now you can send #redrawNeeded <br>
> from wherever you want, whenever you want. (at least I haven't been <br>
> able kill it yet)  This doesn't appear to have any adverse drawing <br>
> performance impact that I've been able to measure.<br>
><br>
> Thanks,<br>
> Phil<br>
<br>
Oh! That was a nasty bug! Your fix is now @ GitHub (together with <br>
updated images).<br>
<br>
Thank you!<br>
<br>
-- <br>
Juan Vuletich<br>
<a href="http://www.cuis-smalltalk.org" rel="noreferrer noreferrer" target="_blank">www.cuis-smalltalk.org</a><br>
<a href="https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev" rel="noreferrer noreferrer" target="_blank">https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev</a><br>
<a href="https://github.com/jvuletich" rel="noreferrer noreferrer" target="_blank">https://github.com/jvuletich</a><br>
<a href="https://www.linkedin.com/in/juan-vuletich-75611b3" rel="noreferrer noreferrer" target="_blank">https://www.linkedin.com/in/juan-vuletich-75611b3</a><br>
@JuanVuletich<br>
<br>
</blockquote></div></div></div>