Undefeatable "safe_malloc failed" error.


([ion] C2) #1

I’ve searched and tested and failed for days. (Mind you, I’m a very good searcher) But, every attempt I put forth has failed, and it seems as if this error is immortal.

On the lighting phase of the compile, safe_malloc fails during the SetupTraceNodes part.

My system is powerful enough to compile this 11,000 brush map, which leads me to question whether or not it’s a q3map2 related issue that can be circumvented like the user who modified the source of q3map2 to workaround it. I set my swap file to have 3-4 GB of hard disk RAM, paired with my 2GB of physical RAM. I’ve monitored many gauges and the task manager to make sure the RAM it uses is well under control, and it is.

P4 2.8GHz w/HT
2GB DDR400 RAM
80GB HD with 30GB free space
Radeon X1600 Pro 512MB

I can’t kill this error. I’ve compacted the map into as small of a space I can, but it’s still pretty large. Making it smaller is not an option.

I’ve utilized:
-lomem
-cheap
-fast
_gridsize 256 256 512
_lightmapscale 2 all the way up to 64
_chopsize 8192
_blocksize 2048 2048 2048

And any and all of the other things you can do to try to get around this error (Detail/structural brush correct usage, etc). What do I do to get this damn thing lit?

:?


(stephanbay) #2

one of your shaders is generating too much data. Check if your Light entites arent duplicated by accident too. You can always try the -lomem switch. Hope this will help.


(Shallow) #3

Previous threads about this error suggest it can be caused by too much structural data in the map. SetupTraceNodes is about gathering the leaf node data used to optimise lighting generation IIRC.


([ion] C2) #4

There’s a lot of brushes, but only a few are structural (skyboxes)

Like I said:

I’ve utilized:
-lomem
-cheap
-fast
_gridsize 256 256 512
_lightmapscale 2 all the way up to 64
_chopsize 8192
_blocksize 2048 2048 2048

And any and all of the other things you can do to try to get around this error (Detail/structural brush correct usage, etc).

However making this map with less brushes/eliminating parts of it wouldn’t be cool. It runs fine in-game now but just lit ambiently. Seems kind of stupid to have a hardcoded limit it seems, since the amount of bytes its trying to allocate and “safe_malloc” fails on is only something like 128MB… and I have a powerful system as outlined above.


(Shaderman) #5

Maybe someone can help you if you post a q3map2 -info output here.


(obsidian) #6

Making everything detail and sticking it into a giant structural skybox isn’t exactly optimizing your map. It’s like going from one extreme to the other.

I linked to a bunch of article pages here and wrote a bunch of other stuff:
http://www.quake3world.com/forum/viewtopic.php?t=3620

Especially read Q’s Sample Map


(kamikazee) #7

I remember your tutorial, it helped me a lot back in the day.


([ion] C2) #8

It’s basically a map with a ton of mini-maps you teleport too, each with structural outsides and detailed insides.

Retexturing everything and using caulk then texturing faces is not something I want to do… or re-map it with “optimization” in mind. All of the PCs that will be playing this map (and compiling) are well powerful enough to do so, no matter what q3map2 thinks about safe memory allocation failing. I just want to get around the error, not make a map that looks good to q3map2.


([ion] C2) #9

GOT IT WORKING

-lomem on GTKRadiant 1.5.0

I tried it on 1.3/1.4 and other various combos but forgot to try it on the latest version. All fixed, lighting works wonderfully. :smiley: