mastercomfig / tf2-patches

Team Fortress 2, but with a lot of fixes, QoL improvements and performance optimizations!
Other
221 stars 27 forks source link

VBSP crashes during cleanup #624

Closed treacherousfiend closed 1 year ago

treacherousfiend commented 2 years ago

Description

VBSP crashes right before it finishes cleaning up. In specific, it gets a read access violation at memdbg.cpp line 405, which is part of the function inline size_t InternalLogicalSize( void *pmem ) From what I can debug, the program is attempting to free up memory from a File System, and seems to do so successfully, up until a certain point, where for some reason pMem becomes 0xCDCDCDCD (it is ALWAYS this address). This function is one in a long line of other functions, which in this case starts with the function call CmdLib_TermFileSystem() in CmdLib_Cleanup (cmdlib.cpp line 401). I tried to bisect up to the move to the src folder, but every single commit had the same issue. I'd go further, but i've always had trouble going back that far. It's also worth noting that CmdLib_Cleanup() is the very last thing that VBSP does before returning the main function, so it doesn't seem to affect the BSP file itself or any of the other functions of VBSP. Sorry I can't give anymore info, this was as far as I was able to go with my current knowledge :( It's understandable if this never gets fixed, due to being a bug with a compiler rather than the actual game itself, but I felt like it'd be good to at least make an issue post just in case.

Checklist

Reproduction

  1. Build VBSP
  2. Compile Map

Setup Details

Client Settings