[Cuis-dev] #redrawNeeded from background processes
pbpublist at gmail.com
Mon Jun 3 09:46:27 PDT 2019
Thanks Juan. I should probably mention that this may surface a few
background drawing bugs elsewhere in the image 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.
 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.
On Mon, Jun 3, 2019, 10:08 AM Juan Vuletich <juan at jvuletich.org> wrote:
> On 6/1/2019 8:05 AM, Phil B via Cuis-dev wrote:
> > Every now and then when sending #redrawNeeded from a background
> > process, you'll probably find you get an 'attempt to index
> > non-existent element in an ordered collection' error in
> > DamageRecorder. This is because DamageRecorder is not thread-safe
> > (OK, process-safe) I've found this to be a miserable problem to deal
> > with because even if you're trying to be good and only message morphs
> > from the UI process, finding all the places/ways that #redrawNeeded
> > can get called can be tricky if your Morph is updating based on events
> > from background processes.
> > The attached changeset fixes that... now you can send #redrawNeeded
> > from wherever you want, whenever you want. (at least I haven't been
> > able kill it yet) This doesn't appear to have any adverse drawing
> > performance impact that I've been able to measure.
> > Thanks,
> > Phil
> Oh! That was a nasty bug! Your fix is now @ GitHub (together with
> updated images).
> Thank you!
> Juan Vuletich
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Cuis-dev