ZeligsoftDev / CX4CBDDS

CX4CBDDS component modeling and generation tool
Apache License 2.0
8 stars 5 forks source link

Saving large model results in corrupted XMI file #470

Open eposse opened 1 year ago

eposse commented 1 year ago

Issue and tracking information

Developer's time Estimated effort to fix (hours):

Developer's Actual time spent on fix (hours)

Issue reporter to provide a detailed description of the issue in the space below

(This was first mentioned in Issue #466).

"[...]we see a few other segfault errors as well as a problem that has been plaguing our team for years even back in RSA. This bug is one where the model saving goes wrong and some portion of the model is saved to UML twice giving invalid XML. I have added an example of this corrupted model in the other zip file.

SPDM_Large_corrupted.zip -This contains the corrupted UML. Notice that the models XML ends with a </xmi:XMI> tag, but then contains what appears to be a trailing portion of the original model after it. If you delete all contents after the first ending </xmi:XMI> tag, the model is valid again."

eposse commented 1 year ago

While I see the corruption in the model that you provided, I haven't been able to reproduce it myself, with neither your large models, nor with other smaller models.

Can you perhaps give me more details about the steps that you do to get the corrupted model?

emammoser commented 1 year ago

For a little background, this issue is one that we have been seeing for a long time but it is fairly rare unless the model is very large. We only develop on Linux VMs, which I believe is different from your development environment. The filesystem is mounted as just XFS, not NFS or anything like that.

I just reproduced this on my end with the following details. Only one project in the workspace with one model, the large SignalProcessingDataModel example. This was the only model or file open in eclipse. It took me two saves to reproduce this issue this time, however, I believe the issue happens psuedo-randomly and the number of saves isn't really relevant here. For both saves, the only thing I did was change a single message field type to a CX primitive like CXChar and CXDouble. I don't know what you mean with your last question. My guess is no since our plugins do not really interact with the modeling system at all.

I will attach the logs in another comment.

emammoser commented 1 year ago

Screenshot from 2023-08-04 10-56-55 Corruption.log