Carsim和Simulink联仿,The value of the "a" property must be a numeric array without any Inf's or NaN's

报错如下

An error occurred while running the simulation and the simulation was terminated
Caused by:
The value of the "a" property must be a numeric array without any Inf's or NaN's.

img

经过排查应该不是Carsim的原因,就是Simulink的问题。途中传递的数据是一个数,memory初始为0
simulink里加了几个调试模块(2,3,4,1在上侧可视为联系23的模块),运行时先在4处停下,继续运行在3停下,继续运行在1停下,继续运行到2停下,这里都正常。
然后在2处继续运行就会报错,但我不明白,按理说2,4之间只是一个memory,为什么会报这个错

仿真的结果里出现了inf或者NaN,导致程序运行不下去