[Cuis-dev] VectorGrahicsPlugin Troubles (WAS: Re: A few tweaks to preferences)

Juan Vuletich juan at jvuletich.org
Fri Aug 20 19:34:07 PDT 2021


Hi Gerald,

On 8/20/2021 4:58 PM, Gerald Klix via Cuis-dev wrote:
>
> ...
> BTW: I found some (not easy reproducible) way to drive
> the VectorgrahicsPlugin into a SegFault.
>
> I attached a small package that enables the user to use
> Control-ScrollUp/ScrollDown to zoom SystemWindows.
> Currently it does not (always) work if your mouse
> is over a scroll pane for obvious reasons
> left as an exercise to the gentle reader.
> You can also Press Control-0 to set the scale back to 1.
>
> I used this package to test the scroll event stuff
> with new event-handlers not previously in the image and
> discovered that if you rapidly zoom in out, event handling
> makes long (5 seconds) pauses, the hour-glass cursor is shown,
> sometimes this ends up in a segmentation fault.
> I tried 'Debug -> Message Tally ...' once, this ended
> in a segfault in less than 2 seconds.
>
> It gets worse if you zoom some a Browser-Window with
> lots of text-heavy panes.
>
> This might become a problem for Dr. Geo.
>
>
> HTH,
>
> Gerald

Thanks Gerald. I have experienced occasional crashes when zooming heavy 
windows, but this surely makes it more likely to happen. I can't test it 
right now (I need Windows or Linux), but I thought of a possible reason 
for the problem. If many drag-the-scale-handle events are processed in 
the same Morphic cycle, and processing each takes too much time, next 
cycle will take longer, so it will process even more of those events (if 
generated at a constant rate by an insisting user). The growth is 
exponential, with no bound. So this is guaranteed to end badly!

I just pushed an update that limits the processing of MouseMoveEvents to 
just one per cycle. The other kinds of events are much less likely to 
cause this kind of problems (although not completely impossible), and 
are (as usual) processed until the event queue is empty.

Please try again with this updates if you have the chance. It may help.

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