MATLAB: Do I get a Physical Modeling assertion when I run the model containing SimMechanics 2.2 (R14) blocks

assertionmodelingphysicalphysmodsimmechanicsSimscape Multibody

When I do the following:
1. Open MATLAB
2. Open the Simulink Library Browser
3. Load the SimMechanics Library (i.e., click on the SimMechanics branch)
3. Open my model.
4. Run my model
I get the following error message and I have to kill MATLAB externally:
-------------------------------------------------------------------------
Physical Modeling Assertion
-------------------------------------------------------------------------
Assertion Failed rp_iter != rp.end() at line 1091 of file ".\pmserialize.cpp".
CS3Pos
Stack Trace:
[0] mechanical.dll:public: __thiscall PMAssertion::PMAssertion(char const *,int,char const *,char const *)(0x0b324d48 ".\pmserialize.cpp", 1091, 0x0b325058 "rp_iter != rp.end()", 0x00cda564 "CS3Pos") + 160 bytes
[1] mechanical.dll:public: virtual class GenericRuntimeData const * __thiscall PMSerializeRuntimeParameter::generateValue(class RuntimeDataGenerator &,class pmstring const &,struct mxArray_tag const *,class CompoundStaticData const &,class pmmap<class pmstring,struct mxArray_tag const *,struct std::less<class pmstring> > const &,unsigned long,char const *)const (0x231a0da0, 0x21ac6c4c, 0x22d22f20, 0x219f1f20) + 353 bytes
[2] mechanical.dll:public: void __thiscall RuntimeDataBuilder::operator()(class RuntimeSchema::SchemaField const &)(0x2319f4c8, 0x2306ec10, 0x00cda628, 0x00cda65c "x¦Í") + 176 bytes
[3] mechanical.dll:??$for_each@Viterator@?$vector@VSchemaField@RuntimeSchema@@V?$allocator@VSchemaField@RuntimeSchema@@@std@@@std@@VRuntimeDataBuilder@@@std@@YA?AVRuntimeDataBuilder@@Viterator@?$vector@VSchemaField@RuntimeSchema@@V?$allocator@VSchemaField@RuntimeSchema@@@std@@@0@0V1@@Z(0x00cda648, 0x21ac6bc8 "CGertia", 0x21ac6c78, 0x2310d050 "À¨ï"") + 25 bytes
<snip>
What is causing this error?

Best Answer

This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
We have verified that there is a bug in SimMechanics 2.2 (R14) in the way it handles simulations with the SimMechanics library node selected. To work around this issue, run the simulation without the SimMechanics library loaded. The main trigger for the error is clicking on the SimMechanics node in the Simulink Library Browser. If you can bypass this step and just open the model directly (either from the command line or from the library browser, but without opening this node), the error seems to disappear.