question

Serge A avatar image
0 Likes"
Serge A asked Matthew Gillespie commented

Flexsim hangs when compiling Flexscript

Flexsim completely freezes when compiling Flexscript if there is a function-like macro and the name of the local non-existent variable is the same as the name of the macro parameter:

#define foo(x) (x)

// return foo(1); // OK.
// return foo(undefined); // OK. Compilation error.
return foo(x); // BUG. Flexsim freezes.

Flexsim becomes unresponsive, but continues running and allocates more and more memory over time. If there was any work in progress (a model), it cannot be saved.

Creating a local variable with the same name or using a local scope is not helpful. It appears that macro parameters use the same namespace as the local variables and take precedence over them.

#define foo(x) (x)
{
    int x = 3;
    return foo(x); // BUG. Flexsim freezes.
}
FlexSim 17.0.2
flexscriptbugmacro
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Matthew Gillespie avatar image
2 Likes"
Matthew Gillespie answered Matthew Gillespie commented

Thanks for pointing this out. The best way to submit bug reports like this is to email the developers at [email protected].

This article discusses best practices for submitting bug reports and feature requests.

How do I submit feature requests or bug reports?

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Matthew Gillespie avatar image Matthew Gillespie ♦♦ commented ·

This has been fixed for 17.0.4.

0 Likes 0 ·