-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix UI crashes if editing a constrained coordinate that results in a not-assemble-able model topology #888
Comments
Reading into this more, the bug in OpenSim Creator is subtle, but needs to be sorted:
The architectural issue here is that the UI is iterating over data that's being indirectly edited via some other mechanism (rollbacks), which wasn't being exercised before because setting a coordinate's value was usually safe (because most coordinates don't have this constraint-satisfaction thing going on). The architectural solution is to change the core (undoable) model datastructure in OSC to not allow direct model mutation and, instead, provide an API like (and now I'm beginning to see why retained-mode UIs separate mutation propagation from painting 😉) |
Looking into this, it will require double-buffering the |
The UI now throws exceptions much more aggressively when it encounters issues, which causes control to reach the top of the draw call, revert there (where it's safer, further up the stack, etc.) and then go back to rendering. |
Very specific bug:
is_free_to_satisfy_contraints
set totrue
Coordinates
panel, the UI will crashTracing the crash, it's a
nullptr
segfault. Looks like this:coordinate.getSpeed(state);
segfaultsvalue
column, which the user is editingcoordinate.setValue(state, value);
. This is usually fine for most models.free_to_satisfy_constraints
enabled,setValue
can throw an exception during aprojectQ
call in the implementationmodel.rollback()
to try and preserve the user's modelfor (Coordinate coord : coordinates) {}
rollback
, because rolling back also involves callingModel::buildSystem
etc., which will re-synthesize theOpenSim::Coordinate
sThe text was updated successfully, but these errors were encountered: