question

Sung K2 avatar image
0 Likes"
Sung K2 asked Julie Weller commented

FlexScript exception message

User of v23.1.1.

Anybody has an idea about

exception: FlexScript exception: MAIN:/project/exec/globals/Debugger/onUpdate


Not sure what I did wrong but it happens when I touch a global table while I step through my script. Scrolling up/down seems ok, but if I click anywhere else, it complains about it. The tricky thing is not always happened. It seems like randomly happens to me (of course I did something wrong but not remember??)

Remedy I found so far.
Close the script window and reset and rerun the script. It fairly annoys me. Anyone knows the root cause?


FlexSim 23.1.1
exception errorflexsim scriptdebugger
· 2
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·
Do you have an invalid watch expression define?
0 Likes 0 ·
Sung K2 avatar image Sung K2 Jason Lightfoot ♦ commented ·
Hi, Jason,

What is "Invalid Watch Expression"?
How do I check it if I did or not?


Thanks.

0 Likes 0 ·

1 Answer

·
Julie Weller avatar image
0 Likes"
Julie Weller answered Julie Weller commented

Hi @Sung K2! The exception MAIN:/project/exec/globals/Debugger/onUpdate," indicates that an error occurred in the FlexScript code within the "onUpdate" function of the "Debugger" object in the "globals" folder of the "exec" folder in your FlexSim project.

The "onUpdate" function is typically used to define actions or behaviors that should occur repeatedly at regular intervals during the simulation.

To resolve the exception, you should review the code in the "onUpdate" function and identify the cause of the error. Common reasons for this type of exception include syntax errors, undefined variables or functions, incorrect data types, or logic errors in the code.

Carefully examine the code in the "onUpdate" function and check for any mistakes or inconsistencies. Additionally, review the surrounding code and any relevant documentation or guidelines to ensure that the code is structured correctly and follows the expected syntax and conventions.

If you want more detailed help, I would upload a model and we can take a look at it and see if we can replicate the issue.

· 4
5 |100000

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

Sung K2 avatar image Sung K2 commented ·
Hi, Julie,

I didn't even touch or write the "onUpdate" script. I checked the codes through the tree, and it seems like it is FlexSim default codes or automatically generated. I don't see anything has to do with my logic. The codes seem like controlling "Debugger" views or responses during the debugging process. If this is true, I don't want to mess with this "already-prepared" codes. I am sorry but I don't understand your suggestion of reviewing the codes that I didn't write.
BTW, I found the EXACT identical codes for the "onUpdate" from a blank model. It is obvious that the codes are prepared by FlexSim.

0 Likes 0 ·
Julie Weller avatar image Julie Weller Sung K2 commented ·

Do you want to upload your model that you're working with right now? I think that would be the easiest way to debug this issue.

Proprietary models can be posted as a private question visible only to FlexSim U.S. support staff. You can also contact your local FlexSim distributor for phone or email help.

0 Likes 0 ·
Sung K2 avatar image Sung K2 Julie Weller commented ·
Thanks for your suggestion.

I will try to contact FlexSim support later.

Since the reset and rerun without touching any global tables can fix the problem for now, I may need to use this walk-around(?) method to finish my work on time first.

Thank you again for your consideration.

0 Likes 0 ·
Show more comments

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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