Hard Light Productions Forums

Modding, Mission Design, and Coding => The FRED Workshop => Topic started by: Evergreen on February 25, 2010, 03:43:22 pm

Title: Error Message "Unable to allocate storage [...]"
Post by: Evergreen on February 25, 2010, 03:43:22 pm
Hello there,

I'm currently doing a mission which contains a significant numer of events.
I'm trying to set Special Hitpoints values for a number of ships, but at some point FRED throws me the error message "Unable to allocate storage, try deleting Sexp variables".
It seems I've hit some kind of cap. This is true for both FRED 3.6.10 RC2 as well as the Inferno build.
Is there any way to circumvent this?

And while I'm at this another question: Did anyone ever collect the various caps of FRED in a single place? Like number of messages (I know this'll be lifted in the next release), Sexps, variables, maximum number of ships in the different builds, etc. I haven't found anything the like here or in the Freespace Wiki.

Thanks!
Title: Re: Error Message "Unable to allocate storage [...]"
Post by: The E on February 25, 2010, 03:45:17 pm
Number of messages is already unlimited. However, you should give us a few more specs on the mission. How many ships are in there? Have you tried loading it with debug FRED? If so, what does the log say?

Also, you do know that you can just use notepad to add the data manually, right?
Title: Re: Error Message "Unable to allocate storage [...]"
Post by: Evergreen on February 25, 2010, 04:05:19 pm
Now that's interesting. The Debug builds assert on loading.

Code: [Select]
Assert: Sexp_variables[sexp_variables_index].type & SEXP_VARIABLE_STRING
File: SEXP.CPP
Line: 4445


Call stack:
------------------------------------------------------------------
    fred2_open_3_6_10_RC2_debug.exe 004c0b8e()
    fred2_open_3_6_10_RC2_debug.exe 004c0bd2()
    fred2_open_3_6_10_RC2_debug.exe 004c0bd2()
    fred2_open_3_6_10_RC2_debug.exe 004c0ebf()
    fred2_open_3_6_10_RC2_debug.exe 00471b48()
    fred2_open_3_6_10_RC2_debug.exe 004685e1()
    fred2_open_3_6_10_RC2_debug.exe 00433c73()
    fred2_open_3_6_10_RC2_debug.exe 004335ef()
    fred2_open_3_6_10_RC2_debug.exe 009e2c06()
    fred2_open_3_6_10_RC2_debug.exe 009e8ea5()
    fred2_open_3_6_10_RC2_debug.exe 009f4e95()
    fred2_open_3_6_10_RC2_debug.exe 00a01279()
    fred2_open_3_6_10_RC2_debug.exe 009f4bf2()
    fred2_open_3_6_10_RC2_debug.exe 009cb334()
    fred2_open_3_6_10_RC2_debug.exe 009cba61()
------------------------------------------------------------------

It may be because my mission includes the -mod fs1mod alongside -mod mediavps; the mission itself runs fine, though and can be edited without problems, there's just the Special Hitpoints issue.
I have attached the fs2_open.log in the end.
So far the mission contains 79 ships, 58 small, 15 big, none huge.


Thanks for the hint regarding notepad-editing, though I only want to use that option as a last resort.

[attachment deleted by admin]
Title: Re: Error Message "Unable to allocate storage [...]"
Post by: FUBAR-BDHR on February 25, 2010, 04:12:52 pm
There is a limit of 100 variables numbered 0-99.  Standard variables start at 0 and go up.  Block variables (which Kara is working on removing) start at 99 and go down in pairs.  Special hits take one pair.  With shields this is 2 pairs.  So 4 variables per ship with special hits.  20 ships with special hits and you just ate up 80 variables.  Add in special explosions which also use them in pairs and that can be even more. 

So you need to either use fewer ships with special hits, fewer variables, clean out all your variables and start over (sometimes you have stuff in there you aren't even using but is not removed), use .tbm files to change hitpoints that way, or wait on Kara's removal of the block variables. 
Title: Re: Error Message "Unable to allocate storage [...]"
Post by: Evergreen on February 25, 2010, 04:20:57 pm
Now this makes it crystal clear.
Thank you both for the extraordinarily swift help!

I think I'll resort to balancing via SEXPs rather than changing tables or altering special hits.

Thanks again.  :yes:
Title: Re: Error Message "Unable to allocate storage [...]"
Post by: The E on February 27, 2010, 04:13:54 am
Also, please consider upgrading your fs2_open exes. 3.6.10RC2 is really not recommended for daily usage.