mujoco
mujoco copied to clipboard
Mujoco v2.2.1 Unity Plugin crashing on any import in method Mujoco.MujocoLib:mj_loadXML on Mac M1 (Unity rosetta)
Obtained 256 stack frames.
#0 0x00000168c2c9e6 in mono_unity_backtrace_from_context
#1 0x0000010130d199 in PrintStackTraceOSX(void*)
#2 0x000001011cab41 in HandleSignal(int, __siginfo*, void*)
#3 0x00000168c85c3c in mono_chain_signal
#4 0x00000168ba91a0 in mono_sigsegv_signal_handler_debug
#5 0x007ff8111badfd in _sigtramp
#6 0x00000000000000 in (Unknown)
#7 0x007ff8111badfd in _sigtramp
.......... <repeat>
#2430x007ff8111badfd in _sigtramp
#2440x00000000000000 in (Unknown)
#2450x007ff8111badfd in _sigtramp
#2460x00000000000000 in (Unknown)
#2470x00000000000000 in (Unknown)
#2480x000001011cab41 in HandleSignal(int, __siginfo*, void*)
#2490x00000168c85c3c in mono_chain_signal
#2500x00000168ba8e97 in mono_crashing_signal_handler
#2510x007ff8111badfd in _sigtramp
#2520x00000000000000 in (Unknown)
#2530x000002250326d3 in mjParseXML(char const*, mjVFS_ const*, char*, int)
#2540x0000022503162b in mj_loadXML
#2550x000002067dac94 in (wrapper managed-to-native) Mujoco.MujocoLib:mj_loadXML (string,void*,System.Text.StringBuilder,int) [{0x7f9f72650c78} + 0x164] (0x2067dab30 0x2067dadff) [0x168742a80 - Unity Child Domain]
- Include the following context:
- Mac M1 (Rosetta)
- MuJoCo version 2.2.1 and 2.2.0 both crashing
- Unity v2022.2.0b1 and 2021.3.6f1 LTS both crashing
Repro steps -
- Use unity package manager to locate and install mujoco from its package.json
- Import a model (humanoid.xml/cloth.xml etc. in models folder)
Result: Crash (or indefinite hang)
- Instead of import, try adding a component in a gameobject in scene (Tried mj geom on a plane)
- Hit play
Result: crash (or indefinite hang)
Using native silicon version of Unity 2021.3.8f1 is working. But I need the rosetta version for my other plugin dependencies in project which are intel only
This issue is almost definitely due to AVX. Now that MuJoCo is open source, you can try building the library yourself without AVX, and that should hopefully work.