Opened 16 years ago

Last modified 14 years ago

#1093 closed defect (worksforme)

OMC fails with Stack Overflow

Reported by: Schubert TUD Owned by: Schubert TUD
Priority: high Milestone:
Component: Instantiation Version: 1.4.5
Keywords: Cc: Schubert TUD,

Description

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;


Attachments (1)

StackOverflow.mo (493 bytes ) - added by Schubert TUD 16 years ago.

Download all attachments as: .zip

Change History (2)

by Schubert TUD, 16 years ago

Attachment: StackOverflow.mo added

comment:1 by Martin Sjölund, 14 years ago

Works in OMC trunk

Note: See TracTickets for help on using tickets.