Opened 8 years ago
Closed 6 years ago
#4240 closed defect (fixed)
Duplicate of model fails
Reported by: | Owned by: | Per Östlund | |
---|---|---|---|
Priority: | high | Milestone: | 2.0.0 |
Component: | Interactive Environment | Version: | |
Keywords: | Cc: | Adeel Asghar |
Description
I discovered a reproducible fault when duplicating a model. Please download the actual version of PhotoVoltaics.mo
from https://github.com/christiankral/PhotoVoltaics and make a right click on PhotoVoltaics.Examples.SimpleModuleShadow
and pick *Duplicate*. Select the new name SimpleModuleShadow2
and let path empty. Then the error message
Unable to create class SimpleModuleShadow2. Please make sure you are not using any OpenModelica Keywords like (model, package, record, class etc.)
is triggered.
This issue applies to
OMEdit 1.12.0~dev-154-g354a8d1 Connected to OpenModelica 1.12.0~dev-319-gfacdc24 Linux Mint 18.1 64bit
Attachments (3)
Change History (16)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
I checked with
OMEdit 1.12.0~dev-162-g418a7cd Connected to OpenModelica 1.12.0~dev-352-g0d2d832 Linux Mint 18.1, 64bit
and the issue still remains...
comment:3 by , 8 years ago
I have asked Per to test it and he is also unable to reproduce the issue on his Linux machine. So I need more information. Can you send me the omeditcommunication.log
(it's located in your working directory) file?
- Run OMEdit.
- Duplicate the class.
- Quit OMEdit (so that the file is flushed properly).
- Send the
omeditcommunication.log
file.
follow-up: 6 comment:5 by , 8 years ago
Cc: | added |
---|
Can you run the attached script and post the output?
Per, copyClass
is failing without setting any error message.
by , 8 years ago
Attachment: | PhotoVoltaics.mos added |
---|
comment:6 by , 8 years ago
Replying to adeas31:
Can you run the attached script and post the output?
Per,
copyClass
is failing without setting any error message.
The output for me is:
true "" true "" {PhotoVoltaics,ModelicaServices,Complex,Modelica} "" true "" {SimpleModuleShadow2,PhotoVoltaics,ModelicaServices,Complex,Modelica} ""
I.e. it's working fine for me. Same result with omc from a week ago and with current master, and the latest version of PhotoVoltaics from the link in the description.
comment:7 by , 8 years ago
Yeah I know. Even I am getting the same output. I want Christian Kral to run this script. Since its failing for him for some reason. Look at his attached omeditcommunication.log
.
comment:8 by , 8 years ago
I opened OMShell and started the script and got the following results:
runScript("PhotoVoltaics.mos") "true \"\" true \"\" {PhotoVoltaics,ModelicaServices,Complex,Modelica} \"\" false \"\" {PhotoVoltaics,ModelicaServices,Complex,Modelica} \"\" "
comment:9 by , 8 years ago
Cc: | added; removed |
---|---|
Component: | OMEdit → Interactive Environment |
Owner: | changed from | to
Status: | new → assigned |
I really don't know why copyClass
failing for you.
comment:10 by , 6 years ago
Milestone: | Future → 2.0.0 |
---|
comment:11 by , 6 years ago
Suggested by #5346: I tried copying class with
OMEdit 1.14.0~dev-56-ge76522f Connected to OpenModelica 1.14.0~dev-387-g16b0256 Connected to OMSimulator unknown-linux
on my Linux 19.1 machine and no issues occurred. So the issue seems to be fixed.
Applying runScript("PhotoVoltaics.mos")
shows the following result:
>> runScript("PhotoVoltaics.mos") "true \"\" true \"\" {PhotoVoltaics,ModelicaServices,Complex,Modelica} \"\" true \"\" {SimpleModuleShadow2,PhotoVoltaics,ModelicaServices,Complex,Modelica} \"\" "}}}
comment:12 by , 6 years ago
@christian, feel free to close the ticket if you think the issue is resolved :)
comment:13 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I suppose this ticket is resolved now.
I tested it with,
and it worked fine.
I guess it is already fixed by this commit 0c832da/OMEdit.
Can you update and try again?