﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4773	Simulation from OMEdit fails for Cpp runtime under Windows	Rüdiger Franke	Adeel Asghar	"The following model simulates under Linux and from command line under Windows.

{{{#!mo
model TableTest
  extends Modelica.Blocks.Tables.CombiTable2D(
      table = [0.0,   1.0,   2.0,   3.0;
               1.0,   1.0,   3.0,   5.0;
               2.0,   2.0,   4.0,   6.0]);
  annotation(uses(Modelica(version=""3.2.2"")));
end TableTest;
}}}

The 32bit Windows release of OpenModelica produces the following error when attempting to simulate the model from OMEdit:

{{{
C:/Users/Someone/AppData/Local/Temp/OpenModelica/OMEdit/TableTest/TableTest.exe -port=64319 -logFormat=xmltcp -override=startTime=0,stopTime=1,stepSize=0.002,tolerance=1e-6,solver=dassl,outputFormat=mat,variableFilter=.* -r=C:/Users/Someone/AppData/Local/Temp/OpenModelica/OMEdit/TableTest/TableTest_res.mat -w -lv=LOG_STATS -inputPath=C:/Users/Someone/AppData/Local/Temp/OpenModelica/OMEdit/TableTest -outputPath=C:/Users/Someone/AppData/Local/Temp/OpenModelica/OMEdit/TableTest
}}}

{{{
Simulation stopped with error in simulation manager: Simulation failed for C:/Users/Someone/AppData/Local/Temp/OpenModelica/OMEdit/TableTest/TableTest_res.mat with error in simulation manager:
Could not initialize system
Could not read start values. Current variable reference is 1
Simulation process failed. Exited with code 1.
}}}

Following observations are made:
- the simulation does not always fail. Press Re-Simulate to see the crash then
- the simulation runs from Tools -> OpenModelica Command Prompt (when omitting the `-port` option)
- when called from OMEdit, the simulator builds up a lot of memory for about 1 second, before it exits
- the Linux version warns about unknown `-inputPath` and `-outputPath` options -- these warnings don't appear under Windows

Looks like a newly introduced problem (e.g. caused by changed logging, new subdirectories in OMEdit folder, specifics of Windows build, ...)."	defect	new	blocker	1.13.0	OMEdit	v1.13.0-dev-nightly			Niklas Worschech Adrian Pop
