You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
every FMU we built with the grtfmi target shows the following problem:
The FMU works fine until fmi2Reset is called the first time. Afterwards some of the following fmi calls crashes.
Everything works fine if we replace fmi2Reset by fmi2FreeInstance + fmi2Instantiate.
We have tested lately with FMIKit 2.8 RC 1 and it was still not working. We have tested both Matlab 2018b and 2019b. All FMIKit settings are unchanged, therefore default.
Up to my analysis the problem are dangling pointers:
The ModelInstance struct contains fields "modelVariables", which contain references into the model itself "S".
In fmi2Instantiate these pointers are set by initializeModelVariables(instance->S, instance->modelVariables);.
In fmi2Reset, the model itself "S" is rebuilt, but the pointers are not reset and therefore dangling from now on.
In my opinion the problem could be fixed by calling initializeModelVariables also inside fmi2Reset.
Best,
Patrick
The text was updated successfully, but these errors were encountered:
Hi,
every FMU we built with the grtfmi target shows the following problem:
fmi2Reset
is called the first time. Afterwards some of the following fmi calls crashes.fmi2Reset
byfmi2FreeInstance
+fmi2Instantiate
.We have tested lately with FMIKit 2.8 RC 1 and it was still not working. We have tested both Matlab 2018b and 2019b. All FMIKit settings are unchanged, therefore default.
Up to my analysis the problem are dangling pointers:
fmi2Instantiate
these pointers are set byinitializeModelVariables(instance->S, instance->modelVariables);
.fmi2Reset
, the model itself "S" is rebuilt, but the pointers are not reset and therefore dangling from now on.In my opinion the problem could be fixed by calling
initializeModelVariables
also insidefmi2Reset
.Best,
Patrick
The text was updated successfully, but these errors were encountered: