opensim-gui icon indicating copy to clipboard operation
opensim-gui copied to clipboard

GUI crashes if body has no joint

Open clnsmith opened this issue 6 years ago • 5 comments

Steps to reproduce

Remove joint from Rajagopal .osim model file, but leave body in model file

load model into gui

Expected result

Should throw error message that no joint exists for XX body

Actual result

GUI crashes (closes)

Environment and GUI version

Windows 10 OpenSim ff2804eb-2018-08-16

clnsmith avatar Aug 24 '18 15:08 clnsmith

Thanks for reporting. This is likely an opensim-core issue.

chrisdembia avatar Aug 24 '18 17:08 chrisdembia

Thanks @clnsmith If you send/attach crash log file it will make it easier to track what call caused the crash (during model deserialization) in case tis doesn't reproduce easily.

aymanhab avatar Aug 24 '18 17:08 aymanhab

In trying to recreate, I found this too:

In a custom joint if the coordinate in the transform axis does not match a coordinate in the model

 <TransformAxis name="translation3">
	<coordinates>**test_tz_typo**</coordinates>
	<axis>0 0 1</axis>
	<LinearFunction name="function">
		<coefficients> 1 0</coefficients>
	</LinearFunction>
</TransformAxis>

You get an intuitive message from the gui: image image

clnsmith avatar Aug 24 '18 19:08 clnsmith

Why would you call a coordinate test_tz_typo 😃 I think the moral of the story is the same though, low level SimTK::Exceptions need to be caught and thrown as OpenSim::Exceptions so that the GUI can present them in user friendly dialogs.

aymanhab avatar Aug 24 '18 19:08 aymanhab

So it looks to be a little harder to recreate than my original post suggests.

Attached is a model and corresponding long file that causes the crash. In trying to recreate the error I made another model with bodies with no joints, and it doesn't crash (also attached), so not sure of the exact cause anymore.

crash.zip

clnsmith avatar Aug 24 '18 19:08 clnsmith