#3723 closed defect (fixed)
When creating new model in multi-file package with OMEdit, the model is empty and not saved
Reported by: | Francesco Casella | Owned by: | Adeel Asghar |
---|---|---|---|
Priority: | blocker | Milestone: | 1.9.4 |
Component: | OMEdit | Version: | v1.9.4-dev-nightly |
Keywords: | Cc: |
Description
Load the attached test package. Right-click on Test, select New Modelica class and add a model C. The model shows up empty.
Hit Save. The asterisk on C goes away, but C is not saved to any file.
Now expand the Test tree. C shows up and is added to the package.order file, but yet its code is not added to package.mo, nor to a C.mo file.
Similar to #3635, which had a package contained in a single file and was fixed. Unfortunately, if the package resides on multiple files, the problem is still there, as reported in #3635.
Attachments (2)
Change History (22)
comment:1 by , 9 years ago
Status: | new → accepted |
---|
by , 9 years ago
comment:2 by , 9 years ago
Works perfectly fine for me. I can't reproduce it. Maybe because I have some fixes in my working copy so you could try tomorrow with the latest nightly.
I made a small video about it http://www.ida.liu.se/~adeas31/Ticket3723.swf
comment:3 by , 9 years ago
OK, I downloaded the latest Windows nightly (omc v1.9.4-dev.beta2-66-g5fd29e6). The reported problem is gone, i.e., I now see the code of class C.
However, if now click on Test and save the package, the package.mo file is removed, and the library becomes invalid.
comment:4 by , 9 years ago
It seems that this nightly is not really up-to-date, due to the usual failure of the OM_WIN_NIGHTLY_BUILD job.
I'll restart it and I'll check again
comment:5 by , 9 years ago
I tried OMEdit v1.9.4-dev-507-g62c0c86 with OMC v1.9.4-dev.beta2-83-g769e528. This should contain all your commits to master so far.
I still have the same problem as in comment:3
Please check with the latest nightly, maybe there is something wrong in the installation package for Windows.
comment:6 by , 9 years ago
Unfortunately I still can't reproduce it. I downloaded OpenModelica-v1.9.4-dev.beta2-120-g09c0222.exe the latest nightly build available at the moment and installed it on my virtual box. OMEdit v1.9.4-dev-507-g62c0c86 with OMC v1.9.4-dev.beta2-83-g769e528. So I have the same version as yours.
I again made a small screencast http://www.ida.liu.se/~adeas31/2016-03-02_Ticket3723.swf
comment:7 by , 9 years ago
I tried with 1.9.4beta2 under Windows 7. Hit Save (see description above) generates the following file C.mo in the Test folder:
within Test; model C annotation(Icon, Diagram); end C;
comment:8 by , 9 years ago
Retried once more with a clean copy of the package I got from the attachment.
The package.mo file is no longer removed when I select Test and hit Save. However, I can't see any C.mo file.
Rueediger, can you be more specific on the specific revision of omc and omedit are using?
Thanks
comment:9 by , 9 years ago
So basically you are having the same issue you reported in the ticket description. Can you provide your %TEMP%/OpenModelica/OMEdit/omeditcommunication.log
file?
by , 9 years ago
Attachment: | omeditcommunication.zip added |
---|
follow-up: 12 comment:10 by , 9 years ago
Alright I can see the difference between yours and my log files but somehow I can't produce it. Could you again make a video with exact steps? Also do you have any Test.mo at the same location?
follow-up: 14 comment:11 by , 9 years ago
I think you have Test.C
as file in your working directory.
comment:12 by , 9 years ago
Replying to adeas31:
Alright I can see the difference between yours and my log files but somehow I can't produce it. Could you again make a video with exact steps?
http://screencast.com/t/ceIYPTDksFC
Also do you have any Test.mo at the same location?
No, as you can see in the video.
follow-up: 15 comment:13 by , 9 years ago
As far as I can see from your video you don't have the latest nightly build:
https://build.openmodelica.org/omc/builds/windows/nightly-builds/
Latest version: OpenModelica-v1.9.4-dev.beta2-120
Your version: OpenModelica-v1.9.4-dev.beta2-83
follow-up: 16 comment:14 by , 9 years ago
Replying to adeas31:
I think you have
Test.C
as file in your working directory.
Yes! I removed it, and everything started to work as expected. Pretty hard to find out myself :)
Why should this happen? Is it a bug or a feature?
follow-up: 17 comment:15 by , 9 years ago
Replying to adrpo:
As far as I can see from your video you don't have the latest nightly build:
https://build.openmodelica.org/omc/builds/windows/nightly-builds/
Latest version: OpenModelica-v1.9.4-dev.beta2-120
Your version: OpenModelica-v1.9.4-dev.beta2-83
This is a bit misleading: it is not OpenModelica v1.9.4-dev.beta2-83, but rather OMCompiler v1.9.4-dev.beta2-83, that is https://github.com/OpenModelica/OMCompiler/commit/769e528bb8fff75a44a90435087c590ba8c3ba8b
Adeel, would you mind changing "Connected to OpenModelica" to "Connected to OMC"?
comment:16 by , 9 years ago
Replying to casella:
Replying to adeas31:
I think you have
Test.C
as file in your working directory.
Yes! I removed it, and everything started to work as expected. Pretty hard to find out myself :)
Why should this happen? Is it a bug or a feature?
Well I was using QFile::exists("Test.C")
to check if we already have a valid file to save contents into and Qt is trying to be over intelligent and thinks its a relative path from the working directory. So the file contents are actually being saved into your %TEMP%/OpenModelica/OMEdit/Test.C
.
comment:17 by , 9 years ago
Replying to casella:
Replying to adrpo:
As far as I can see from your video you don't have the latest nightly build:
https://build.openmodelica.org/omc/builds/windows/nightly-builds/
Latest version: OpenModelica-v1.9.4-dev.beta2-120
Your version: OpenModelica-v1.9.4-dev.beta2-83
This is a bit misleading: it is not OpenModelica v1.9.4-dev.beta2-83, but rather OMCompiler v1.9.4-dev.beta2-83, that is https://github.com/OpenModelica/OMCompiler/commit/769e528bb8fff75a44a90435087c590ba8c3ba8b
Adeel, would you mind changing "Connected to OpenModelica" to "Connected to OMC"?
I can't change it. It is coming from getVersion()
which returns something like OpenModelica xxx-xx-xxxx
comment:18 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
Now I have fixed it in 6830f82/OMEdit.
You forgot to attach the file.