#5565 closed defect (fixed)
OMEdit generates bogus warnings about missing inner declarations when opening MultiBody models
Reported by: | Francesco Casella | Owned by: | Adrian Pop |
---|---|---|---|
Priority: | blocker | Milestone: | 1.14.0 |
Component: | NF API | Version: | |
Keywords: | Cc: | Adrian Pop, Per Östlund |
Description
Steps to reproduce:
- Start OMEdit
- Open Modelica.Multibody.Examples.Elementary.SpringDamperSystem
The following warnings are reported
[1] 22:59:19 Translation Warning [Modelica.Mechanics.MultiBody.Parts: 765:5-765:51]: An inner declaration for outer component world could not be found and was automatically generated. [2] 22:59:20 Translation Warning [Modelica.Mechanics.MultiBody.Parts: 215:5-215:51]: An inner declaration for outer component world could not be found and was automatically generated. [3] 22:59:20 Translation Warning [Modelica.Mechanics.MultiBody.Interfaces: 416:5-416:51]: An inner declaration for outer component world could not be found and was automatically generated. [4] 22:59:20 Translation Warning [Modelica.Mechanics.MultiBody.Interfaces: 416:5-416:51]: An inner declaration for outer component world could not be found and was automatically generated. [5] 22:59:20 Translation Warning [Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: An inner declaration for outer component world could not be found and was automatically generated. [6] 22:59:21 Translation Warning [Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: An inner declaration for outer component world could not be found and was automatically generated. [7] 22:59:21 Translation Warning [Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: An inner declaration for outer component world could not be found and was automatically generated. [8] 22:59:21 Translation Warning [Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: An inner declaration for outer component world could not be found and was automatically generated. [9] 22:59:21 Translation Warning [Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: An inner declaration for outer component world could not be found and was automatically generated. [10] 22:59:21 Translation Warning [Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: An inner declaration for outer component world could not be found and was automatically generated.
The following notifications are also reported:
[1] 22:59:19 Translation Notification [Modelica.Mechanics.MultiBody.Parts: 765:5-765:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world component with the default gravity field will be used (g=9.81 in negative y-axis). If this is not desired, drag Modelica.Mechanics.MultiBody.World into the top level of your model. [2] 22:59:20 Translation Notification [Modelica.Mechanics.MultiBody.Parts: 215:5-215:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world component with the default gravity field will be used (g=9.81 in negative y-axis). If this is not desired, drag Modelica.Mechanics.MultiBody.World into the top level of your model. [3] 22:59:20 Translation Notification [Modelica.Mechanics.MultiBody.Interfaces: 416:5-416:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world component with the default gravity field will be used (g=9.81 in negative y-axis). If this is not desired, drag Modelica.Mechanics.MultiBody.World into the top level of your model. [4] 22:59:20 Translation Notification [Modelica.Mechanics.MultiBody.Interfaces: 416:5-416:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world component with the default gravity field will be used (g=9.81 in negative y-axis). If this is not desired, drag Modelica.Mechanics.MultiBody.World into the top level of your model. [5] 22:59:20 Translation Notification [Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world component with the default gravity field will be used (g=9.81 in negative y-axis). If this is not desired, drag Modelica.Mechanics.MultiBody.World into the top level of your model. [6] 22:59:21 Translation Notification [Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world component with the default gravity field will be used (g=9.81 in negative y-axis). If this is not desired, drag Modelica.Mechanics.MultiBody.World into the top level of your model. [7] 22:59:21 Translation Notification [Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world component with the default gravity field will be used (g=9.81 in negative y-axis). If this is not desired, drag Modelica.Mechanics.MultiBody.World into the top level of your model. [8] 22:59:21 Translation Notification [Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world component with the default gravity field will be used (g=9.81 in negative y-axis). If this is not desired, drag Modelica.Mechanics.MultiBody.World into the top level of your model. [9] 22:59:21 Translation Notification [Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world component with the default gravity field will be used (g=9.81 in negative y-axis). If this is not desired, drag Modelica.Mechanics.MultiBody.World into the top level of your model. [10] 22:59:21 Translation Notification [Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world component with the default gravity field will be used (g=9.81 in negative y-axis). If this is not desired, drag Modelica.Mechanics.MultiBody.World into the top level of your model.
These messages are totally bogus, since the model indeed contains an inner World world
declaration. As usual, this gives an impression of overall sloppiness.
Is it possible to get rid of them?
Change History (17)
follow-up: 2 comment:1 by , 5 years ago
comment:2 by , 5 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
Replying to adrpo:
I let the -d=nfAPI show all the errors and warnings so we can catch issues.
You mean issues with the NF API or issues with the model. In this case, the model should have no issues at all...
I will suppress them and one could re-show them using -d=nfAPINoise.
OK
comment:3 by , 5 years ago
The errors you are seeing are from fetching all the class information, annotations, type of components, inherited classes. Yes, the model would not give these errors but these are from gathering all the information. You could have a look in the omeditcommunication log to see where they are actually coming from, from which API call.
comment:4 by , 5 years ago
I still wonder why the compiler complains about the missing world
component. Isn't it there?
follow-up: 6 comment:5 by , 5 years ago
Because is not for that model those messages are reported, they are reported for:
Modelica.Mechanics.MultiBody.Parts
and Modelica.Mechanics.MultiBody.Interfaces
.
comment:6 by , 5 years ago
Replying to adrpo:
Because is not for that model those messages are reported, they are reported for:
Modelica.Mechanics.MultiBody.Parts
andModelica.Mechanics.MultiBody.Interfaces
.
OK, I see. Then, it's a good idea to just suppress them for good, as you suggested.
comment:7 by , 5 years ago
Component: | OMEdit → NF API |
---|
comment:8 by , 5 years ago
Component: | NF API → OMEdit |
---|
Should be fixed by PR: https://github.com/OpenModelica/OpenModelica/pull/323
Probably some tests need updates, we'll see which.
comment:9 by , 5 years ago
Component: | OMEdit → NF API |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
comment:11 by , 5 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Unfortunately, I still get some bogus messages:
[1] 11:00:45 Translation Avvertimento [Modelica.Mechanics.MultiBody.Parts: 215:5-215:51]: An inner declaration for outer component world could not be found and was automatically generated. [2] 11:00:45 Translation Notification [Modelica.Mechanics.MultiBody.Parts: 215:5-215:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world component with the default gravity field will be used (g=9.81 in negative y-axis). If this is not desired, drag Modelica.Mechanics.MultiBody.World into the top level of your model.
when opening Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic
.
comment:12 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
Fixed in a42b26/OpenModelica.
comment:13 by , 5 years ago
More bogus messages: opening Modelica.Fluid.Examples.HeatingSystems gives:
[1] 23:23:07 Translation Error [Modelica.Fluid.Machines: 400:5-400:82]: Medium is partial, name lookup is not allowed in partial classes. [2] 23:23:07 Translation Error [Modelica.Fluid.Machines: 400:5-400:82]: Medium is partial, name lookup is not allowed in partial classes.
comment:14 by , 5 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:16 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
I let the -d=nfAPI show all the errors and warnings so we can catch issues. I will suppress them and one could re-show them using -d=nfAPINoise.