[Cuis-dev] Desktop background, Morphic and SVG examples, and other tweaks

Juan Vuletich juan at jvuletich.org
Wed Sep 22 07:31:26 PDT 2021


Hi Andrés,

On 9/18/2021 2:43 AM, Andres Valloud via Cuis-dev wrote:
> Wait, do you mean to imply that the GC can't keep up with garbage 
> creation?  Could it be that such resizing is being done in a way that 
> disables whatever GC controlling code in the image?  If the bitmaps 
> are actually garbage, any crash like that is hard bug irrespective of 
> whether it's the fault of the VM or the image.

No, I didn't mean that. I only meant that Cuis could crash under 
circumstances I was trying to understand and address.

> I also mean to imply any such bug where the system fails to cope with 
> copious garbage and crashes, and especially when the failure is not 
> graceful, is unacceptable.

Of course.

> If that crash could be reproduced by simply creating e.g. garbage byte 
> arrays like crazy, then that should be given to the relevant VM / 
> kernel image developer.

Agreed. But that was not the case. I finally found an off-by-one bug in 
VectorEnginePlugin that could cause an invalid access. After fixing it, 
I haven't experienced any crashes during my testing. The real fix, in 
the plugin, is now at GitHub. But to avoid crashes when using existing 
VMs+plugin, I also included a workaround in Smalltalk code: just make 
the morphIds array larger by 1 element. This patch will be removed when 
no longer needed.

> On 9/17/21 10:32 AM, Juan Vuletich via Cuis-dev wrote:
>> I've been working hard on improving stability and reducing VM 
>> crashes, especially when using VectorGraphics. This meant changing 
>> the sequence in which the Display and other very big aux arrays are 
>> created. Today I found that the Cuis Morphic background is likely a 
>> source of trouble. On a big Display (4k), each time the main Cuis 
>> window is resized, we needed to create instances of Bitmap for 56Mb, 
>> 48 of them to be released immediately. And this could happen several 
>> times in sequence, as the user resizes Cuis to suit their taste. I've 
>> seen VM crashes during Garbage Collection while doing this.

Thanks,

-- 
Juan Vuletich
www.cuis-smalltalk.org
https://github.com/Cuis-Smalltalk/Cuis-Smalltalk-Dev
https://github.com/jvuletich
https://www.linkedin.com/in/juan-vuletich-75611b3
@JuanVuletich



More information about the Cuis-dev mailing list