FlexScript exception message

FlexScript exception message

sung_k2
Not applicable
76 Views
7 Replies
Message 1 of 8

FlexScript exception message

sung_k2
Not applicable

[ FlexSim 23.1.1 ]

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?


0 Likes
Accepted solutions (1)
77 Views
7 Replies
Replies (7)
Message 2 of 8

jason_lightfootVL7B4
Autodesk
Autodesk
Do you have an invalid watch expression define?
0 Likes
Message 3 of 8

sung_k2
Not applicable
Hi, Jason,

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


Thanks.

0 Likes
Message 4 of 8

julie_weller
Not applicable
Accepted solution

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.

0 Likes
Message 5 of 8

sung_k2
Not applicable
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
Message 6 of 8

julie_weller
Not applicable

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
Message 7 of 8

sung_k2
Not applicable
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
Message 8 of 8

julie_weller
Not applicable
Okay! Please comment back if you figure out what the problem is or you want more help
0 Likes