Help! Custom map on dedicated server error: "is not a valid BSP file".

Ecen

L1: Registered
Aug 10, 2011
8
1
Hello!

First of all, I'm not a very experienced mapper, I've done some work in hammer before though. I'm also hosting a dedicated TF2 server at a home computer but when I try to start my (work in progress) on the server to show it to my friends I get the following error (I'm using the command 'changelevel mapname'):

CModelLoader::Map_IsValid: 'maps/ctf_hospital_gamma.bsp' is not a valid BSP file.
changelevel failed: ctf_hospital_gamma not found

(the map name is 'ctf_hospital_gamma')
An earlier version of the map have been runable on the server as well as all stock maps and another of my custom maps. I've tried removing and re-adding the map from the server directory, recompiled it and tried removing cubemaps. I've also fixed all errors that showed up in the scanning log using the Interlopers error-listing tool (which was to remove all my displacement).

The map is however fully playable on the in-game creatable (LAN only?) server. That is both now and before removing anything.

I'm running Source SDK on:

Engine version: 2009
Current game: Team Fortress 2

I'm creating the map on a Windows 7 PC and the server is running on a
Windows XP PC. Sourcemod is installed with a few plugins.

Any ideas of what I could do? Any more information needed?

Here is my recompile log (sorry for the long list but I can't find any spoiler tag or similar):

** Executing...
** Command: "c:\program files (x86)\steam\steamapps\ecen_silver\sourcesdk\bin\orangebox\bin\vbsp.exe"
** Parameters: -game "c:\program files (x86)\steam\steamapps\ecen_silver\team fortress 2\tf" "C:\Program Files (x86)\Steam\steamapps\ecen_silver\sourcesdk_content\tf\mapsrc\ctf_hospital_gamma.vmf"

Valve Software - vbsp.exe (Jul 7 2010)
2 threads
materialPath: c:\program files (x86)\steam\steamapps\ecen_silver\team fortress 2\tf\materials
Loading C:\Program Files (x86)\Steam\steamapps\ecen_silver\sourcesdk_content\tf\mapsrc\ctf_hospital_gamma.vmf
ConVarRef mat_reduceparticles doesn't point to an existing ConVar
Patching WVT material: maps/ctf_hospital_gamma/dev/dev_blendmeasure_wvt_patch
Patching WVT material: maps/ctf_hospital_gamma/nature/blendrockgroundwallforest_wvt_patch
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 (1)
Processing areas...done (0)
Building Faces...done (0)
Chop Details...done (0)
Find Visible Detail Sides...done (0)
Merging details...done (0)
FixTjuncs...
PruneNodes...
WriteBSP...
done (0)
writing C:\Program Files (x86)\Steam\steamapps\ecen_silver\sourcesdk_content\tf\mapsrc\ctf_hospital_gamma.prt...Building visibility clusters...
done (0)
Creating default LDR cubemaps for env_cubemap using skybox materials:
skybox/sky_day01_09*.vmt
! Run buildcubemaps in the engine to get the correct cube maps.
Creating default HDR cubemaps for env_cubemap using skybox materials:
skybox/sky_day01_09*.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 (0) (113937 bytes)
Placing detail props : 0...1...2...3...4...5...6...7...8...9...10
Compacting texture/material tables...
Reduced 295 texinfos to 199
Reduced 69 texdatas to 60 (1717 bytes to 1376)
Writing C:\Program Files (x86)\Steam\steamapps\ecen_silver\sourcesdk_content\tf\mapsrc\ctf_hospital_gamma.bsp
5 seconds elapsed

** Executing...
** Command: "c:\program files (x86)\steam\steamapps\ecen_silver\sourcesdk\bin\orangebox\bin\vvis.exe"
** Parameters: -game "c:\program files (x86)\steam\steamapps\ecen_silver\team fortress 2\tf" "C:\Program Files (x86)\Steam\steamapps\ecen_silver\sourcesdk_content\tf\mapsrc\ctf_hospital_gamma"

Valve Software - vvis.exe (Jul 7 2010)
2 threads
reading c:\program files (x86)\steam\steamapps\ecen_silver\sourcesdk_content\tf\mapsrc\ctf_hospital_gamma.bsp
reading c:\program files (x86)\steam\steamapps\ecen_silver\sourcesdk_content\tf\mapsrc\ctf_hospital_gamma.prt
623 portalclusters
1969 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 (64)
Optimized: 406 visible clusters (0.00%)
Total clusters visible: 93458
Average clusters visible: 150
Building PAS...
Average clusters audible: 545
visdatasize:86732 compressed from 99680
writing c:\program files (x86)\steam\steamapps\ecen_silver\sourcesdk_content\tf\mapsrc\ctf_hospital_gamma.bsp
1 minute, 4 seconds elapsed

** Executing...
** Command: "c:\program files (x86)\steam\steamapps\ecen_silver\sourcesdk\bin\orangebox\bin\vrad.exe"
** Parameters: -game "c:\program files (x86)\steam\steamapps\ecen_silver\team fortress 2\tf" "C:\Program Files (x86)\Steam\steamapps\ecen_silver\sourcesdk_content\tf\mapsrc\ctf_hospital_gamma"

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

Valve Radiosity Simulator
2 threads
[Reading texlights from 'lights.rad']
[34 texlights parsed from 'lights.rad']

Loading c:\program files (x86)\steam\steamapps\ecen_silver\sourcesdk_content\tf\mapsrc\ctf_hospital_gamma.bsp
Setting up ray-trace acceleration structure... Done (0.63 seconds)
1629 faces
619759 square feet [89245336.00 square inches]
0 Displacements
0 Square Feet [0.00 Square Inches]
1629 patches before subdivision
32151 patches after subdivision
0 direct lights
BuildFacelights: 0...1...2...3...4...5...6...7...8...9...10 (1)
BuildVisLeafs: 0...1...2...3...4...5...6...7...8...9...10 (7)
transfers 2475690, max 326
transfer lists: 18.9 megs
GatherLight: 0...1...2...3...4...5...6...7...8...9...10 (0)
Bounce #1 added RGB(0, 0, 0)
Build Patch/Sample Hash Table(s).....Done<0.0231 sec>
FinalLightFace: 0...1...2...3...4...5...6...7...8...9...10 (3)
FinalLightFace Done
0 of 0 (0% of) surface lights went in leaf ambient cubes.
ThreadComputeLeafAmbient: 0...1...2...3...4...5...6...7...8...9...10 (8)
Writing leaf ambient...done
Ready to Finish

Object names Objects/Maxobjs Memory / Maxmem Fullness
------------ --------------- --------------- --------
models 14/1024 672/49152 ( 1.4%)
brushes 313/8192 3756/98304 ( 3.8%)
brushsides 2018/65536 16144/524288 ( 3.1%)
planes 856/65536 17120/1310720 ( 1.3%)
vertexes 2671/65536 32052/786432 ( 4.1%)
nodes 1201/65536 38432/2097152 ( 1.8%)
texinfos 199/12288 14328/884736 ( 1.6%)
texdata 60/2048 1920/65536 ( 2.9%)
dispinfos 0/0 0/0 ( 0.0%)
disp_verts 0/0 0/0 ( 0.0%)
disp_tris 0/0 0/0 ( 0.0%)
disp_lmsamples 0/0 0/0 ( 0.0%)
faces 1629/65536 91224/3670016 ( 2.5%)
hdr faces 0/65536 0/3670016 ( 0.0%)
origfaces 794/65536 44464/3670016 ( 1.2%)
leaves 1216/65536 38912/2097152 ( 1.9%)
leaffaces 1957/65536 3914/131072 ( 3.0%)
leafbrushes 776/65536 1552/131072 ( 1.2%)
areas 2/256 16/2048 ( 0.8%)
surfedges 10911/512000 43644/2048000 ( 2.1%)
edges 6501/256000 26004/1024000 ( 2.5%)
LDR worldlights 0/8192 0/720896 ( 0.0%)
HDR worldlights 0/8192 0/720896 ( 0.0%)
leafwaterdata 0/32768 0/393216 ( 0.0%)
waterstrips 141/32768 1410/327680 ( 0.4%)
waterverts 0/65536 0/786432 ( 0.0%)
waterindices 2205/65536 4410/131072 ( 3.4%)
cubemapsamples 0/1024 0/16384 ( 0.0%)
overlays 20/512 7040/180224 ( 3.9%)
LDR lightdata [variable] 1575176/0 ( 0.0%)
HDR lightdata [variable] 0/0 ( 0.0%)
visdata [variable] 86732/16777216 ( 0.5%)
entdata [variable] 5733/393216 ( 1.5%)
LDR ambient table 1216/65536 4864/262144 ( 1.9%)
HDR ambient table 1216/65536 4864/262144 ( 1.9%)
LDR leaf ambient 701/65536 19628/1835008 ( 1.1%)
HDR leaf ambient 1216/65536 34048/1835008 ( 1.9%)
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/12 ( 8.3%)
static props [variable] 1/6002 ( 0.0%)
pakfile [variable] 213939/0 ( 0.0%)
physics [variable] 113937/4194304 ( 2.7%)
physics terrain [variable] 2/1048576 ( 0.0%)

Level flags = 0

Total triangle count: 4446
Writing c:\program files (x86)\steam\steamapps\ecen_silver\sourcesdk_content\tf\mapsrc\ctf_hospital_gamma.bsp
19 seconds elapsed

** Executing...
** Command: Copy File
** Parameters: "C:\Program Files (x86)\Steam\steamapps\ecen_silver\sourcesdk_content\tf\mapsrc\ctf_hospital_gamma.bsp" "c:\program files (x86)\steam\steamapps\ecen_silver\team fortress 2\tf\maps\ctf_hospital_gamma.bsp"
 

Ecen

L1: Registered
Aug 10, 2011
8
1
And erhm... sorry for double-posting. The server didn't seem to accept a post the first time I clicked send...
 

Jeremy

L11: Posh Member
Oct 24, 2010
829
299
Chances are, the map isn't in the dedicated server directory. Go to wherever the dedicated server files are (for me it's C:\Program Files\Valve\HLserver\tf\orangebox\tf; yours might be different) and see if ctf_hospital_gamma is in the 'maps' folder.

