Flexsim crashes while debugging

Flexsim crashes while debugging

b_turostowski
Contributor Contributor
1,211 Views
5 Replies
Message 1 of 6

Flexsim crashes while debugging

b_turostowski
Contributor
Contributor

[ FlexSim 17.1.6 ]

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.

0 Likes
Accepted solutions (1)
1,212 Views
5 Replies
Replies (5)
Message 2 of 6

eric_m3
Not applicable

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
Message 3 of 6

b_turostowski
Contributor
Contributor
Accepted solution

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

0 Likes
Message 4 of 6

eric_m3
Not applicable

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
Message 5 of 6

ryan_c10
Not applicable

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

b_turostowski
Contributor
Contributor

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

0 Likes