tanjera / infirmary-integrated

Medical device simulator for training healthcare professionals.
http://www.infirmary-integrated.com/
Other
42 stars 5 forks source link

Devices Hanging on Window Resize #127

Closed tanjera closed 1 year ago

tanjera commented 3 years ago

When resizing Device Windows, dragging and making very small (< 25% screen area), causes program to hang.

Reproduced on Cardiac Monitor, Defibrillator.

tanjera commented 1 year ago

Tested again after updating Avalonia libraries in b115fd8 and still an easily reproducible problem.

May need to clear Tracings on resize? Appears only reproducible on Windows with Tracings.

tanjera commented 1 year ago

May have to do with https://github.com/AvaloniaUI/Avalonia/issues/3983

tanjera commented 1 year ago

Doing some testing for the source of the hanging...

Monitor w/out any Numerics or Tracings: does not hang on resizing. Monitor w/ Tracings (but w/out Numerics): does not hang Monitor w/ a Numeric but no Tracing: does hang

IABP w/ Numerics & Tracings: does hang IABP w/out Numerics or Tracings: does not hang IABP w/ Tracings (w/out Numerics): does not hang IABP w/ Numerics (w/out Tracings): does hang

12L ECG w/ all leads Tracing: does not hang. EFM: does not hang.

Narrowed it down to: on resize of Numerics, hang occurs.

tanjera commented 1 year ago

Narrowed problem down to presence of ViewBoxes... specifically when a text is changing inside a ViewBox.

tanjera commented 1 year ago

Narrowed problem further, specifically to multiple ViewBoxes against each other being resized inside of a larger container (Grid) caused the hanging. Tested by replacing with 1 ViewBox (with multiple Labels inside) and it fixed hangs!

tanjera commented 1 year ago

To implement fix for: