﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6436	Segmentation fault with non-linear Newton solver	Andreas Heuermann	Andreas Heuermann	"When running the example from https://trac.openmodelica.org/OpenModelica/ticket/6409 with the newton solver as non-linear solver we get a segmentation fault:

{{{
Limited backtrace at point of segmentation fault
/lib/x86_64-linux-gnu/libpthread.so.0(+0x153c0)[0x7f0e485c23c0]
/home/andreas/workspace/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libSimulationRuntimeC.so(solveNewton+0x3e)[0x7f0e4918097e]
/home/andreas/workspace/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libSimulationRuntimeC.so(solveNLS+0xd2)[0x7f0e4915a802]
/home/andreas/workspace/OpenModelica/build/bin/../lib/x86_64-linux-gnu/omc/libSimulationRuntimeC.so(solve_nonlinear_system+0x40e)[0x7f0e4915ae7e]
[...]
Segmentation fault
}}}

Since the model isn't public I'll try to solve this or find an example to show the segmentation fault.

The problem is that in `solveNewton` in [https://github.com/OpenModelica/OpenModelica/blob/master/OMCompiler/SimulationRuntime/c/simulation/solver/nonlinearSolverNewton.c#L190 nonlinearSolverNewton.c#L190] `solverData` is `NULL`, so `solverData->ftol` will crash. But I don't know ''why'' it is NULL.
"	defect	new	high		Run-time	1.18.0-dev		non-linear loop, newton	
