Opened 10 years ago

Closed 9 years ago

Last modified 7 years ago

#2907 closed defect (fixed)

Inner model with algorithm fails

Reported by: crupp@… Owned by: somebody
Priority: high Milestone: 1.9.4
Component: *unknown* Version: trunk
Keywords: Cc:

Description

Using the nightly build 22761, the following script fails under the given circumstances:

loadString("model inner_bug
  inner global glb;
end inner_bug;

model global
initial algorithm
  func();
end global;

function func
end func;");

// This works
simulate(inner_bug);

// This fails
simulate(inner_bug, simflags="-lv=LOG_STATS");

The model runs without "-lv=LOG_STATS", but fails with it. The error returned is:

    messages = \"Simulation execution failed for model: inner_bug
assert            | debug   | simulation/simulation_info_xml.c: Info XML inner_bug_info.xml got equation with index 3, expected 1
\"

Also, if "algorithm" is used instead of "initial algorithm" in model global, then the error is:

    messages = \"Simulation execution failed for model: inner_bug
Assertion failed: xml->nEquations == userData.curIndex, file simulation/simulation_info_xml.c, line 298

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
\"

These issues have only appeared since build r21961.

Change History (3)

comment:1 by crupp@…, 9 years ago

Resolution: fixed
Status: newclosed

Seems to work now.

comment:2 by Dietmar Winkler, 9 years ago

Milestone: Futurepre1.9.4

It doesn't make sense to keep closed ticket in the "Future" milestone that were simply forgotten to assign to the correct milestone in the past.

comment:3 by Martin Sjölund, 7 years ago

Milestone: pre1.9.41.9.4

Removing the pre1.9.4 milestone in favor of 1.9.4.

Note: See TracTickets for help on using tickets.