HL2.exe crash whilst running my map

Hi, this is my first post on the facepunch forums and it is in regards to some kind of an error I get while running my map.
My map runs off HL2 ep2. Loading the map is quick and smooth. The map itself runs perfectly fine for up to 1 minute, that’s where I get a hl2.exe has stopped working, and the game crashes.

Map Facts:
I have chosen to render shadows for props accurately with some more parameters to compile, see below. This lets props cast shadows on each other realistically.
Most of the playable area is created with displacements. The displacement light maps are set to 2. The displacement-ed area isn’t extremely big.
There are no leaks.
Yes I do have an info_player_start entity in my map and it does not clash with any brushes etc.
There are more than 25 pine_0* static props in my map.

Below is the compile history: (Note I have added the following parameters to ‘final’ compile: -final -both -StaticPropPolys -TextureShadows -staticproplighting -game)

Default Compile:
** Executing…
** Command: “c:\program files (x86)\steam\steamapps*\sourcesdk\bin\orangebox\bin\vbsp.exe"
** Parameters: -game "c:\program files (x86)\steam\steamapps*
\half-life 2 episode two\ep2” “c:\users****\documents\forest_01”

Valve Software - vbsp.exe (Jul 7 2010)
8 threads
materialPath: c:\program files (x86)\steam\steamapps*\half-life 2 episode two\ep2\materials
Loading c:\users*
\documents\forest_01.vmf
Could not locate ‘GameData’ key in c:\program files (x86)\steam\steamapps*\half-life 2 episode two\ep2\gameinfo.txt
fixing up env_cubemap materials on brush sides…
ProcessBlock_Thread: 0…1…2…3…4…5…6…7…8…9…10 (0)
ProcessBlock_Thread: 0…1…2…3…4…5…6…7…8…9…10 (0)
Processing areas…done (0)
Building Faces…done (0)
FixTjuncs…
PruneNodes…
WriteBSP…
done (0)
writing c:\users*
\documents\forest_01.prt…Building visibility clusters…
done (0)
Creating default LDR cubemaps for env_cubemap using skybox materials:
skybox/sky_ep02_01_hdr*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
Creating default HDR cubemaps for env_cubemap using skybox materials:
skybox/sky_ep02_01_hdr*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
Finding displacement neighbors…
Finding lightmap sample positions…
Displacement Alpha : 0…1…2…3…4…5…6…7…8…9…10
Building Physics collision data…
done (1) (2923 bytes)
Placing detail props : 0…1…2…3…4…5…6…7…8…9…10
Compacting texture/material tables…
Reduced 10 texinfos to 5
Reduced 6 texdatas to 5 (137 bytes to 97)
Writing c:\users****\documents\forest_01.bsp
9 seconds elapsed

** Executing…
** Command: “c:\program files (x86)\steam\steamapps*\sourcesdk\bin\orangebox\bin\vvis.exe"
** Parameters: -game "c:\program files (x86)\steam\steamapps*
\half-life 2 episode two\ep2” “c:\users****\documents\forest_01”

Valve Software - vvis.exe (Jul 7 2010)
8 threads
reading c:\users\zumzum\documents\forest_01.bsp
reading c:\users\zumzum\documents\forest_01.prt
26 portalclusters
71 numportals
BasePortalVis: 0…1…2…3…4…5…6…7…8…9…10 (0)
PortalFlow: 0…1…2…3…4…5…6…7…8…9…10 (1)
Optimized: 0 visible clusters (0.00%)
Total clusters visible: 676
Average clusters visible: 26
Building PAS…
Average clusters audible: 26
visdatasize:420 compressed from 416
writing c:\users\zumzum\documents\forest_01.bsp
1 second elapsed

** Executing…
** Command: “c:\program files (x86)\steam\steamapps\zumzumz\sourcesdk\bin\orangebox\bin\vrad.exe”
** Parameters: -game “c:\program files (x86)\steam\steamapps\zumzumz\half-life 2 episode two\ep2” “c:\users\zumzum\documents\forest_01”

Valve Software - vrad.exe SSE (Jul 7 2010)

  Valve Radiosity Simulator     

8 threads
[Reading texlights from ‘lights.rad’]
[48 texlights parsed from ‘lights.rad’]

Loading c:\users\zumzum\documents\forest_01.bsp
Setting up ray-trace acceleration structure… Done (1.36 seconds)
110 faces
179360 square feet [25827840.00 square inches]
64 Displacements
32779 Square Feet [4720309.00 Square Inches]
110 patches before subdivision
47492 patches after subdivision
sun extent from map=0.017452
2 direct lights
BuildFacelights: 0…1…2…3…4…5…6…7…8…9…10 (20)
BuildVisLeafs: 0…1…2…3…4…5…6…7…8…9…10 (3)
transfers 720107, max 177
transfer lists: 5.5 megs
GatherLight: 0…1…2…3…4…5…6…7…8…9…10 (1)
Bounce #1 added RGB(20619, 18385, 4361)
GatherLight: 0…1…2…3…4…5…6…7…8…9…10 (1)
Bounce #2 added RGB(3346, 2914, 626)
GatherLight: 0…1…2…3…4…5…6…7…8…9…10 (1)
Bounce #3 added RGB(42, 38, 3)
GatherLight: 0…1…2…3…4…5…6…7…8…9…10 (1)
Bounce #4 added RGB(23, 20, 2)
GatherLight: 0…1…2…3…4…5…6…7…8…9…10 (0)
Bounce #5 added RGB(1, 0, 0)
Build Patch/Sample Hash Table(s)…Done<0.0641 sec>
FinalLightFace: 0…1…2…3…4…5…6…7…8…9…10 (46)
FinalLightFace Done
Computing detail prop lighting : 0…1…2…3…4…5…6…7…8…9…10
0 of 0 (0% of) surface lights went in leaf ambient cubes.
ThreadComputeLeafAmbient: 0…1…2…3…4…5…6…7…8…9…10 (2)
Writing leaf ambient…done
Ready to Finish

Object names Objects/Maxobjs Memory / Maxmem Fullness


models 1/1024 48/49152 ( 0.1%)
brushes 7/8192 84/98304 ( 0.1%)
brushsides 42/65536 336/524288 ( 0.1%)
planes 84/65536 1680/1310720 ( 0.1%)
vertexes 158/65536 1896/786432 ( 0.2%)
nodes 77/65536 2464/2097152 ( 0.1%)
texinfos 5/12288 360/884736 ( 0.0%)
texdata 5/2048 160/65536 ( 0.2%)
dispinfos 64/0 11264/0 ( 0.0%)
disp_verts 18496/0 369920/0 ( 0.0%)
disp_tris 32768/0 65536/0 ( 0.0%)
disp_lmsamples 4574080/0 4574080/0 ( 0.0%)
faces 110/65536 6160/3670016 ( 0.2%)
hdr faces 0/65536 0/3670016 ( 0.0%)
origfaces 72/65536 4032/3670016 ( 0.1%)
leaves 79/65536 2528/2097152 ( 0.1%)
leaffaces 56/65536 112/131072 ( 0.1%)
leafbrushes 43/65536 86/131072 ( 0.1%)
areas 2/256 16/2048 ( 0.8%)
surfedges 732/512000 2928/2048000 ( 0.1%)
edges 421/256000 1684/1024000 ( 0.2%)
LDR worldlights 2/8192 176/720896 ( 0.0%)
HDR worldlights 0/8192 0/720896 ( 0.0%)
leafwaterdata 1/32768 12/393216 ( 0.0%)
waterstrips 0/32768 0/327680 ( 0.0%)
waterverts 0/65536 0/786432 ( 0.0%)
waterindices 0/65536 0/131072 ( 0.0%)
cubemapsamples 0/1024 0/16384 ( 0.0%)
overlays 0/512 0/180224 ( 0.0%)
LDR lightdata [variable] 4064512/0 ( 0.0%)
HDR lightdata [variable] 0/0 ( 0.0%)
visdata [variable] 420/16777216 ( 0.0%)
entdata [variable] 1097/393216 ( 0.3%)
LDR ambient table 79/65536 316/262144 ( 0.1%)
HDR ambient table 79/65536 316/262144 ( 0.1%)
LDR leaf ambient 373/65536 10444/1835008 ( 0.6%)
HDR leaf ambient 79/65536 2212/1835008 ( 0.1%)
occluders 0/0 0/0 ( 0.0%)
occluder polygons 0/0 0/0 ( 0.0%)
occluder vert ind 0/0 0/0 ( 0.0%)
detail props [variable] 1/71020 ( 0.0%)
dtl prp lght [variable] 1/4 (25.0%)
HDR dtl prp lght [variable] 1/4 (25.0%)
static props [variable] 1/1418 ( 0.1%)
pakfile [variable] 105951/0 ( 0.0%)
physics [variable] 2923/4194304 ( 0.1%)
physics terrain [variable] 76398/1048576 ( 7.3%)

Level flags = 0

Total triangle count: 224
Writing c:\users****\documents\forest_01.bsp
1 minute, 17 seconds elapsed

** Executing…
** Command: Copy File
** Parameters: “c:\users\zumzum\documents\forest_01.bsp” “c:\program files (x86)\steam\steamapps****\half-life 2 episode two\ep2\maps\forest_01.bsp”

If anyone could help that would be great, I’ll post screenshots when it isn’t so late.

Have you edited lights.rad? Im pretty sure you need that for the shadows.

I was going to edit lights.rad but it seemed to work without editing it on one of my previous maps, so I kept it as it is.

You don’t need to unless you want to add a custom model’s alpha channel to cast shadows.

You said you had the lightmap on the displacement set to two. Did you mean the power of the displacement or the actual lightmap scale. If you meant the lightmap scale maybe try raising it. Have you tried optimizing?

Other things can cause a crash. For example, having a logic_auto to start an even after a delay when the map starts but not unchecking the “remove on fire” flag will cause a map crash.

@Firegod: Lightmap scale, I have tried running the map with lightmap scale set to 32 but to no avail.
@IronPheonix: There are currently no logic_autos in the map, just barebones entities aka info_player_start, light_environment, water_lod_control. One sec I’ll post a screenshot

Edit: It’s no longer lasting long enough to take a screenshot

Use the cordon tool to compile parts of the map until you find an area where it crashes to see what causes the crash.

Most of the playable area is created with displacements. < Make sure they’re not power to 4 - It’s the most common cause of a crash

I see

I cam confirm that displacement power of 4 crashes alot.