safe_malloc failed error?


(bolle) #1

ok im working on a very big and heavy map, now when compiling with q3map2 2.5.3 i get the following error:


************ ERROR ************
safe_malloc failed on allocation of 155713536 bytes

i get the error when it tries to calculate the light stage

anyone know what causes this error and or knows a solution?

i also get a few errors with scripts:


WARNING: Unknown surfaceparm: "nomipmaps"

its for q3 btw
its in my own shader but in sfx as well


(bolle) #2

well i had to help my uncle move some stuff to new house
i set and older version of q3map2 to work(the one from gtk 1.2.11) and now it works?
ydnar any idea what caused the error?

well i think i can get myself in guinnes book of records
41997 total lights and it aint done yet :stuck_out_tongue:


(pazur) #3
  1. i think this happens when q3map runs out of memory(2.5.x). try to set more virtual memory (in windows xp: system properties -> advanced -> virtual memory)

  2. nomipmaps isn`t used as surfaceparm


models/natter/dish2_n
{
	allowCompress
	surfaceparm nolightmap
	nomipmaps // <- 
	cull none
	surfaceparm alphashadow

	{
		map models/natter/dish2_n.tga
		alphaFunc GE128
		depthWrite
		rgbGen vertex
	}
}


(bolle) #4

thats just it, it didn’t ran out of memory, it stopped right at the light compiling process, it finished the VIS without probs
my virtual met is 1.5gb to max 2gb with 384mb system ram, winxp task manager shows me a peak of 1.66gb while the limit is 1.9gb + 500mb extra if needed. so basically 2.4gb max, so it still had a margin of 800mb

if nomipmaps isn’t a surfaceparm, why does id use it?
i have used it for a beam shader and copied the one from sfx.shader:


textures/sfx/beam
{
        surfaceparm trans	
        surfaceparm nomarks	
        surfaceparm nonsolid
	surfaceparm nolightmap
	cull none
	surfaceparm nomipmaps
        //nopicmip
	{
		map textures/sfx/beam.tga
                tcMod Scroll .3 0
                blendFunc add
        }
        // {
	//	map textures/sfx/beam.tga
        //        tcMod Scroll -.3 0
        //        blendFunc GL_ONE GL_ONE
        // }
     
}

tho my shader misses the lower part with the comment bars and the scroll thing

another thing:
at the end of the beam texture when zooming out there forms an ugly line at the end of the beam, the further u go away the more visible it becomes, but ive seen some shots with beam textures that didn’t have this flaw, how is that possible?


(pazur) #5

nomipmaps is used like in the shader i posted (look at the arrow <-). means without the word surfaceparm before it. at least in wolf


(bolle) #6

hmm k thnx ill try it out
at least when my pc lets me do some more cpu dependand stuff then now :wink:


(chavo_one) #7

Where’d you get your beam shader? There is no sfx/beam in wolf, and the sfx/beam from Q3 looks like this:


textures/sfx/beam
{
        surfaceparm trans	
        surfaceparm nomarks	
        surfaceparm nonsolid
	surfaceparm nolightmap
	cull none
	
	{
		map textures/sfx/beam.tga
                tcMod Scroll .3 0
                blendFunc add
        }
     
}

(bolle) #8

from my sfx shader, oh well “nomipmaps” instead of “surfaceparm nomipmaps” works so dont matter anymore :slight_smile: