Norihiro Kikuchi has reported that the function
SBML_odeSolverBatch or Model_odeSolverBatch causes a
core dump (segmentation fault) when batch variation for
an ODE variable (i.e. initial condition scan) is
requested. This occurs due to a double free in the
second run of the batch process by
IntegratorInstance_setVariableValue.
The bug can temporarily be fixed by adding the
following lines in file src/integratorInstance.c:
after line 740:
data->value[vi->index] = value;
add
if ( solver->t == 0.0 )
data->results->value[vi->index][0] = value;
This is required because initial values at time 0 are
written before integration starts and so these need to
be adapted to the new initial value, too.
then a few lines below after:
IntegratorInstance_freeCVODESolverStructures(engine);
solver->t0 = solver->t;
add
data->run = 0;
Setting data->run to 0 avoids the double free of the
solver structures, which happens when setting the
variable in the second run of the batch process.
However, the counter data->run is lost. If you don't
use it, this should not be a problem.