Making map: error after compiling "hunk_alloc failed on [number]"


(dwe_flame) #1

working on my 3th map now, but now i get a error i never had before.

after compiling i get this error: “hunk_alloc failed on [number]”

i found out it has some to do with the hunkmegs,

but i don’t want all people having to change hunkmegs for my map :frowning:
want every1 to be able to play it without they have to change theyr com_hunkmegs

i’m not totally new to the mapmaking,
but still a lot i do need to learn :slight_smile:

so what to do ?

some more info that can be of use:

  • i have used a skyportal

the map itself

  • the side walls i made fueldump_sky for the lightning
  • the cyling (upper layer) i have left caulk. only at some parts adding a small part of fueldump_sky for some extra lightning
    all side clip layers are detail
  • 80% of my map is detail.
  • passageportalflow (13992)
  • so far only added 2 hint layers as a thin wall, making the whole map separated in 3 main area’s

worldspawn info:


_blocksize 1024 1024 1024
atmosphere T=SNOW,B=5 10,C=0.5,G=0.3 2,BV=20 30,GV=25 40,W=3 5,D=2400
classname worldspawn
gridsize 128 128 256
mapcoordsmaxs 12288 -2976
mapcoordsmins -768 10080

also i have not used lightgrid or any of all those other common textures

most of them i dont know how to use, and cant find any good docu on it :slight_smile:

tested with changing my com_hunkmegs, this fixes problem for me. but this is client sided solution.

i want to fix it map-sided, so players dont have to change hunkmegs.

:rolleyes:or should i post this in “Q3Map2 Support Forum” :rolleyes:


(IndyJones) #2

just a tip…

et is a old game. most people have much better computers than they were in 2003. don’t ruin your map by adjusting com_hunkmegs. if noobs can’t increase it, then it’s their problem. there is a fix for a servers that automatically change hunkmegs for a clients…


(dwe_flame) #3

but the most stupid thing is, once i use the fastest way of compiling, the error is not here,
but once i use the full comiple (with the lights and all) the error appears.

so it cant be very much i have to change right ?


(FireFly) #4

Try Using the -lomem switch during compile: Although this will double your compile time during the light stage, It will probably solve your hunk_alloc error…


(dwe_flame) #5

the -lomen ?

dont know that ?

how do i use it ? i just pic it from the menu normaly :rolleyes:


(FireFly) #6

You first need to create a batch file. This might sound difficult but it’s pretty easy: Basically it’s just a text file telling the compiler were to find your w:et game and map and how to compile it…

Below is the batch file that I use for my final compiles… copy and paste it into wordpad.


@rem to use this batch file, run it from a dos window: 
@rem > compile <mapname> without the .map extension 

@set Q3MAP_PATH="C:/comp/q3map2.exe" 
@set ET_PATH="C:/Program Files/Wolfenstein - Enemy Territory" 
@set MAP_PATH="C:/Program Files/Wolfenstein - Enemy Territory/etmain/maps/YOUR_MAP_NAME.map" 
@set GEN_OPTIONS=-fs_basepath "C:/Program Files/Wolfenstein - Enemy Territory" -game et 

@rem 
%Q3MAP_PATH% -meta -mv 1024 -mi 6144 -patchmeta -subdivisions 7 %GEN_OPTIONS% -v %MAP_PATH% 

@rem 
%Q3MAP_PATH% -vis -saveprt %GEN_OPTIONS% %MAP_PATH% 

@rem 
%Q3MAP_PATH% -light -v -fast -super 2 -filter -lomem -patchshadows -external -lightmapsize 512   %GEN_OPTIONS% -v %MAP_PATH% 

@pause 

Now you need to change some lines…

Line 4 points to were your q3map2.exe file is located on your hard drive: As you can see mine is located at C:/comp/q3map2.exe

yours is probably located at C:\Program Files\GtkRadiant-1.4\q3map2.exe

line 5 is were you installed w:et… I installed mine - by default - at C:/Program Files/Wolfenstein - Enemy Territory

line 6 is the path to the map you want to compile… change YOUR_MAP_NAME into the name of your map

line 10 & 13 are the bsp and vis phase

line 16 is the light stage were you get your error: here is were i’ve added the -lomem ( low memory) switch…

After you changed line 4,5 & 6 save this wordpad file as “compile.bat”

After saving double click it and your map should start compiling…

Like I said, the -lomem switch will double your compile time so be patient… :slight_smile:


(Pande) #7

you get hunc_alloc AFTER compiling? as in you have a usable .bsp with light?

