Opened 10 years ago

Closed 9 years ago

#3262 closed defect (fixed)

Translation error for MSL and OMEdit crash

Reported by: Rüdiger Franke Owned by: Willi Braun
Priority: high Milestone: 1.9.3
Component: Run-time Version: trunk
Keywords: Cc:

Description

The following model causes two errors: it fails in the fronend. OMEdit crashes when attempting to simulate it.

model SortTest
  Real[:, :] M = [3, 4; 1, 2];
  Real[size(M, 1), size(M, 2)] N;
equation
  N = Modelica.Math.Matrices.sort(M);
  annotation(uses(Modelica(version="3.2.1")));
end SortTest;

The translateModel(SortTest) error is:

base_array.c: array dimension size for dimension 0 is -443987883 < 0!
omc: util/integer_array.c:97: copy_integer_array_data: Assertion `base_array_ok(dest)' failed.
Aborted (core dumped)

Change History (3)

comment:1 by Adeel Asghar, 10 years ago

Component: FrontendRun-time

OMEdit should crash here because the code is causing assertion and not exception.

comment:2 by Adeel Asghar, 10 years ago

Owner: changed from somebody to Willi Braun
Status: newassigned

comment:3 by Rüdiger Franke, 9 years ago

Resolution: fixed
Status: assignedclosed

The example works now; maybe because omc pre-evaluates less functions meanwhile. Evaluation at runtime works fine.

Note: See TracTickets for help on using tickets.