question

Oscar Perez avatar image
0 Likes"
Oscar Perez asked Phil BoBo edited

Crash on zone

case-2.fsm

@Matt Long Hi, I have a zone, the name is "Resource for Exit Dry room" the capacity is 1.

If I change this capacity into 3, or different number, Flexsim stop working and crash. can you check it?

FlexSim 17.1.0
zone
case-2-x.png (44.2 KiB)
case-2.fsm (210.0 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

Matt Long avatar image
1 Like"
Matt Long answered Phil BoBo edited

You've managed to create an infinite loop that Process Flow was unable to detect. As a result, FlexSim crashes. It occurs inside of the Set Dry Room to each Rack container. During one of the Back Order Reevaluation events, a back order is fullfiled which releases a token from the Push to List and the Pull from List activities. They move through their activities until one gets to the Push to List and the other gets to the Wait for Event. At this point, the Wait for Event sees that the content is at the correct value, and so releases the token which subsequently moves a new token into the Zone. This starts the entire process over again. With thousands of tokens waiting to enter the zone and each one of them triggering the Wait for Event, FlexSim becomes overloaded trying to compute all of that in one event. (So technically it's not an infinite loop, you just exceed the maximum stack size which crashes the program).

A long explanation, but the solution is simple. Add a Breathe activity right before the Wait for Event activity. A Breathe being a Delay activity with a delay of 0 seconds. This will break up the loop and not overflow the stack.

I'll try and take a look as to why Process Flow wasn't able to catch this, hopefully we can improve this in the future so it's easier to figure out what's going on without crashing.


breathe.png (90.5 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.