Opened 5 years ago

Closed 5 years ago

#5876 closed defect (invalid)

Weird problem with lookup depending on the version of the OS

Reported by: Francesco Casella Owned by: somebody
Priority: blocker Milestone: 1.16.0
Component: *unknown* Version:
Keywords: Cc: Andrea Bartolini

Description

Please consider the attached MWE, and try to compile model TestPackage.S2 with the latest nightly build.

Different outcomes are obtained depending on the OS

  • Windows 10: success
  • Windows 7: lookup error
  • Linux Ubuntu: lookup error

This is quite weird, probably due to some variable left un-initialized. Please check.

Attachments (1)

TestPackage.mo (920 bytes ) - added by Francesco Casella 5 years ago.

Download all attachments as: .zip

Change History (7)

by Francesco Casella, 5 years ago

Attachment: TestPackage.mo added

comment:1 by Per Östlund, 5 years ago

Are you sure you're using the new frontend in all cases? The model flattens just fine for me on Arch Linux when using the NF, and valgrind didn't indicate that anything was wrong. Using the OF gives the following error though:

[TestPackage.mo:32:3-32:25] Error: Variable Medium.Ns not found in scope TestPackage.M$m.

The NF will never give an error like above where the scope has an $ in it, so if that's the error you're getting you're using the OF.

If this is not the case it would be helpful if you could write down the error message you're getting.

in reply to:  1 comment:2 by Francesco Casella, 5 years ago

Cc: Andrea Bartolini added

Replying to perost:

Are you sure you're using the new frontend in all cases?

I guess so, it should be the default choice in OMEdit, we'll double-check that. Maybe for some reason the fallback case was activated.

The model flattens just fine for me on Arch Linux when using the NF, and valgrind didn't indicate that anything was wrong. Using the OF gives the following error though:

[TestPackage.mo:32:3-32:25] Error: Variable Medium.Ns not found in scope TestPackage.M$m.

The NF will never give an error like above where the scope has an $ in it, so if that's the error you're getting you're using the OF.

If this is not the case it would be helpful if you could write down the error message you're getting.

@Andrea.Bartolini will do that ASAP

comment:3 by Andrea Bartolini, 5 years ago

Resolution: fixed
Status: newclosed

Using NF and checking S2 model...

Under Linux Ubuntu 18.04 with OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.14.1

[1] 08:11:27 Scripting Notification
Check of TestPackage.S2 completed successfully.

Under Linux Ubuntu 18.04 with OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.16.0~dev-210-g53a3f5f

[1] 08:25:13 Scripting Notification
Check of TestPackage.S2 completed successfully.

Under win7 with OMEdit - OpenModelica Connection Editor
Connected to OpenModelica v1.16.0-dev-208-gb567bd23a (64-bit)

[1] 08:16:36 Scripting Notification
Check of TestPackage.S2 completed successfully.

Please consider that I made a clean installation of OpenModelica under win7, and the option Enable old frontend for code generation was set ON by default...
... maybe this was saved somwhere in win (registry???), but IMHO the OpenModelica uninstaller should clean-up all deep-settings, or in alternative the installer should ask about using previous version settings...

Sorry and apologize for the unnecessary ticket...

Last edited 5 years ago by Andrea Bartolini (previous) (diff)

comment:4 by Adrian Pop, 5 years ago

The settings are saved in %APPDATA%/openmodelica/omedit.ini
The file is not removed by uninstall, but maybe we should have an option to do that.

comment:5 by Francesco Casella, 5 years ago

Resolution: fixed
Status: closedreopened

In fact I had some vague suspect this was the issue.

There are pro's and con's of keeping or scrapping the settings at each new installation. However, we already have an option in OMEdit to reset all options to factory settings, there is a Reset button in the Options window for that purpose. I guess it should be enough.

comment:6 by Francesco Casella, 5 years ago

Resolution: invalid
Status: reopenedclosed
Note: See TracTickets for help on using tickets.