Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggling clip brushes on a specific map crashes the game #1266

Closed
hexaflexahexagon opened this issue Mar 18, 2021 · 8 comments
Closed

Toggling clip brushes on a specific map crashes the game #1266

hexaflexahexagon opened this issue Mar 18, 2021 · 8 comments
Assignees
Labels
Outcome: Resolved This was resolved, and will be in a future update. Priority: High Something essential that should be done in this release, as soon as possible. Type: Bug Something that should work/look one way isn't quite doing that. Where: Engine This is something that will be done in the base engine.

Comments

@hexaflexahexagon
Copy link
Member

Describe the bug
Loading the given map will crash the game if you toggle clipbrushes on. The map was made ~10/20/20 so it was pre-chaos but it worked at that point in time. There are no clip brushes on the map. Compiled using the TF2 fgd/hammer/compile pal settings/etc if that's relevant. The map itself is a simple fullbright box with a player teamspawn, teleport destination, and trigger_teleport.

To Reproduce
Steps to reproduce the behavior:

  1. Load the linked map file
  2. Toggle r_drawclipbrushes 2
  3. Game crashes with Cannot load corrupted map. Engine Error popup.

Expected behavior
The game should not crash

Screenshots
image

Desktop/Branch (please complete the following information):
OS: Windows
Branch: 0.8.8-rc

Additional context
bsp: https://cdn.discordapp.com/attachments/671175695648423959/822160010838671440/rj_projectiletele.bsp
vmf: https://cdn.discordapp.com/attachments/671175695648423959/822161965509640192/rj_projectiletele.vmf

@hexaflexahexagon hexaflexahexagon added the Type: Bug Something that should work/look one way isn't quite doing that. label Mar 18, 2021
@Gocnak
Copy link
Member

Gocnak commented Mar 26, 2021

Might just be a matter of recompiling the map but the engine should gracefully handle this and not crash.

@Gocnak Gocnak added Priority: High Something essential that should be done in this release, as soon as possible. Where: Engine This is something that will be done in the base engine. labels Mar 26, 2021
@Gocnak Gocnak added this to To Do in 0.9.0 Release via automation Mar 26, 2021
@braem
Copy link
Member

braem commented Mar 31, 2021

From my testing, any map that has exactly 1 trigger will crash like this. This even happens on CSGO. Will have to dive into the differences on how they render clip brushes.

@Gocnak
Copy link
Member

Gocnak commented Apr 8, 2021

Looks like it's related to leafs? I was getting a crash in the command computing the clipbrushes to render and the leaf + leafbrushes seemed to go out of bounds of the BSP's collision data array...

Really weird, the functions look the same between 2013/GO. I don't know if there's something deeper here.

@braem
Copy link
Member

braem commented Apr 8, 2021

Looks like it's related to leafs? I was getting a crash in the command computing the clipbrushes to render and the leaf + leafbrushes seemed to go out of bounds of the BSP's collision data array...

Really weird, the functions look the same between 2013/GO. I don't know if there's something deeper here.

Yup exactly. I believe it's much deeper. Had a poke around that area, comparing to TF2 code,, couldn't find anything pointing to it,

@hexaflexahexagon
Copy link
Member Author

did some more experimenting on this since it seems to be related to visleaves and wrote down my findings in case it's of any use

  • mat_leafvis 3 works fine and doesn't cause a crash
  • a pure empty map (with just a teamspawn entity) does not crash
  • func_detail does not crash, func_brush does crash (and any other func_* entities that i tested)
  • adding a hint/skip brush added between the player and entity does not crash
    image
  • trying to add a wall so that the entity isn't in a rendered visleaf doesn't change anything
    image
  • separating the player and 1 entity into different areas also doesn't do anything
    image
  • having 2 entities rather than 1 does not crash, same with any value higher than 2. i thought i crashed the first time i tried 2 entities but that might have been me loading the map with 1 before it had compiled 2 entities instead since i couldn't replicate it, even after fresh game boot.

@Gocnak Gocnak moved this from To Do to In Progress in 0.9.0 Release Apr 9, 2021
@Gocnak
Copy link
Member

Gocnak commented Apr 9, 2021

Fun fact, this error happens on TF2 as well. Let's just say this crash may or may not be an exploit that was fixed for more modern versions of the engine. The actual fix for this specific crash (non-malicious BSPs) was changing some other related logic.

@Gocnak Gocnak added Blocked: Needs testing & verification Needs testing and verification if properly fixed. and removed Blocked: Needs testing & verification Needs testing and verification if properly fixed. labels Apr 9, 2021
@Gocnak
Copy link
Member

Gocnak commented Apr 19, 2021

Dos this still happen on latest?

@hexaflexahexagon
Copy link
Member Author

looks like the crash doesn't happen anymore on the latest update.

0.9.0 Release automation moved this from In Progress to Done Apr 20, 2021
@Gocnak Gocnak added Outcome: Resolved This was resolved, and will be in a future update. and removed Blocked: Needs testing & verification Needs testing and verification if properly fixed. labels Apr 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Outcome: Resolved This was resolved, and will be in a future update. Priority: High Something essential that should be done in this release, as soon as possible. Type: Bug Something that should work/look one way isn't quite doing that. Where: Engine This is something that will be done in the base engine.
Projects
No open projects
0.9.0 Release
  
Done
Development

No branches or pull requests

3 participants