question

Sebastien avatar image
0 Likes"
Sebastien asked Jeff Nordgren commented

Custom Setup longer than 2 simtime in a process Flow makes the software crash

Hello,

In my model I have defined a general machine with a process flow. This machine is than configured with lables, setup time is one of them. In the process flow first a check is made if the machine has to be put in setup according to a Global Table and if it is the case a delay as long as the label setupTime is done.

But when this setupTime is set longer as 2 minutes the model crashes during setup (here at 14:00)

I don't know where to look. With 1 or 2 minutes setup it works normally.

Here is my model.

setup-crash.fsm

FlexSim 19.0.0
process flowdelay
setup-crash.fsm (48.2 KiB)
5 |100000

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

1 Answer

·
Phil BoBo avatar image
2 Likes"
Phil BoBo answered Phil BoBo edited

The issue is that you have a recursive loop in your Process Flow here:

This type of Process Flow modeling error is described with its solution in the User Manual section Troubleshooting Process Flows Using 0 Second Delays.

It is also described in Process Flow Tutorial 3 in the User Manual and the documentation for the Delay activity.

The Receive Next Item activity calls receiveitem(), which causes an item to enter, which causes the On Item Entry activity to create a new token, which moves down through to the Receive Next Item activity, which calls receiveitem(), etc...

This is all done without a simulation time delay in the logic, so it is queueing up method calls on the call stack and leading to a stack overflow error that crashes the program.

You can fix it by adding a Breathe (Delay Activity with 0 time) before the Receive Next Item activity.

I debugged the crash by following the steps listed in How can I debug a crashing FlexSim model? I changed the setupTime label of the Abstract Machine3 object from 1 to 3, ran the model to time 843, and then pressed the Step button 8 times to find the crashing event. Then I looked at what code was firing during that crashing event to find the problem.


recursive-loop.png (58.1 KiB)
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.