#5565 closed defect (fixed)
OMEdit generates bogus warnings about missing inner declarations when opening MultiBody models
Reported by: | casella | Owned by: | adrpo |
---|---|---|---|
Priority: | blocker | Milestone: | 1.14.0 |
Component: | NF API | Version: | |
Keywords: | Cc: | adrpo, perost |
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)
comment:1 follow-up: ↓ 2 Changed 5 years ago by adrpo
comment:2 in reply to: ↑ 1 Changed 5 years ago by casella
- Owner changed from adeas31 to adrpo
- Status changed from new to 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 Changed 5 years ago by adrpo
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 Changed 5 years ago by casella
I still wonder why the compiler complains about the missing world component. Isn't it there?
comment:5 follow-up: ↓ 6 Changed 5 years ago by adrpo
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 in reply to: ↑ 5 Changed 5 years ago by casella
Replying to adrpo:
Because is not for that model those messages are reported, they are reported for:
Modelica.Mechanics.MultiBody.Parts and Modelica.Mechanics.MultiBody.Interfaces.
OK, I see. Then, it's a good idea to just suppress them for good, as you suggested.
comment:7 Changed 5 years ago by adeas31
- Component changed from OMEdit to NF API
comment:8 Changed 5 years ago by adrpo
- Component changed from NF API to OMEdit
Should be fixed by PR: https://github.com/OpenModelica/OpenModelica/pull/323
Probably some tests need updates, we'll see which.
comment:9 Changed 5 years ago by adrpo
- Component changed from OMEdit to NF API
- Resolution set to fixed
- Status changed from assigned to closed
comment:10 Changed 5 years ago by casella
Very nice, no more bogus warnings :)
comment:11 Changed 5 years ago by casella
- Resolution fixed deleted
- Status changed from closed to 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 Changed 5 years ago by adrpo
- Resolution set to fixed
- Status changed from reopened to closed
Fixed in a42b26/OpenModelica.
comment:13 Changed 5 years ago by casella
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 Changed 5 years ago by casella
- Resolution fixed deleted
- Status changed from closed to reopened
comment:15 Changed 5 years ago by adrpo
Fixed in 03cf86/OpenModelica.
comment:16 Changed 5 years ago by adrpo
- Resolution set to fixed
- Status changed from reopened to closed
comment:17 Changed 5 years ago by casella
Double-checked, all's fine :)
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.