question

Blazej T avatar image
0 Likes"
Blazej T asked Blazej T answered

Flexsim crashes while debugging

Hello. I have a problem with FlexSim, I have a very big and complicated model now, and when i added some features to one of the functions and I place stop point in new code lines added, when I run simulation, Flexsim crashes (close model) instead of stopping the model at this breakpoint.

FlexSim 17.1.6
flexsim crashingflexsim 17.1.6
· 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.

Eric M avatar image Eric M commented ·

Hi @blazej.t, if you put the breakpoint before the new lines of code, does your model still crash? It could be something in your new code that is causing the crash or it could be something that happens before. Without seeing your model, it's a little hard to know how to solve the problem other than following the helpful tips in this answer.

I would suggest posting your model or a sample model that demonstrates your question. 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 ·
Ryan Clark avatar image Ryan Clark commented ·

Hi @blazej.t,

We haven't heard back from you. Were you able to solve your problem? If so, please add and accept an answer to let others know the solution. Or please respond to the previous comment so that we can continue to help you.

If we don't hear back in the next 3 business days, we'll assume you were able to solve your problem and we'll close this case in our tracker. You can always comment back at any time to reopen your question, or you can contact your local FlexSim distributor for phone or email help.

0 Likes 0 ·
Blazej T avatar image
0 Likes"
Blazej T answered Eric M edited

Hello Eric. I think I sorted it, I just removed new part of a code from the function and created new function for it. After that the model doesn't crash anymore. The Function I was trying to update was already very long. Is there a limit of a number of code lines in a function? See attached function which was crashing with comments where were new code lines added. Regards. Blazej

Function.txt


function.txt (16.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.

Eric M avatar image Eric M commented ·

Interesting. I don't think the length of the code should be a problem (I tested code with many more lines without issues). Maybe there was an instance of the same variable being defined twice that was causing the problem, but that would usually produce an exception and not crash the model. I wish I could tell you the cause of the crash based on the code, but at least things are working by splitting the code into multiple functions.

0 Likes 0 ·
Blazej T avatar image
0 Likes"
Blazej T answered

Hello Ryan, As I wrote to Eric since i moved the new code lines to new function, I have no problem so I just continued to go on with the model. I didn't investigate the problem anymore.

Rregards

Blazej

5 |100000

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

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.