[Cuis-dev] Bug fix: Image freezes when inspecting objects with huge #printOn: results

Nicolás Papagna Maldonado nicolas.papagna at gmail.com
Mon Oct 30 19:38:13 PDT 2023


Hi Juan,

I'm glad there was a better solution!
I didn't see the fiz coming from the Morphic side.

Thank you.

Cheers,
Nico PM

On Mon, Oct 30, 2023, 18:40 Juan Vuletich <juan at cuis.st> wrote:

> On 10/29/2023 6:28 PM, Nicolás Papagna Maldonado via Cuis-dev wrote:
>
> Hi folks,
>
> The attached changeset fixes a bug that caused the image to freeze when
> inspecting objects with huge #printOn: results.
>
> To reproduce the error:
>
>    1. Open a workspace
>    2. Evaluate CompiledMethod allInstances inject: Dictionary new into: [
>    :dict :method |  dict at: method put: method sourceCode. dict ] An
>    inspector will be opened on the dictionary created above
>    3. Click on self
>    4. Notice the image hangs while waiting for the #printOn: message send.
>
> To fix this bug, I limited the time to print the selected item to 300
> milliseconds and showed an appropriate error message when that happened.
>
> LMK your thoughts.
>
> Cheers,
> Nico PM
>
>
> Hi Nico,
>
> I think that using #valueWithin:onTimeout: is like shooting a mosquito
> with a gun. I preferred a solution with two parts:
> - printing a Dictionary doesn't need to sort the keys. Dictionaries are
> not sorted.
> - Any stepping morph that takes longer than its #stepTime will be limited
> in its stepping time so GUI stays (barely) responsive.
>
> Updates now at GitHub.
>
> Thanks,
>
> --
> Juan Vuletichcuis.stgithub.com/jvuletichresearchgate.net/profile/Juan-Vuletichindependent.academia.edu/JuanVuletichpatents.justia.com/inventor/juan-manuel-vuletichlinkedin.com/in/juan-vuletich-75611b3twitter.com/JuanVuletich
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20231030/ec1422bc/attachment.htm>


More information about the Cuis-dev mailing list