Corrupted model because of an out of memory error

I used an experimental script this mornning and had an error message related to memory:

Clicking on the script made the program freeze for long times, then when I tried CTRL+A to select all texte of the script the program stopped completely and had this message (see above).

I closed Capella and opened it now to discover that my model might have been destroyed? (It’s not a big issue because I am working on a “copy”), but that was quite surprising, take a look:

When I tried to open the file (next to the green star in the image), I could read this error:

When displaying the system engineering item with P4C (the “se” variable), this is what it displays: (id: 58e849.................5, sid: null) (name: null) (visibleInDoc: true, visibleInLM: true, summary: null, review: null)
The name is “null”.

I wonder if it’s my script who contained lot of commands in new transactions that I hadn’t tested yet, I just run the script after writing 50 new lines. OR it was related to something else outside of Capella. I shall try running the script again with another project to see how it goes.

Edit: I tried the script on a very simple model (with only 1 Diagram), and the script worked fine. I shall retry again with the working version of the same project that got corrupted.

Edit2: I retried with a copy of the original model and run the script (the one that got corrupted), I got no problem. The corruption must had to do with the memory of my computed then, it might had nothing to do with P4C after all.

I think the OutOfMemoryException should have rollback the transaction, but since you used more than one transaction it’s possible that a transaction failed but an other one tried to save the model. But the model was broken at this time.

Depending on which version of Java you are using, you might want to change memory options in the capella.ini file at the root of your Capella installation:


If you have a lot of diagrams it might help.

1 Like

Yes I had 2 transactions one after the other and both were not tested. But they worked fine later on another model, odd.

What do those options do?
Here is my current configuration:

They set the minimum memory and maximum memory allocated to the JVM.

1 Like