question

Charlie C2 avatar image
1 Like"
Charlie C2 asked Charlie C2 commented

Flexsim crashing when inputting more commas in binding method

For the bound method that will be applied in Flexsim software, if the number of input commas(",") exceeds the number of binding method parameters, the Flexsim software will crash. For example, if the number of pass-in parameters for the method (bound by bindInterface()) is 3, while the number of input commas is equal to or more than 3, Flexsim software will crash unexpectedly. I wonder how can I solve this sort of unexpected problem? Much thanks for reply!

FlexSim 22.0.0
flexsim22bindinterfaceinput commas
· 5
5 |100000

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

CSN avatar image CSN commented ·

FlexSim has strict code rules. When an unexpected error occurs, an error message is usually prompted, and the error part of the prompt can be changed.

1656308904699.png

0 Likes 0 ·
1656308904699.png (28.8 KiB)
Charlie C2 avatar image Charlie C2 CSN commented ·

Hello, much thanks for your reply!

For the existing functions in Flexsim like d-uniform distribution calculation as you mentioned, an error message is indeed prompted if I input redundant characters. However, when I bind a certain method by means of bindInterface in VisualStudio or so, and then apply it in Flexsim, if one more comma is typed carelessly, Flexsim software will crash and close immediately. So I want to know what is the reason for it.

0 Likes 0 ·
Joerg Vogel avatar image Joerg Vogel commented ·

Error handling on parsing wrong parameters and amount on custom run built routines. A compiler problem? Is it because separator character is not distinguishable between Routine declaration and standard code evaluation.

0 Likes 0 ·
Charlie C2 avatar image Charlie C2 Joerg Vogel commented ·

Hello, thanks for your attention. It is not a compiling problem. For the existing functions in Flexsim like d-uniform or triangular distribution calculation, an error message is prompted if I input redundant characters. However, when I bind a certain method by means of bindInterface in VisualStudio or so, and then try to apply it in Flexsim, if one more comma is typed carelessly, Flexsim software will crash and close immediately. For instance,the bound method is vehicle.getEndSpeed(double startSpeed, double acceleration, double time), if I input as: vehicle.getEndSpeed(0.0, 3.0, 5, ) with one more redundant comma, Flexsim may crash at once.

0 Likes 0 ·
Jordan Johnson avatar image Jordan Johnson ♦♦ commented ·

Can you provide your C++ function declaration and your bindMethod() statement? Also, when does FlexSim crash? As the application starts? When you are typing in FlexScript? Or when your method actually gets called?

0 Likes 0 ·

1 Answer

Jordan Johnson avatar image
1 Like"
Jordan Johnson answered

I am able to confirm this is a bug. I was able to make a module to reproduce the issue, and it's on the dev list to fix it.

5 |100000

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