I've made a small example model to show where it goes wrong: conveyorstoperror.fsm
If I am simply running the model everything works well. The box stops at the decision point. However, if I am putting a breakpoint on row 9 where the Conveyor.Item will be defined and then step through the code FlexSim crashes.