Remember that dedicated servers require you to copy over all the files from the tf directory.
 
Last edited:

gamemaster1996

L13: Stunning Member
Sep 30, 2009
1,064
134
Is it in the server files?
 

Ecen

L1: Registered
Aug 10, 2011
8
1
Thanks for answer SirRaffi!

That is sadly not the case though. I've copied the map file from my computer directly to the correct location on the server computer. I did also double-check this just now to be 100% sure.

Any more ideas anyone?
 
Last edited:

Ecen

L1: Registered
Aug 10, 2011
8
1
Yes, it is, sadly that wasn't the mistake. Thanks for answering though!
 

Wander

L3: Member
Sep 16, 2010
148
55
Do you have the same problem with other custom maps? If so, your server might simply be corrupted
You could try reinstalling the dedi server
Make sure that after uninstalling it you also remove "....\Steam\steamapps\username\source 2007 dedicated server\", in case any broken files stay behind
 

Wander

L3: Member
Sep 16, 2010
148
55
Do you have the same problem with other custom maps? If so, your server might simply be corrupted
You could try reinstalling the dedi server
Make sure that after uninstalling it you also remove "....\Steam\steamapps\username\source 2007 dedicated server\", in case any broken files stay behind
 

Ecen

L1: Registered
Aug 10, 2011
8
1
Wander, I did a new check just to be sure and I do not have any problems with another custom map of mine. That one works perfectly fine. Would you recommend re-installing the server anyway? I don't really want to if it's not necessary but if you think it could work ill give it a try.

I can also add to the information that the error message:

Code:
CModelLoader::Map_IsValid: 'maps/ctf_hospital_gamma.bsp' is not a valid BSP file.

Is printed in the server console everytime I use the 'changelevel' command. It seems that it is printed twice everytime... if that would help somehow.
 

A Boojum Snark

Toraipoddodezain Mazahabado
aa
Nov 2, 2007
4,775
7,669
Common sense check: have you uploaded it to the server a second time and/or verified the size/hash? That error would be given for a truncated or otherwise corrupt file.
 

Ecen

L1: Registered
Aug 10, 2011
8
1
Thank you! I found the problem!

I did however upload it several times and the size was correct. However, when I got thinking of a corrupt file I remembered that one of my USB sticks, that I use to transfer the map, had been corrupting files about a year ago. I had thought that the problem was gone, but it seems it isn't. So when I switched to another USB-stick the problem was solved. Thank you everyone!

Now I just got to deal with this USB memory. Ill guess I try to format it again, but that's nothing for this forum I guess :)
 

Terr

Cranky Coder
aa
Jul 31, 2009
1,590
410
If it's a cheap one, you might be better off throwing/giving it away, if it has a tendency to accidentally corrupt important work.
 

lana

Currently On: ?????
aa
Sep 28, 2009
3,075
2,778
If you can, maybe it would be best to use Dropbox for transferring your files rather than a USB drive.
 

Ecen

L1: Registered
Aug 10, 2011
8
1
Yea, I usually do use Dropbox. As the distance between my computer and the server is currently only 50cm it was actually to use a USB drive, or well... It was supposed to be, heh ^^

So, I've now set up a Sugarsync account to sync my hlserver/orangebox/tf/maps folder directly. That should do it.