﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
3028	Segmentation fault when Simulate is called with non-existent argument (stepSize)	anonymous	Per Östlund	"https://build.openmodelica.org/Documentation/OpenModelica.Scripting.simulate.html

 The above link shows that for ""Simulate"" function can have ""stepSize"" argument. Although the
function declaration does not have a corresponding input line.

My earlier simulations used to work with this argument. Looks as though in the new commits this argument is no longer present in builtin function ""simulate"". 

But what surprised me was that the simulation call failed with segmentation fault. I would have thought supplying  non existent argument would be  caught at parsing stage. Perhaps it is not possible to catch such errors with builtin functions :((.  

Is there a way to make it easy to trace such problems?


=====  Error trace dumped on terminal after simulate call =====
Limited backtrace at point of segmentation fault
/lib64/libpthread.so.0[0x35ca60f6d0]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_Expression_traverseExp+0x1855)[0x7f5da8c469f5]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_Expression_traverseExpList+0x67)[0x7f5da8c47b17]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_Expression_traverseExp+0x11c6)[0x7f5da8c46366]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_ExpressionSimplify_simplify1FixP+0x195)[0x7f5da8c21d75]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_ExpressionSimplify_simplify1WithOptions+0x2f)[0x7f5da8c2211f]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_ExpressionSimplify_simplify1+0x19)[0x7f5da8c221a9]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_StaticScript_elabExp2+0x2ed)[0x7f5da87617fd]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_StaticScript_elabExp+0xa7)[0x7f5da8761a07]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_Interactive_evaluateAlgStmt+0xc3e)[0x7f5da8759eee]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_Interactive_evaluate2+0x17d)[0x7f5da875badd]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_Interactive_evaluateToStdOut+0x24e)[0x7f5da875c5ce]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_Main_translateFile+0x3bd)[0x7f5da836baad]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_Main_main2+0x3e7)[0x7f5da836d3d7]
/home/ravi/software/om/bin/../lib/omc/libOpenModelicaCompiler.so(omc_Main_main+0x17b)[0x7f5da836d6ab]
Segmentation fault (core dumped)
"	defect	closed	high	1.9.4	Interactive Environment	trunk	fixed	simulate, segmentation fault	Rev. 23726
