tanjera / infirmary-integrated

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

"Update Available" Process Breaks Loading Process #168

Closed tanjera closed 1 year ago

tanjera commented 1 year ago

Likely due to Exception throwing during "update available" process. Need to fix any Exceptions and test/debug.

20220813_092639

tanjera commented 1 year ago

Fixed in 822c7f55f66ecb048c09edebec214397cde23ea5

tanjera commented 1 year ago

Order of initialization was changed in 822c7f55f66ecb048c09edebec214397cde23ea5 preventing this issue from breaking the Init() process... however, it didn't fix the actual Exception being thrown during the "Upgrade Available" process...

Found and fixed root problem in upcoming commit. In the following code:

            DialogUpgrade dlg = new (Instance);
            dlg.Activate ();

            dlg.OnUpgradeRoute += (s, ea) => decision = ea.Route;

            if (!this.IsVisible)                    // Avalonia's parent must be visible to attach a window
                this.Show ();

            await dlg.ShowDialog (this);

Previously, there was no check if this.IsVisible and so dlg.ShowDialog(this) was being called when !this.IsVisible. The following code was added to fix this on Release build testing.

if (!this.IsVisible)                    // Avalonia's parent must be visible to attach a window
  this.Show ();
tanjera commented 1 year ago

Fixed definitively in d935601326beb372b717d96b2357b7a519f60643