Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5785 closed defect (invalid)

OMEdit crashes when editing OMSimulator model

Reported by: Andreas Heuermann Owned by: Adeel Asghar
Priority: high Milestone: 1.16.0
Component: OMEdit Version: v1.16.0-dev
Keywords: OMEdit OMSimulator FMU Connector Cc: Lennart Ochel

Description

I'm trying to add a connector between testInput.integertable1.y and simpleTest.u where testInput is a submodule of CSV file (simulated testInput.mo) and simpleTest is a submodule of an ME 2.0 FMU (generated from simpleTest.mo).

After I get a scripting error

[addConnection] Type mismatch in connection: testInput.integertable1.y .> simpleTest.u

OMEdit will crash. Please see attached screenshot.

SimpleTest.mo

model SimpleTest "just a simple model - Compilation etc."
  Modelica.Blocks.Interfaces.IntegerInput u;
  Modelica.Blocks.Interfaces.IntegerOutput y;
algorithm
  when u > pre(u) then
    y := y + 2;
  end when;
end SimpleTest;

testInput.mo

model testInput
  Modelica.Blocks.Sources.IntegerTable integertable1(table=[0, 1; 0.2, 2; 0.4, 3; 0.6, 4; 0.8, 5; 1, 6]);
end testInput;

I'm running OpenModelica v1.16.0-dev-106-gf60ffbd0a (64-bit)
Connected to OMSimulator v2.1.0-dev-147-g36ec2c7-mingw on Windows 10

Attachments (4)

OMEdit_Crash.png (79.1 KB ) - added by Andreas Heuermann 5 years ago.
Crash of OMEdit after error cathed by OMSimulator
OMEdit_Crash_2.png (97.0 KB ) - added by Andreas Heuermann 5 years ago.
OMEdit crashes wile savig spp file
OMEdit_Logs.zip (323.7 KB ) - added by Andreas Heuermann 5 years ago.
Logs from OMEdit working directory
SimpleTest.fmu (593.2 KB ) - added by Andreas Heuermann 5 years ago.
My generated test FMU

Download all attachments as: .zip

Change History (10)

by Andreas Heuermann, 5 years ago

Attachment: OMEdit_Crash.png added

Crash of OMEdit after error cathed by OMSimulator

comment:1 by Andreas Heuermann, 5 years ago

While trying to safe the spp file to add as example OMEdit crashes also. See the next screenshot.

by Andreas Heuermann, 5 years ago

Attachment: OMEdit_Crash_2.png added

OMEdit crashes wile savig spp file

comment:2 by Andreas Heuermann, 5 years ago

Summary: OMEdit crashes when editing .. modelOMEdit crashes when editing OMSimulator model

comment:3 by Francesco Casella, 5 years ago

It could be interesting to see the stacktrace. Tools | Open Working Directory, then attach omedit*.log and omedit*.txt files to this ticket.

by Andreas Heuermann, 5 years ago

Attachment: OMEdit_Logs.zip added

Logs from OMEdit working directory

comment:4 by Andreas Heuermann, 5 years ago

The central error is presumably

terminate called after throwing an instance of 'std::runtime_error'
  what():  Failed to copy file: C:/Users\USERNAME\AppData\Local\Temp\OpenModelica\OMEdit\simulateWithOMSimulator-4scj5a1n\temp/model.ssp  to: D:/workspace/Testitesttest/ticket5785/simulateWithOMSimulator.ssp

from omediterror.txt.

by Andreas Heuermann, 5 years ago

Attachment: SimpleTest.fmu added

My generated test FMU

comment:5 by Adeel Asghar, 5 years ago

Resolution: invalid
Status: newclosed

This is not an issue of OMEdit. I traced it back to OMSimulator core and created an issue on OMSimulator github https://github.com/OpenModelica/OMSimulator/issues/715.

comment:6 by Andreas Heuermann, 5 years ago

But I still would prefere whenever OMSimulator throws std::runtime_error to catch the error and at least give some more output on what happend.

Is this possible?

Version 0, edited 5 years ago by Andreas Heuermann (next)
Note: See TracTickets for help on using tickets.