It seems that ar.config.useSparseJac is set to 1 in arCompileAll in paricular cases? There's already a default for useSparseJac in arInitFields (which is 0). I've reversed the logic in commit db4e312340c9fb3c432192fadf52f3a154c0a5b1 , since it seems strange to use a sparse jac when you set the flag to 0.
I have a model where if useSparseJac is set to one, the model crashes (including MATLAB).
The error I see in the terminal is:
Error in `/usr/local/MATLAB/R2017a/bin/glnxa64/MATLAB': realloc(): invalid next size: 0x00007fb92cd74510
In MATLAB the following is displayed when simulating with full error info:
It seems that ar.config.useSparseJac is set to 1 in arCompileAll in paricular cases? There's already a default for useSparseJac in arInitFields (which is 0). I've reversed the logic in commit db4e312340c9fb3c432192fadf52f3a154c0a5b1 , since it seems strange to use a sparse jac when you set the flag to 0.
I have a model where if useSparseJac is set to one, the model crashes (including MATLAB).
The error I see in the terminal is: Error in `/usr/local/MATLAB/R2017a/bin/glnxa64/MATLAB': realloc(): invalid next size: 0x00007fb92cd74510
In MATLAB the following is displayed when simulating with full error info:
Example case where it happens here: crashcase.zip