Usually I just get hunc_alloc on the light stage compile, usually when I’m using lightmapscale 0.1 or something like that. Also, if your map has over 15000 brushes and your computer is rather old, even the default lightmapscale will result in hunc_alloc error. :frowning:


(dwe_flame) #8

[QUOTE=FireFly;191139]You first need to create a batch file. This might sound difficult but it’s pretty easy: Basically it’s just a text file telling the compiler were to find your w:et game and map and how to compile it…

Below is the batch file that I use for my final compiles… copy and paste it into wordpad.


@rem to use this batch file, run it from a dos window: 
@rem > compile <mapname> without the .map extension 

@set Q3MAP_PATH="C:/comp/q3map2.exe" 
@set ET_PATH="C:/Program Files/Wolfenstein - Enemy Territory" 
@set MAP_PATH="C:/Program Files/Wolfenstein - Enemy Territory/etmain/maps/YOUR_MAP_NAME.map" 
@set GEN_OPTIONS=-fs_basepath "C:/Program Files/Wolfenstein - Enemy Territory" -game et 

@rem 
%Q3MAP_PATH% -meta -mv 1024 -mi 6144 -patchmeta -subdivisions 7 %GEN_OPTIONS% -v %MAP_PATH% 

@rem 
%Q3MAP_PATH% -vis -saveprt %GEN_OPTIONS% %MAP_PATH% 

@rem 
%Q3MAP_PATH% -light -v -fast -super 2 -filter -lomem -patchshadows -external -lightmapsize 512   %GEN_OPTIONS% -v %MAP_PATH% 

@pause 

Now you need to change some lines…

Line 4 points to were your q3map2.exe file is located on your hard drive: As you can see mine is located at C:/comp/q3map2.exe

yours is probably located at C:\Program Files\GtkRadiant-1.4\q3map2.exe

line 5 is were you installed w:et… I installed mine - by default - at C:/Program Files/Wolfenstein - Enemy Territory

line 6 is the path to the map you want to compile… change YOUR_MAP_NAME into the name of your map

line 10 & 13 are the bsp and vis phase

line 16 is the light stage were you get your error: here is were i’ve added the -lomem ( low memory) switch…

After you changed line 4,5 & 6 save this wordpad file as “compile.bat”

After saving double click it and your map should start compiling…

Like I said, the -lomem switch will double your compile time so be patient… :)[/QUOTE]

it is working, and compiling at this moment,
let us pray it will work haha.

are there some techniques to prevent this error in the future ?

and is there some way to know when my map is getting too “big” (have the feeling mine is still smaller than fueldump at this moment, only more “filled”)

[QUOTE=Pande;191143]you get hunc_alloc AFTER compiling? as in you have a usable .bsp with light?

Usually I just get hunc_alloc on the light stage compile, usually when I’m using lightmapscale 0.1 or something like that. Also, if your map has over 15000 brushes and your computer is rather old, even the default lightmapscale will result in hunc_alloc error. :([/QUOTE]

dont really know how many brushes i got at this moment. how can i see?

EDIT
bushes: 15291

in that case i can start looking for non-needed brushes to delete, or combine multiple to 1 again, that is, if there are a few :rolleyes:


(dwe_flame) #9

after compiling iwth the - lomem parameters:

:frowning: :frowning: :frowning:

what to do now ?


(dwe_flame) #10

Whoooooo!!!

i made totall brushes 14999 now, and it works :smiley: :stroggbanana:


(IndyJones) #11

does it really matter how many brushes you have, for example - on terrain? you can cut rectangle via diagonal, so you have 2 triangles and it will look the same in r_showtris view…


(dwe_flame) #12

but stupid thing is, i made 14999 and it works :\

guess there is some true in it, but dont ask me why


(dwe_flame) #13

added some rocks and trees (misc_model) and the error is back… :mad:

but these count as entity.

is there again some limit on those ?

or a limit on entity + bushes = … ?


(IndyJones) #14

misc_model isn’t a real model anymore. it become a ‘brushwork’. try using them as misc_gamemodel.


(dwe_flame) #15

uff like rocks and trees, just for deco should me misc_gamemodel ?


(IndyJones) #16

try it. they won’t be compiled into .bsp.


(Pegazus) #17

All kind of limits + other useful information
http://games.chruker.dk/enemy_territory/limits.php
Once again Chruker saves the day.


(dwe_flame) #18

hahah thanx for that link :slight_smile:


(Pegazus) #19

You’re welcome. Hope it helps out a bit


(dwe_flame) #20

1 thing i dont understand here.

some of the rocks and trees are just “invisible” after the compile, but only in certain area’s. why ?

also some rocks and trees are now totally black, like there is totally NO light on it at all . again i think, why ? :confused: