﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1093	OMC fails with Stack Overflow	Schubert TUD	Schubert TUD	"Hi,

when I try to simulate a model of mine, OMC always failed issuing the error message ""Stack Overflow"". After tracing the error I came up with a short example given below which causes the error. Simulating 'TestOK' works. Simulating 'TestFail' however will result in a Stack Overflow (which causes OMNotebook to crash).
Although it feels strange to write t1(c = c), it does work with t1(c = c2), hence I assume it must be syntactically correct? Strangely it works if there is only one variable of SubTest within GeneralTest. I also tried Dymola and both models work fine. 

Regards,

Christian Schubert

----

 

model SubTest \\  parameter Real c = 1;
 \\end SubTest; 

model GeneralTest \\
  SubTest t1; \\
  SubTest t2; \\
end GeneralTest; 

// OMC fails with Stack Overflow if you try to simulate the following model 'TestFail' \\
model TestFail
  \\extends GeneralTest( t1(c = c), t2(c = c));
  \\parameter Real c = 2; \\
end TestFail;

// OMC does not fail to simulate the following model 'TestOK' however
 \\model TestOK \\  extends GeneralTest( t1(c = c2), t2(c = c2));
  \\parameter Real c2 = 2; \\
end TestOK;
 \\"	defect	closed	high		Instantiation	1.4.5	worksforme		Schubert TUD
