ComputationalBiomechanicsLab / opensim-creator

A UI for building OpenSim models
https://opensimcreator.com
Apache License 2.0
155 stars 18 forks source link

Fix `LoadingTab` segfault on MacOS #925

Closed adamkewley closed 1 month ago

adamkewley commented 1 month ago

Happens after the Event refactor.

The reason why is because the Event model now defers closing the loading tab and opening the model editor by one frame, so there's a frame where the LoadingTab calls std::future::get after the future has already been handled. On Windows/Linux, this is fine (it throws an exception along the lines of "missing state"), but on MacOS it segfaults.

adamkewley commented 1 month ago

Fixed + verified - with a regression test etc.