Flexsim hangs when compiling Flexscript

Flexsim hangs when compiling Flexscript

sastanin
Advocate Advocate
25 Views
2 Replies
Message 1 of 3

Flexsim hangs when compiling Flexscript

sastanin
Advocate
Advocate

[ FlexSim 17.0.2 ]

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.
}
0 Likes
Accepted solutions (1)
26 Views
2 Replies
Replies (2)
Message 2 of 3

Matthew_Gillespie
Autodesk
Autodesk
Accepted solution

Thanks for pointing this out. The best way to submit bug reports like this is to email the developers at dev@flexsim.com.

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

How do I submit feature requests or bug reports?



Matthew Gillespie
FlexSim Software Developer

Message 3 of 3

Matthew_Gillespie
Autodesk
Autodesk

This has been fixed for 17.0.4.



Matthew Gillespie
FlexSim Software Developer

0 Likes