Hard Light Productions Forums

Hosted Projects - FS2 Required => Blue Planet => Topic started by: MC_Kejml on December 26, 2015, 06:32:56 am

Title: Again, another error...
Post by: MC_Kejml on December 26, 2015, 06:32:56 am
Hey guys,

during the last mission of Act 1 and the first mission of act 2, I am getting this error:


---------------------------
Error!
---------------------------
Malloc Failed!

<no module>! KiFastSystemCallRet
<no module>! WaitForSingleObject + 18 bytes
<no module>! SCP_DumpStack + 213 bytes
<no module>! Error + 230 bytes
<no module>! _vm_malloc + 55 bytes
<no module>! bm_lock_dds + 40 bytes
<no module>! gr_opengl_bm_lock + 511 bytes
<no module>! bm_lock + 148 bytes
<no module>! opengl_create_texture + 168 bytes
<no module>! gr_opengl_tcache_set_internal + 174 bytes
<no module>! gr_opengl_preload + 100 bytes
<no module>! game_busy + 66 bytes
<no module>! level_page_in + 148 bytes
<no module>! freespace_mission_load_stuff + 111 bytes
<no module>! game_post_level_init + 152 bytes
<no module>! game_start_mission + 357 bytes
<no module>! game_enter_state + 277 bytes
<no module>! gameseq_set_state + 146 bytes
<no module>! gameseq_process_events + 131 bytes
<no module>! game_main + 513 bytes
<no module>! WinMain + 222 bytes
<no module>! __scrt_common_main_seh + 253 bytes
<no module>! RegisterWaitForInputIdle + 73 bytes

[ This info is in the clipboard so you can paste it somewhere now ]


Use Ok to break into Debugger, Cancel to exit.

---------------------------
OK   Storno   
---------------------------

The build I am using is 3.7.3. 82ae54a SSE, running BP2 complete. This happens on various settings, including when nothing is ticked in Advanced settings.
Any and help is appreciated!
Title: Re: Again, another error...
Post by: jr2 on December 26, 2015, 08:30:40 am
Try using a 64-bit build (http://www.hard-light.net/forums/index.php?topic=90891.0).  I'm pretty sure malloc errors can be caused by running out of memory; 32-bit builds can't use more than ~2GB, and BluePlanet is resource-intensive.
Title: Re: Again, another error...
Post by: MC_Kejml on January 02, 2016, 02:42:37 pm
Thanks - Can't run that one, though, I still have a 32bit system.
Title: Re: Again, another error...
Post by: niffiwan on January 02, 2016, 05:33:07 pm
Try deleting these VP files from your bpcomplete folder:

bpc-advanced1.vp
bpc-advanced2.vp
bpc-advanced3.vp

That will reduce the amount of memory required by BP, at the cost of some visual prettiness.
Title: Re: Again, another error...
Post by: jr2 on January 04, 2016, 12:30:06 pm
Did we ever get the LAA (Large Address Aware) builds working right?  Those allow 32-bit to access 3.~ GB of memory instead of just two.

Thread for those builds is here (http://www.hard-light.net/forums/index.php?topic=90770.0)
Title: Re: Again, another error...
Post by: AdmiralRalwood on January 04, 2016, 01:20:46 pm
I'm not sure that LAA does anything on a 32-bit OS...
Title: Re: Again, another error...
Post by: jr2 on January 04, 2016, 01:33:28 pm
Yes, 32-bit OS can address up to 4GB total memory (but video memory cuts into that).

Read the thread for further info.
Title: Re: Again, another error...
Post by: The E on January 04, 2016, 01:35:51 pm
jr2, LAA does exactly nothing on a 32-bit OS.
Title: Re: Again, another error...
Post by: jr2 on January 04, 2016, 01:42:12 pm
O.o

Your post confused me...


One of the problems we have on Windows is that FSO on Win is a 32-bit application. This restricts the available memory space to 2GB, and chances are that there are scenarios where our memory usage goes beyond that. Making the engine fully 64-bit-compatible takes some doing, but it is possible to set a flag called "Large Address Aware" that allows us to address up to 4GB of memory[/i].

Please test these builds especially if you frequently encounter "malloc failed" errors.

https://www.dropbox.com/s/yab58duapqyku8j/FS2_Open_3_7_3_Large_Address_Aware.7z?dl=0



Was your position revised further down the thread?


EDIT:


Dragon, he's right in that if we were to make LAA default on our builds, 32bit systems would still need the 3GB switch to allow FSO more than 2GB, which is the tweak I was referring to in parentheses in my previous post.  But it is true that setting can have unintended conequences, and running FSO with more than 2GB memory may only be reliable on 64bit platforms.



So, you mean, LAA won't work on a 32-bit OS unless a risky OS modification is made as well as using LAA?



EDIT2:  This link seems to say that LAA should allow up to 3GB on x86 OSes:

http://wiki.tesnexus.com/index.php/2-4GB_game_memory_limits_and_solutions


EDIT3:  In first post, following link confirms: LAA does nothing on a 32-bit / x86 OS on its own, you must also turn on LAA support in the OS (instructions at the bottom of the first post, in spoiler tags).

However, switching to a 64-bit OS is the preferred method around this problem, as LAA isn't always reliable and can cause problems.




TL;DR  LAA will only work on x86 if you also modify your OS settings to allow it, which can cause problems.

It is recommended to just switch to a 64-bit OS.

Or, (easier) reduce memory usage by removing features that use memory, as stated in previous posts above.


Sorry for any confusion.
Title: Re: Again, another error...
Post by: The E on January 04, 2016, 01:59:07 pm
It's very simple. LAA does nothing on x86 OSes, unless the \3GB switch is set. Even then though, before anyone sets that switch just to get a few better texture in a small FS mod, I would strongly recommend to look into the reasons why you're still on an x86 OS, as there are no good ones for it.
Title: Re: Again, another error...
Post by: jr2 on January 04, 2016, 02:12:32 pm
Oops, didn't see you responded.  Came to same conclusion as to your meaning after researching, though.

Upgrading the OS to 64-bit would be preferred except it's a PITA to re-do everything after it's all set (that's the reason I haven't clean installed 10 since when I started using the Preview, around build 9926 :ick:  )
Title: Re: Again, another error...
Post by: The E on January 04, 2016, 02:22:51 pm
The thing is, x86+PAE is not something FSO will ever officially support. x86, no problem, x86-64 in the future, but not this weird hybrid form. If a user can make it work without crashing, cool, but if it does fail, our official response will be to use less memory-intensive assets or use an x86-64 OS.
Title: Re: Again, another error...
Post by: jr2 on January 04, 2016, 02:26:36 pm
Good to know.  :yes: