Help - safe malloc failed IN BSP


(Massive) #1

Safe_malloc failed ona llocation of 8 bytes

In BSP MergeMetaTriangle Phase.

I had NOT run out of memmory - v mem peaked at about 2.3 Gb out of 9.3Gb

Could htis be a bad patch / brush somewhere - how to remove, if so?

Output dumpt below…

Thanks for any help

Massive

(the -lomem in the line below does absolutely nothing of course & isn’t the cause of this)


C:\>"e:/Program Files/GtkRadiant-1.4/q3map2_16/q3map2" -meta -lomem -v -fs_basep
ath "e:/Program Files/Wolfenstein - Enemy Territory" -game et "e:/Program Files/
Wolfenstein - Enemy Territory/etmain/maps/lmsm1.map"
2.5.16
1 threads
Q3Map         - v1.0r (c) 1999 Id Software Inc.
Q3Map (ydnar) - v2.5.16
GtkRadiant    - v1.5.0 Oct  8 2004 08:08:27
Voter turnout
--- InitPaths ---
VFS Init: e:/Program Files/Wolfenstein - Enemy Territory/etmain/

--- BSP ---
Creating meta surfaces from brush faces
WARNING: Unknown option "-lomem"
entering scripts/shaderlist.txt
entering scripts/_unsorted.shader
... blar blar blar - I'll put it back in if important, but........
entering scripts/xlab_props.shader
entering scripts/xlab_wall.shader
     2328 shaderInfo
--- LoadMapFile ---
Loading e:/Program Files/Wolfenstein - Enemy Territory/etmain/maps/lmsm1.map
entering e:/Program Files/Wolfenstein - Enemy Territory/etmain/maps/lmsm1.map
Entity 0 (worldspawn) has lightmap scale of 4.0000
Entity 66 (func_group) has lightmap scale of 0.5000
Entity 69 (func_group) has lightmap scale of 0.5000
Entity 394 (func_group) has lightmap scale of 0.1000
Entity 724 (func_group) has lightmap scale of 0.5000
    11357 total world brushes
    11251 detail brushes
     6042 patches
    19169 boxbevels
     7820 edgebevels
      685 entities
    66478 planes
        0 areaportals
Size: -2770, -4084,  -688 to 12196, 10804,  4160
--- ProcessDecals ---
        0 decal projectors
--- CreateMapFogs ---
        1 fogs
############### model 0 ###############
block size = { 4096 4096 4096 }
BSP bounds: { -2770.000000 -4084.000000 -688.000000 } { 12196.000000 10804.00000
0 4160.000000 }
Lightgrid bounds: { -2171.000000 -3489.000000 -453.000000 } { 11597.000000 10202
.000000 3960.000000 }
--- PatchMapDrawSurfs ---
BOGUS FloatPlane: bad normal
BOGUS FloatPlane: bad normal
     6038 patches
      926 patch LOD groups
--- FaceBSP ---
     4346 faces
     6710 leafs
--- MakeTreePortals ---
       16 tiny portals
        0 bad portals
--- FilterStructuralBrushesIntoTree ---
      766 structural brushes
    14446 cluster references
--- FloodEntities ---
Entity 226, Brush 0: Entity leaked
     2633 flooded leafs
--- FillOutside ---
     3876 solid leafs
      201 leafs filled
     2633 inside leafs
--- CullSides ---
     3911 hidden faces culled
      487 coincident faces culled
--- ClipSidesIntoTree ---
--- FaceBSP ---
     2744 faces
     4407 leafs
--- MakeTreePortals ---
       23 tiny portals
        0 bad portals
--- FilterStructuralBrushesIntoTree ---
      766 structural brushes
    10735 cluster references
--- NumberClusters ---
     2306 visclusters
     7415 visportals
     7109 solidfaces
--- WritePortalFile ---
writing e:/Program Files/Wolfenstein - Enemy Territory/etmain/maps/lmsm1.prt
--- FloodAreas ---
        1 areas
--- AddTriangleModels ---
--- AddEntitySurfaceModels ---
--- FilterDetailBrushesIntoTree ---
    10625 detail brushes
    37370 cluster references
----- FogDrawSurfs -----
       18 fog polygon fragments
        0 fog patch fragments
       17 fogged drawsurfs
--- SubdivideFaceSurfaces ---
--- FixTJunctions ---
    44684 axial edge lines
    20436 non-axial edge lines
       19 degenerate edges
WARNING: Degenerate T-junction edge found, fixing...
WARNING: Degenerate T-junction edge found, fixing...
WARNING: Degenerate T-junction edge found, fixing...
    32401 verts added for T-junctions
   177661 total verts
    27521 naturally ordered
     7437 rotated orders
     1093 can't order
        2 broken (degenerate) surfaces removed
--- ClassifyEntitySurfaces ---
--- TidyEntitySurfaces ---
        8 empty or malformed surfaces deleted
--- MakeEntityDecals ---
 (0)
        0 decal surfaces
--- MakeEntityMetaTriangles ---
0...1...2...3...4...5...6...7...8...9... (5)
    36082 total meta surfaces
    35439 stripped surfaces
      620 fanned surfaces
        0 patch meta surfaces
   180913 meta verts
   108697 meta triangles
--- TidyEntitySurfaces ---
    36082 empty or malformed surfaces deleted
--- SmoothMetaTriangles ---
0...1...2...3...4...5...6...7...8...9... (254)
    18029 smoothed vertexes
--- MergeMetaTriangles ---
0...1...WARNING: Flipped triangle: (  5824   4088    930) (  5765   4059    930)
 (  5805   4078    930)
2...3...4...5...6...WARNING: Flipped triangle: (  4412   2054    653) (  4412
2054    630) (  4412   2054    646)
7...************ ERROR ************
safe_malloc failed on allocation of 8 bytes



(Shaderman) #2

I’d try to fix those flipped triangles because I think that q3map2 has a probleme here.


(Massive) #3

Flipped Tris - Fixed - no joy :frowning: - any other ideas anyone - I’m pretty desperate here !!?!?!?

Thanks

Massive


(DAbell) #4

Hey Massive

I thinks this link may help you out.

http://www.modsonline.com/index.php?mod=MapErrors&op=verr&id=11

Hope this helps.

<DJ>

edit - I have had flipped traingles before and it shouldn’t affect the compile process you might just have to search for some funky triangles in your map, try using bursh clean up. Also look at the coordinates and find the relevent triangles in radiant.


(Massive) #5

Thaks DJ - I’ve been through all the posts & this one - no help I’m afraid. It’s not in the light stage of the compile & like I say I’m only using a shade under 3 GB of virtual memory out of a possible 9Gb.

Thanks anyway

M


(Shaderman) #6

If you send me your map I could try to compile it here to see if it’s map related or if something must be wrong with your computer / settings / whatever.


(Massive) #7

Thanks - I’m pairing it down - taken out models, patches, all structural brushes & several hunks of details brush - still getting error. This paired down version is at 7Mb or so - you got any quick way of transferring? (my Email will bounce at this size)

Massive


(Shaderman) #8

You could compress and split (maybe 1.44 MB) the file with WinRAR.


(Massive) #9

ui have an eMail address i can send to?


(Massive) #10

ok - here

http://www.badongo.com/file.php?file=map__2005-12-13_l_3.zip


(Shaderman) #11

I compiled it (BSP -meta -v) without problems:

1 threads
Q3Map         - v1.0r (c) 1999 Id Software Inc.
Q3Map (ydnar) - v2.5.16
GtkRadiant    - v1.5.0 Oct  8 2004 08:08:27
.
.
.
tons of "Couldn't find image for shader" warnings (I think we can ignore them)
.
.
nothing unusual here I'd say
.
.
--- FixTJunctions ---      (130 seconds for this part which is very much I think - about 150 MB RAM used)
.
.
.
--- MergeMetaTriangles ---
0...1...2...3...WARNING: Flipped triangle: (  4892   3663   1928) (  4892   3663   1912) (  4892   3663   1912)
4...5...6...7...8...9... (10)

Still a flipped triangle here. Could this break a compile?
.
    23269 surfaces merged
   306820 vertexes merged
--- FilterDrawsurfsIntoTree ---
    42257 references
    23269 (23269) emitted drawsurfs
    31079 stripped face surfaces
      530 fanned face surfaces
        0 surface models generated
        0 skybox surfaces generated
        0 SURFACE_BAD surfaces
        0 SURFACE_FACE surfaces
        0 SURFACE_PATCH surfaces
        0 SURFACE_TRIANGLES surfaces
        0 SURFACE_FLARE surfaces
        0 SURFACE_FOLIAGE surfaces
        0 SURFACE_FORCED_META surfaces
    23269 SURFACE_META surfaces
        0 SURFACE_FOGHULL surfaces
        0 SURFACE_DECAL surfaces
        0 SURFACE_SHADER surfaces
   174408 redundant indexes supressed, saving 681 Kbytes
--- FixBrushSides ---
--- EndModel ---
      107 light entities stripped
    61918 BSP planes
--- WriteSurfaceExtraFile ---
Writing C:\Spiele\ET2\etmain\maps\l_3.srf
Writing C:\Spiele\ET2\etmain\maps\l_3.bsp
Wrote 11.2 MB (11714616 bytes)
      148 seconds elapsed
Disconnecting

So what did I see?

130 of 148 seconds are spent for the FixTJunctions part. I don’t know if this is ok or if there could be a problem with your brushwork. After this part, the compile is finished very fast and memory usage is going up to ~ 207 MB. How much RAM do you have?. It might be not enough, but please - before you buy some RAM - wait for a competent answer :slight_smile: Maybe someone can tell you more with those last lines of my compile output which you don’t get.


(kamikazee) #12

Too long FixTJunctions part -> maybe too much large brushes overlapping each other?
With real clean brushwork, this shouldn’t take too long. Allso mind detail/structural work.


(nUllSkillZ) #13

As far as I remember there’s a compile option for low memory.
And as far as I remember it’s “-lomem” (no typing error: without w).
You could also search the forums here for lomem or lowmem.
May be this solves your problem.


(Shaderman) #14

I’d say structure/detail/hinting part looks good so far.

AFAIK -lomem is for the light stage only :confused:


(Massive) #15

Thanks Shaderman

I have 1Gig of physical RAM, but during the post-FixTJunction part mem usage is going up to 3Gig !!! not 207 MB? There is something seriously wierd going on here.

Previously my BSP compile has had the same kind of performance shape as you reported. 2 days ago I hit the MAX_Edge_thingy limit in the Fix T-Junctions & did a lot of brush word to fix T-Junctions etc.

The Safe_malloc error I’m getting is for 8 bytes which makes me think its a bad Int allocation or something with the limked list structures (or however he’s doing it) - rather than a machine memory thing. My brain hurts…

(The paired down map - which is also giving the error has NO structural brushes inm ('cept the boundry of course) as it is all hull caulk method. )

EDIT - if you wouldn’t mind Shaderman could you try the full map = http://www.badongo.com/file.php?file=full+map__2005-12-13_lmsm1.rar on a bsp compile? see what you get?

Thanks

Massive


(Massive) #16

Hey - thanks Shaderman, your compile was just what I needed - it meant its either my setup or my machine; so I re-installed everything this AM & I get a good compile, with the same timings as you. A corrupted something somewhere…!

Thanks

Massive


(]UBC[ McNite) #17

Too long FixTJunctions part -> maybe too much large brushes overlapping each other?

Since when is overlapping brushes the reason for added tris due to t-junctions?
Afaik you get t-junctions whenever or most of the times there is an edge/plane of a brush touching (not overlapping/ going into) the plane of another brush. I ll post a screenie of what I mean tonight.


(kamikazee) #18

[quote=]UBC[ McNite]

Too long FixTJunctions part -> maybe too much large brushes overlapping each other?

Since when is overlapping brushes the reason for added tris due to t-junctions?
Afaik you get t-junctions whenever or most of the times there is an edge/plane of a brush touching (not overlapping/ going into) the plane of another brush. I ll post a screenie of what I mean tonight.[/quote]I know what T-junctions are, it’s just I can’t explain it as good as you. :smiley:
I meant touching brushes, only said it wrong now I look at it again…
BTW: No need to post screenies, Ifurita has made a decent tutorial on it: Tutorial: T-Junctions But thx anyway.


(Massive) #19

Not Fixed - but getting wierder

Ok so I cleanedmy set-up -reinstalled ET, Radient & q3map2 - compile great as I said above. However now it has flipped back to the error compile I reported initially. (screems in frustration).
All I’ve done is edited in Radient (2 progs running at once) and done a different bsp -patchmeta compile for ASE creation followed by converts. And now…

Could this be a q3map2 using the wrong dll type error?

M


(Massive) #20

it hiding in the shaders…

…lurcking

ha.haha ha ha ha