Game crashes/freezes while running map

  • Site Migration: See bugs? Report them here. Want something changed or have an idea? Suggest it here.

Gravidea

L4: Comfortable Member
Apr 17, 2017
187
So I'm coming close to completing my map, but I've run into a problem that I'm hoping won't take too long to fix so I can share my map. When I compile my map, it seems to work just fine, but when I go into my game to test it the client will freeze and pull out of fullscreen, only leaving a small borderless window of my game that won't allow me to do anything. Granted when this happens I can move my mouse out of the game and close the game via task manager, but I'm hoping this is just from testing the map and not because the map is actually broken.

I'm thinking it could be because my map needs more func_details? My map has a tonne of brushes on it, and it's mostly made up of brushes so I'm wondering if this might be a problem. Maybe should I turn a bunch of brushes into details and that might fix it? If you need any more information that could be used to help me out, I'll get what you need. Thank you in advance.
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,341
It looks like you've got a leak in your map. Although it is usually technically possible to compile and run a leaking map, it can sometimes cause issues, including lighting and optimization issues. Just for kicks, seal your map and try again.

Protip: The cordon tools allow you to easily seal your map by defining a large skybox around your map, which is useful for testing. Objects outside the cordon box won't be included in your compile, so you can shrink your cordon box to only compile parts of your map if compiling takes a long time (such as lighting test compiles). :cordonenable: toggles cordon mode on and off (you'll see a red box representing the cordon box when enabled), and :cordonedit: to edit the bounds of the cordon box. However, when you release your map, don't use the cordon tools for your release compile! Your map should be sealed by the geometry of your map. Using cordon tools in a final compile can result in optimization issues.
 

Gravidea

L4: Comfortable Member
Apr 17, 2017
187
I doubt it was a leak, otherwise the water texture on my map would be bugging out, but that's not the case. The whole map was working just fine, and then this suddenly started happening. Despite that, just in case, do you think you could tell me how to find leaks in the program? I remember there being a way, but I don't recall how.

As for the cordon tool, is this only a temporary solution to the problem? And what's the problem with putting it in the final compile? Are you trying to say that this problem I'm having is only because I'm trying to run it in hammer?
 

Micnax

Back from the dead (again)
aa
Apr 25, 2009
2,108
It may be an entity problem that's causing the crash since it isn't happening right up on map load.

Does the crash happen when something specific happens in-game (ie. right after spawning as a class, capture point about to unlock, logic_auto firing etc.)?
 

Da Spud Lord

Occasionally I make maps
aa
Mar 23, 2017
1,341
Despite that, just in case, do you think you could tell me how to find leaks in the program? I remember there being a way, but I don't recall how.
Map > Load Pointfile, View > Go to..., and enter the coordinates of the leaking entity.

As for the cordon tool, is this only a temporary solution to the problem? And what's the problem with putting it in the final compile?
It is a temporary solution to the problem of your map leaking. The reason you shouldn't use it for a final compile is the same reason you shouldn't surround your map in a giant skybox box- it's bad for optimization.

Are you trying to say that this problem I'm having is only because I'm trying to run it in hammer?
No, not at all.