Message Boards Message Boards

GROUPS:

Avoid error "Failed to allocate String character memory..."?

Posted 1 month ago
332 Views
|
5 Replies
|
1 Total Likes
|

I'm using the Media library and am getting this error:

[ERROR]: Failed to allocate String character memory of size 3001 from heap of fixed size 20000000.

No other details that I can see. The model was running and I'm not sure what changed. This is on Wolfram SystemModeler v.12 running on macOS.

EDIT: I switched my Media from CH4 to Air and it worked. I tried other gasses in Media.IdealGases and they all gave the heap error. When I cut the size of my model in half it works fine (both uncoupled halves work).

Not sure there's enough information to do anything, but any help would be appreciated.

5 Replies

Did you try turning off Dynamic assert strings under Preferences -> General -> Translation?

While I didn't know what it meant, I saw the word "strings" and turned it off and still had the issue. So I did try that, but thanks for the suggestion.

I turned this off in Simulation Center but not in Model Center. I turned off "Dynamic assert strings" in both places and the error went away. Thank you!

Edit: Tried a larger system and the error came back

I just checked this in Windows (I had found discrepancies between the OS versions in the past). I am getting the same error. It happens with the ideal gas components, but not with Air. I'm going to tag @Ankit Naik and @Jan Brugard to see if they have any ideas

OK, it's good that you can confirm that this is the problem that the Dynamic assert strings setting was meant to address. Then, of course, it's too bad that it didn't solve your problems for the larger system. It is a known issue that the user can't change the size of the memory used to hold strings during expression evaluation, and I'm adding you as a reporter of this.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract