Opened 4 years ago

Closed 4 years ago

#6394 closed defect (fixed)

Selecting Parameters causes ThreeTanks to hang with "Enable Replaceable Support" enabled

Reported by: openmodelica@… Owned by: Adrian Pop
Priority: high Milestone: 1.16.5
Component: OMEdit Version: 1.18.0-dev
Keywords: Parameters, Hang, Replaceable Support Cc: Adeel Asghar, Andrea Bartolini

Description

I updated to the daily build this morning and found that selecting Parameters caused the ThreeTanks example in Modelica/Fluid/Examples/Tanks to hang. OMEdit runs at over 100% with no progress. Turning off "Enable Replaceable Support" results in the Parameters for tank2 quickly being displayed. The attached screen shot shows what I see.

Running on
Linux jenkins 4.19.0-14-amd64 #1 SMP Debian 4.19.171-2 (2021-01-30) x86_64 GNU/Linux

ii  drmodelica                                                  1.18.0~dev-65-g9ac6586-1                   all          An OMNotebook course in the Modelica language
ii  libomc:amd64                                                1.18.0~dev-65-g9ac6586-1                   amd64        The OpenModelica Compiler lib dependencies
ii  libomcsimulation:amd64                                      1.18.0~dev-65-g9ac6586-1                   amd64        The OpenModelica Compiler simulation library dependencies
ii  libomplot:amd64                                             1.18.0~dev-65-g9ac6586-1                   amd64        Plot tool for OpenModelica, lib dependencies
ii  libomsimulator:amd64                                        1.18.0~dev-65-g9ac6586-1                   amd64        The OpenModelica OMSimulator library dependencies
ii  omc                                                         1.18.0~dev-65-g9ac6586-1                   amd64        The OpenModelica Compiler
ii  omc-common                                                  1.18.0~dev-65-g9ac6586-1                   all          The OpenModelica Compiler lib dependencies
ii  omc-doc                                                     1.14.0~dev-406+g26ce2d8-1                  all          Documentation for OpenModelica
ii  omedit                                                      1.18.0~dev-65-g9ac6586-1                   amd64        A Modelica connection editor for OpenModelica
ii  omlib-complex-3.2.3                                         3.2.3~20210205~134043~git~OM~maint~3.2.3-1 all          Complex 3.2.3 is a Modelica library
ii  omlib-modelica-3.2.3                                        3.2.3~20210205~134043~git~OM~maint~3.2.3-1 all          Modelica 3.2.3 is a Modelica library
ii  omlib-modelicabyexample-0.5.0                               0.5.0~154~g6044b75-1                       all          ModelicaByExample 0.5.0 is a Modelica library
ii  omlib-modelicareference                                     20210205~134043~git~OM~maint~3.2.3-1       all          ModelicaReference is a Modelica library
ii  omlib-modelicaservices-3.2.3                                3.2.3~20210205~134043~git~OM~maint~3.2.3-1 all          ModelicaServices 3.2.3 is a Modelica library
ii  omnotebook                                                  1.18.0~dev-65-g9ac6586-1                   amd64        A Mathematica-style Notebook for OpenModelica
ii  omplot                                                      1.18.0~dev-65-g9ac6586-1                   amd64        Plot tool for OpenModelica
ii  omshell                                                     1.18.0~dev-65-g9ac6586-1                   amd64        A text-based interface to OpenModelica (based on Qt)
ii  omshell-terminal                                            1.18.0~dev-65-g9ac6586-1                   amd64        A text-based interface to OpenModelica (based on readline)
ii  openmodelica                                                1.18.0~dev-65-g9ac6586-1                   amd64        A complete Modelica environment

Attachments (1)

Screenshot_2021-02-23_08-21-48_3tanks_parameters.png (50.1 KB ) - added by openmodelica@… 4 years ago.
ThreeTanks Fluid Example Rendering Errors

Download all attachments as: .zip

Change History (20)

by openmodelica@…, 4 years ago

ThreeTanks Fluid Example Rendering Errors

comment:1 by Francesco Casella, 4 years ago

Cc: Adeel Asghar Andrea Bartolini added
Owner: changed from Adeel Asghar to Adrian Pop
Status: newassigned

@openmodelica, I tried it on the latest Windows nightly and it works for me.

@Andrea, can you please check this on your Ubuntu installation?

comment:2 by openmodelica@…, 4 years ago

Selecting Parameters inside the Modelica.Electrical.Digital.Examples.Adder4 model works fine with "Enable Replaceable Support" enabled works fine. It appears that the problematic behavior is associated with using the Fluid library.

in reply to:  1 comment:3 by Andrea Bartolini, 4 years ago

Replying to casella:

@openmodelica, I tried it on the latest Windows nightly and it works for me.

@Andrea, can you please check this on your Ubuntu installation?

I confirm the issue on Ubuntu 18.04
By disabling the replaceable support the issue disappears.

OMEdit - OpenModelica Connection Editor
Connected to OpenModelica 1.18.0~dev-65-g9ac6586

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

comment:4 by Francesco Casella, 4 years ago

OMG. Yet another size_t issue?

comment:5 by Francesco Casella, 4 years ago

@adrpo, could some of your latest fixes to 1.16.4 have risen such an issue?

comment:6 by Adrian Pop, 4 years ago

I can reproduce this on master with Windows. As far as I debugged it is not a size issue. It is not stuck, it just takes a really long time. On a first look it seems like OMEdit is not setting -d=nfAPI properly, maybe a bug because the flag was moved?
Strange thing is that the log file is now missing some OMC calls, I will talk with Adeel about it as I know he played with filtering this.

comment:7 by Adeel Asghar, 4 years ago

I haven't done any filtering yet but yes the flag move might be related to it. I will debug it tomorrow.

comment:8 by Francesco Casella, 4 years ago

OK, good luck with that!

comment:9 by Adeel Asghar, 4 years ago

This should be fixed with PR#7215.

comment:10 by Francesco Casella, 4 years ago

Very good! Does this mean we need to push it to 1.16.5? I guess so...

comment:11 by Adeel Asghar, 4 years ago

Yes. See PR#7217.

comment:12 by Francesco Casella, 4 years ago

Milestone: NeedsInput1.16.5

comment:13 by Adrian Pop, 4 years ago

If OMEdit did not set -d=nfAPI since the setting was moved on the general page then we will need to re-check *all* the tickets that we closed for 1.16.4.

I tried the PR, for me OMEdit still doesn't set -d=nfAPI.

comment:14 by Francesco Casella, 4 years ago

See also PR 7216 for 1.17.0

comment:15 by Adrian Pop, 4 years ago

Tested PR 7218 and this bug is fixed with it.

Last edited 4 years ago by Francesco Casella (previous) (diff)

comment:16 by Adrian Pop, 4 years ago

Please add the changes in PR 7218 to PR 7216 and make a new one for maintenance/1.16.

Last edited 4 years ago by Francesco Casella (previous) (diff)

comment:17 by Francesco Casella, 4 years ago

In the meantime I'll make a new 1.18.0-dev nightly and test it

in reply to:  16 comment:18 by Francesco Casella, 4 years ago

Replying to adrpo:

Please add the changes in PR 7218 to PR 7216

Done, see the merged in PR 7216.

comment:19 by Adrian Pop, 4 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.