question

Junwoo Kim avatar image
0 Likes"
Junwoo Kim asked Junwoo Kim commented

Bundle type label causing model corruption

bundle_test_(2024u2).fsm

Hello, I have an issue about Bundle type label.

The attached model contains 1 Queue, 'Queue1', which has a bundle type label named 'my_bundle'.


For simplicity, the label contains only 1 column, 'pointer_column', and its data type is pointer.

I want to set the 'pointer_column' of the first row to Queue1 object.

In order to do this, (1) I activated the sampler for the 'pointer_column' of the first row, and (2) clicked Queue1 object in model view. (3) Next, I chose 'Queue1' out of the pop-up list.


bundle-q1.png


As a result, the 'pointer column' of the first row is set to the reference to Queue1 object.

bundle-q2.png

However, this model is corrupted and FlexSim crashes when I try to save this model by clicking save button in tool bar. After that, FlexSim crashes whenever I open the corrupted model again.


Could you please let me know why the model is corrupted and how to avoid it?

Thanks in advance.



FlexSim 24.2.2
bundle label
bundle-q1.png (25.7 KiB)
bundle-q2.png (20.7 KiB)
· 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.

Jeanette F avatar image Jeanette F ♦♦ commented ·

Hi @Junwoo Kim, was one of Jordan Johnson's or Jeanette F's or Joerg Vogel's answers helpful? If so, please click the "Accept" button at the bottom of the one that best answers your question. Or if you still have questions, add a comment and we'll continue the conversation.

If we haven't heard back from you within 3 business days we'll auto-accept an answer, but you can always comment back to reopen your question.

0 Likes 0 ·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered Junwoo Kim commented

This is an issue with the code that detects changes in the model. We do that by computing a hash of the model. The hashing code erroneously tries to hash nodes values in the bundle as if they were actual nodes in the tree, instead of just hashing the pointer to the node. This leads to infinite recursion, because the node contains the bundle that points at the node. I have added this issue to the dev list.

For now, you need to make sure that any bundles with node pointers don't point to a node on the same branch of the tree.

· 3
5 |100000

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

Junwoo Kim avatar image Junwoo Kim commented ·
Thank you for your answer. I hope this issue will be fixed in future updates.
0 Likes 0 ·
Jonah K avatar image Jonah K ♦ Junwoo Kim commented ·

This has been fixed in version 24.0.9 released today.

0 Likes 0 ·
Junwoo Kim avatar image Junwoo Kim Jonah K ♦ commented ·
It is great to hear that! I hope this debug fix will be applied to later versions as well. Thank you for your support.
0 Likes 0 ·
Jeanette F avatar image
0 Likes"
Jeanette F answered Junwoo Kim commented

Hello @Junwoo Kim ,

I cannot verify if this is a bug or by design as Joerg pointed out. I have informed the development team for further investigation.

· 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.

Junwoo Kim avatar image Junwoo Kim commented ·
Thanks a lot.
0 Likes 0 ·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Jordan Johnson commented

I think it is a violation of allowed data types:

Bundles: Data table that stores numbers and strings.

A pointer is not a string nor a number.

· 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.

Jordan Johnson avatar image Jordan Johnson ♦♦ commented ·
1 Like 1 ·
Junwoo Kim avatar image Junwoo Kim commented ·

Hello, Joerg, thank you for your response.


However, I think bundle type allows the columns to be pointer-type, as shown in Figure below.

bundle-q3.png

Moreover, the bundle type labels did not cause any issue in the models that I have developed by using FlexSim 2019 or 2020.

I found this issue related to bundle type label in developing a model same with the old ones in recent versions.





0 Likes 0 ·
bundle-q3.png (31.3 KiB)
Joerg Vogel avatar image Joerg Vogel Junwoo Kim commented ·

@Junwoo Kim, it is a default setting. I commented a passage of the manual. Perhaps there is some work to do for choosing legible datatypes in the program. But as you have identified yourself choosing a pointer leads into a catastrophic failure. Then don't do it.

Edit: added manual setbundlevalue manual picture:default-datatypes-bundle-value.jpg

0 Likes 0 ·
Junwoo Kim avatar image Junwoo Kim Joerg Vogel commented ·

bundle-test-2020u1.fsmbundle-test-2024u2_other_object.fsm

1. For comparison, I uploaded a same model developed by using FlexSim 2020 update 1 (bundle-test-2020u1.fsm). This model is successfully saved without any issue or model corruption.


2. Also, I uploaded a similar model developed by using FlexSim 2024 update 2 (bundle-test-2024u2_other_object.fsm), where the 'pointer_column' of the first row is set to Processor1 object, instead of Queue1 object. This model is also successfully saved.


3. Therefore, I think pointer type is available for a column of bundle type label. The issue is encountered only if the pointer column of bundle type label is set to a Queue object.


Is this a bug of recent version of FlexSim software?

The bundle type label is an important part of my original model.

Anyone can help me fix this issue?


0 Likes 0 ·
Show more comments