Opened 6 years ago
Closed 5 years ago
#5431 closed defect (fixed)
FMU Unable to Find File on Resource Folder in Windows
Reported by: | Owned by: | Lennart Ochel | |
---|---|---|---|
Priority: | blocker | Milestone: | 1.14.0 |
Component: | FMI | Version: | v1.14.0-dev-nightly |
Keywords: | Broken_Path; FMU_Resource | Cc: |
Description
I exported an FMU with included text file as Resource. File was correctly place in resource folder. When testing the FMU with fmuChecker.win64 fatal error occur as shown below. Persumably because the wrong use of "/" instead of "\" in windows environment.
[INFO][FMUCHK] Printing output file header "time" [INFO][FMUCHK] Model identifier for CoSimulation: PathTest [INFO][FMILIB] Loading 'win64' binary with 'default' platform types [INFO][FMUCHK] Version returned from CS FMU: 2.0 stdout | info | ... loading "TestTable" from "C:\Users\Arinomo\Desktop\Check\/E:/USERTEMP/fmucktmpa12888/resources/C:\Users\Arinomo\Desktop\Test\TestTable.txt" assert | debug | Not possible to open file "C:\Users\Arinomo\Desktop\Check\/E:/USERTEMP/fmucktmpa12888/resources/C:\Users\Arinomo\Desktop\Test\TestTable.txt": No such file or directory [FMU][logFmi2Call][FMU status:Error] fmi2EnterInitializationMode: terminated by an assertion. [FATAL][FMUCHK] Failed to initialize FMU for simulation (FMU status: OK) FMU check summary: FMU reported: 1 warning(s) and error(s) Checker reported: 0 Warning(s) 1 Error(s) 1 Fatal error(s) occurred during processin
Attachments (1)
Change History (10)
comment:1 by , 6 years ago
comment:3 by , 5 years ago
Should be fixed by: https://github.com/OpenModelica/OpenModelica/pull/301
Please test with the nightly from tomorrow, or do you have a test model so I can test with it?
comment:4 by , 5 years ago
Hi Adrian,
thank you for the fast fix.
Sadly i can'not uplod file from work. I'll try with the nightly build tomorrow night and will let you know on monday if it works.
thanks a lot
cheers
by , 5 years ago
Attachment: | LookupTest.fmu added |
---|
comment:5 by , 5 years ago
Microsoft Windows [Version 10.0.17763.557] (c) 2018 Microsoft Corporation. Alle Rechte vorbehalten. C:\Users\Arinomo>cd C:\Users\Arinomo\Desktop\FMUChecker-2.0.4-win64 C:\Users\Arinomo\Desktop\FMUChecker-2.0.4-win64>fmuCheck.win64 -s 10 -h 1e-1 LookupTest.fmu [INFO][FMUCHK] FMI compliance checker 2.0.4 [FMILibrary: 2.0.3] build date: Nov 6 2017 [INFO][FMUCHK] Called with following options: [INFO][FMUCHK] fmuCheck.win64 -s 10 -h 1e-1 LookupTest.fmu [INFO][FMUCHK] Will process FMU LookupTest.fmu [INFO][FMILIB] XML specifies FMI standard version 2.0 [INFO][FMUCHK] Model name: LookupTest [INFO][FMUCHK] Model GUID: {fac37408-97d9-40bc-bd9a-d723ba1dc5a1} [INFO][FMUCHK] Model version: [INFO][FMUCHK] FMU kind: CoSimulation [INFO][FMUCHK] The FMU contains: 0 constants 8 parameters 3 discrete variables 3 continuous variables 0 inputs 0 outputs 6 local variables 0 independent variables 11 calculated parameters 14 real variables 2 integer variables 3 enumeration variables 4 boolean variables 2 string variables [INFO][FMUCHK] Printing output file header "time" [INFO][FMUCHK] Model identifier for CoSimulation: LookupTest [INFO][FMILIB] Loading 'win64' binary with 'default' platform types [INFO][FMUCHK] Version returned from CS FMU: 2.0 stdout | info | ... loading "estPack\TestFolder\TestFile.txt" from "E:\USERTEMP\fmucktmpa15760\resources\C\Users\Arinomo\Documents\TestPack\TestFolder\TestFile.txt" assert | debug | Table matrix "estPack\TestFolder\TestFile.txt" not found on file "E:\USERTEMP\fmucktmpa15760\resources\C\Users\Arinomo\Documents\TestPack\TestFolder\TestFile.txt". [FMU][logFmi2Call][FMU status:Error] fmi2EnterInitializationMode: terminated by an assertion. [FATAL][FMUCHK] Failed to initialize FMU for simulation (FMU status: OK) FMU check summary: FMU reported: 1 warning(s) and error(s) Checker reported: 0 Warning(s) 1 Error(s) 1 Fatal error(s) occurred during processing
It seems that the resource file still could not be found.
comment:6 by , 5 years ago
The path to the table file is correct now. The problem seems to be something else, the name of the table is somehow wrong and it says:
Table matrix "estPack\TestFolder\TestFile.txt" not found on file ....
. I guess the name of the table should be something else and is overwritten by the name of the file. I'll debug this a bit with: https://github.com/modelica/ModelicaStandardLibrary/blob/master/ModelicaTest/Tables/CombiTimeTable.mo#L591
follow-up: 8 comment:7 by , 5 years ago
Another nasty bug found, this PR should fix it:
https://github.com/OpenModelica/OpenModelica/pull/307
comment:8 by , 5 years ago
Replying to adrpo:
Another nasty bug found, this PR should fix it:
https://github.com/OpenModelica/OpenModelica/pull/307
Thank you very much, Adrian. This fixed the issue and the FMU could be check using fmuCheck.win64, so this i think this ticket could be closed.
comment:9 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Ouch, it seems we somehow combine the current directory with the resources directory and with the path to the file in a bad way on Windows. Probably some regular expression issues.