question

Nicholas B avatar image
0 Likes"
Nicholas B asked Nicholas B answered

Invalid node destroy command

I keep getting this error randomly and it is hard to replicate.

FlexSim HC 5.3.0
bugerror messagememory leak
· 5
5 |100000

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

Jeff Nordgren avatar image Jeff Nordgren commented ·

@Nicholas B

You need to supply more information about the error, what is happening in the model and a way to reproduce it. Without your model for testing and eval, there is no way we can tell what is happening in your model or how to fix it. Any and all information you can give us would be helpful.

Thanks.

2 Likes 2 ·
Nicholas B avatar image Nicholas B commented ·

There literally is no way to reproduce it because it happens intermittently. I believe it is a memory leak somewhere, but I am just guessing at this point. This error had not popped up since I posted and then last night I got the error.

0 Likes 0 ·
Ben Wilson avatar image Ben Wilson ♦♦ Nicholas B commented ·

@Nicholas B,

If you could provide the model, we could attempt to duplicate and debug.

If the model contains sensitive information, you could post it to a new, private question.

You might also look into making sure that your model is repeatable. This would help you narrow down what occurs to cause the error.

0 Likes 0 ·
Nicholas B avatar image Nicholas B commented ·

Here is the latest error message:

time: 75331.298581 exception: Exception Caught in getpreempt(treenode tasksequence) time: 75331.298581 exception: Exception caught in TreeNode::executememberfunctionwithexceptionhandling() c++/dll execution. Throwing... MAIN:/project/exec/usercommandlist/HC/StandardSelectionPolicy/node c: MAIN:/project/exec/usercommandlist/HC/StandardSelectionPolicy/node thisClass: MAIN:/project/exec/usercommandlist/HC/StandardSelectionPolicy/node time: 75331.298581 exception: Exception caught in flexscript execution of MODEL:/Tech_Surgery>variables/passto line 101 instruction 12. Discontinuing execution. time: 75331.298581 exception: Exception caught in flexscript execution of MODEL:/Tech_Surgery>variables/passto line 101 instruction 12. Discontinuing execution.

The model crashes. I close out of the model. Open up the model again and everything works as normal. I really think there is some kind of memory leak. Don't ask to replicate it happens randomly.

0 Likes 0 ·
Ben Wilson avatar image Ben Wilson ♦♦ Nicholas B commented ·

@Nicholas B, if the model is repeatable, it will fail at the same time, every time. Or at least it would help pinpoint where the model execution starts to differ across model runs, then debug that code where runs of the model diverge.

That first link contains suggestions and steps to ensure your model is repeatable. We would be happy to help you with this if you can share the model with us. This is how we we would debug your model if you send it in.

If you cannot send your model, you will need to make your model is repeatable on your own. That first link contains lots of things to check, and a process to go through using the Event Log to ensure it is repeatable.

Without the model, there is no way for us to debug the issue, and you will need to debug on your own, following the suggestions in both links. We are totally happy to help, but without being able to get into the model, we can't do more than offer suggestions, leaving the actual debugging to you.

If you can't share the model, and you don't feel confident in following these steps, please call your local FlexSim office. We can help over the phone or set up a web meeting.

0 Likes 0 ·
Nicholas B avatar image
0 Likes"
Nicholas B answered

So I was able to get a new error code following the crash:

"Warning: realloc failed: ByteBlock setsize size requested: 2035435776 current size 0"

5 |100000

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

Nicholas B avatar image
0 Likes"
Nicholas B answered

So unfortunately and I wish I could make it repeatable it is not. The error messages are always different and the time/code where it fails is different as well. There is also no randomness in the model so I could run the same model over and over again and never get the error. Then open up the model and will get an error. If I can narrow it down I will update.

5 |100000

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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Jacob Gillespie commented

The classic command is

destroyobject(obj node)

with dot syntax if it is available:

treenode node.destroy() 
· 1
5 |100000

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

Jacob Gillespie avatar image Jacob Gillespie ♦ commented ·

@Jörg Vogel There is no dot syntax in FlexSim HC.

1 Like 1 ·