Results 89 comments of StanR

Ah, that's sad. Alright, I'll try to find what causing that myself as well

Fiddling around with shutdown sequence made me sure that you're right, there's something wrong with ConVar unregs. Best trace i had so far looks like this: ``` 0x00007ffffcb5bae0 in ??...

Looks like `ICvar::UnregisterConCommand` now has one more param, `UnregisterConCommand( ConCommandBase *pCommandBase, int iUnknown ) = 0;` works. Adding that and commenting out `mm_UnloadLibrary(gamedll_lib);` in `ISource2Server::Shutdown()` seems to fix segfaulting at...

My disassembly looks something like this: ``` (0x00000001BA80) int __fastcall CCvar::UnregisterConCommand(__int64 pCommandBase, __int64 iUnknown) { __int64 v2; // rbx int result; // eax __int64 v4; // rdx unsigned __int8 *v5;...

Hmm, you're right. Why does it work then?

Hm, I found something confusing. If you change everything related to convar flags in convar.cpp/.h (tier1) from int to int64 it also stops segfaults from happening. Although unloading gamedll_lib still...

You've missed all ConVar_Register's and \tier1\convar.cpp#40, \tier1\convar.cpp#1150. At least that's how it is in my files. It's not a proper fix because it still fails if you keep unloading gamedll_lib...

Can you explain why that happens? I'm curious what exactly goes wrong there

Yes, I had global change callback as well but I've disabled it while I was looking at cvar crashes.