Opened 6 years ago
Closed 6 years ago
#5251 closed defect (fixed)
OMEdit on Ubuntu 16.04 LTS does not open the plotting perspective after simulation
Reported by: | Adrian Pop | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | blocker | Milestone: | 1.13.0 |
Component: | OMEdit | Version: | v1.14.0-dev-nightly |
Keywords: | Cc: |
Description
See the discussion on:
https://stackoverflow.com/questions/53787681/openmodelica-no-output-variables-or-solution-file
Simulation finishes fine but after that the result file is not read and the plotting perspective is not activated.
Tested this with 1.14.0-dev on build.openmodelica.org.
Change History (7)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
1727 resultFileInfo.setCaching(false); (gdb) 1728 QRegExp regExp("\\b(mat|plt|csv)\\b"); (gdb) 1732 QDateTime resultFileModificationTime = resultFileInfo.lastModified(); (gdb) 1734 bool resultFileKnown = regExp.indexIn(simulationOptions.getFullResultFileName()) != -1; (gdb) 1735 bool resultFileExists = resultFileInfo.exists(); (gdb) 1736 bool resultFileNewer = resultFileLastModifiedDateTime <= resultFileModificationTime; (gdb) 1737 bool resultFileNonZeroSize = MainWindow::instance()->getOMCProxy()->readSimulationResultSize(resultFileInfo.absoluteFilePath()) > 0; (gdb) 1739 const char *timeBefore = resultFileLastModifiedDateTime.toString("hh:mm:ss:zzz").toStdString().c_str(); (gdb) 1740 const char *after = resultFileModificationTime.toString("hh:mm:ss:zzz").toStdString().c_str(); (gdb) 1742 if (resultFileKnown && resultFileExists && resultFileNewer && resultFileNonZeroSize) (gdb) p timeBefore $1 = 0x7fffffffd8f0 "04:10:34:329" (gdb) p after $2 = 0x7fffffffd8b8 "04:10:34:000"
And there you have it, resultFileInfo.lastModified() truncates to seconds, QDateTime::currentDateTime() does not and you actually get a false for resultFileNewer :)
comment:3 by , 6 years ago
Should be fixed by PR: https://github.com/OpenModelica/OMEdit/pull/197.
@adeas31: please have a look.
comment:4 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
follow-up: 6 comment:5 by , 6 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I'll keep it open until @adeas31 has a quick look and if is fine we should port it to maintenance/v1.13 branch.
comment:6 by , 6 years ago
Priority: | high → blocker |
---|
Replying to adrpo:
I'll keep it open until @adeas31 has a quick look and if is fine we should port it to maintenance/v1.13 branch.
Marked it as blocker so we don't forget about it
comment:7 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Looks good. Ported it to maintenance/v1.13.
This fails miserably on Ubuntu 16.04 LTS:
I assume is the new addition with the time check.