question

Jyhjeng D2 avatar image
0 Likes"
Jyhjeng D2 asked Jyhjeng D2 answered

Time Exception Error

Hi, there. Recently I watched a video of the FlexSim 2020 Tutorial Part 2,

https://www.youtube.com/watch?v=Q0VfuD_H_uM&t=1808s

At the time frame 1:31:20~1:34:01, there is an example of using a token in the process flow to control the flow item in the 3D model. I follow the steps in the video exactly. However, the time exception occurred as follows.


time: 13.364542 exception: Exception Caught in FixedResource::getItemInfo(treenode flowitem)

time: 13.364542 exception: Exception Caught in FixedResource::setItemState(treenode flowitem, int state)

time: 13.364542 exception: Exception Caught in FixedResource::releaseItem(treenode item) object: /Processor1

time: 13.364542 exception: Exception Caught in Processor::onTimerEvent(treenode involved, int code, char *datastr) object: /Processor1

time: 13.364542 exception: Exception Caught in ObjectFunction250__project_library_FlexSimObject_behaviour_eventfunctions_OnTimerEvent object: /Processor1 class: /Processor1


Can anyone help me solve the time exception problem?

The FlexSim file can be downloaded here.

https://drive.google.com/file/d/1kEgeoc4tVUCqZnC3xyYkvOyl3VeOVMjj/view?usp=sharing

Thanks.


FlexSim 22.0.1
time exception error
5 |100000

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

Felix Möhlmann avatar image
0 Likes"
Felix Möhlmann answered

When an item starts processing, a "process finish" event is scheduled to fire after the process time that is set in the processor has elapsed. This time is independent from the delay time used in the process flow. In the case where the delay time in the process flow is shorter than the processor's cycle time, the item will get destroyed before that "process finish" event fires. When it does fire some time later, the item reference it uses is no longer valid and the error message is thrown.

This actually seems to be an oversight in the video where the problem just didn't occur because the processor was always done before the token.

This is why "Wait for Event" and similar activities should be used to synchronize the 3d model and a process flow, which the video goes on to showcase directly afterwards.

5 |100000

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

Jyhjeng D2 avatar image
0 Likes"
Jyhjeng D2 answered

Thank you for explanation. It makes sense.

5 |100000

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