question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Jeanette F commented

Model is crashing?

Hi Team,

I am using this condition to print some statistics at the end. But my model is cashing due to it.

1660634975525.png

What is going wrong here?

Thank you!

FlexSim 21.0.10
crashconditionmodel time
1660634975525.png (4.5 KiB)
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Ankur A3, was Felix Möhlmann's answer helpful? If so, please click the "Accept" button at the bottom of their answer. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always unaccept and comment back to reopen your question.

0 Likes 0 ·

1 Answer

·
Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

Could you provide some more information?

- In what context/position are you using that code?
- Are you sure that this is what is causing the crash?
- Could you post the code that would normally be run in the condition? (You can of course alter any variable/table/statistic names)

I can't replicate the issue. When I put your expression into the model OnRunStop trigger and set a stop time at the specified time, nothing happens (as expected).

1660637839197.png


1660637839197.png (54.3 KiB)
· 3
5 |100000

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

Ankur A3 avatar image Ankur A3 commented ·
Hi @Felix Möhlmann,

I am having this code in user event which is occurring every 10080.00 mins. I think there is combination of events creating this issue. But error started occurring after using this code only and it is persisting even after disabling this code. I am not sure how to debug in this case.

Even I can't replicate same issue with standalone code in fresh model.

I am still checking what is causing it. It will be good if you can provide some debugging steps based on your experience.

Thank you!


0 Likes 0 ·
Felix Möhlmann avatar image Felix Möhlmann Ankur A3 commented ·

Crashes without prior error message could be caused by accidentally building an infinite loop somewhere in the logic. In that case FlexSim would first become unresponsive before closing after a couple of seconds. While it is unresponsive you might still be able to abort the model run by hitting Ctrl + Pause.

Generally, try to determine when exactly the crash occurs by moving the time close to when it happens and step through the events one at a time (with the event list open).

Once you have a guess as to which code might cause the issue put a debug break at the start and step through the code line by line. This can also be used to identify a loop. If the code is executed again immediatly after it complete, it might be triggering something which in turn runs the code again.

0 Likes 0 ·
Ankur A3 avatar image Ankur A3 Felix Möhlmann commented ·
Thank you so much! @Felix Möhlmann

Really good summary to go forward for debugging.

0 Likes 0 ·

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.