Migz Jun 4, 2013 @ 1:55pm
Help with a bugfix
so according to valves wiki on sdk this is my problem

Game freezing on exit instead of closing
Note: do not work with episodic source code. ( read the discussion page for my report) Fuzz 05:40, 20 November 2012 (PST)
There's a problem in the Source 2007 (and maybe later versions, I'm not sure) which makes the game unable to be closed by normal means, the only way being finalizing the process in the Task Manager. Luckily for us, there is a simple fix for this.
1. Open the src/game/server/gameinterface.cpp
2. Search for CServerGameDLL::DLLShutdown
3. At the end of this function, add these lines above the DisconnectTier3Libraries() function call:
+ SteamClient()->ReleaseUser( GetHSteamPipe(), GetHSteamUser() );
+ SteamClient()->BReleaseSteamPipe( GetHSteamPipe() );

DisconnectTier3Libraries();
DisconnectTier2Libraries();
ConVar_Unregister();
DisconnectTier1Libraries();

but when I try it by following the instructions nothing happens with the mod I still have to close it with my task manager I dont know if Im not putting it in right or if it is source the code now looks like

void CServerGameDLL::DLLShutdown( void )
{

// Due to dependencies, these are not autogamesystems
ModelSoundsCacheShutdown();

g_pGameSaveRestoreBlockSet->RemoveBlockHandler( GetAchievementSaveRestoreBlockHandler() );
g_pGameSaveRestoreBlockSet->RemoveBlockHandler( GetCommentarySaveRestoreBlockHandler() );
g_pGameSaveRestoreBlockSet->RemoveBlockHandler( GetEventQueueSaveRestoreBlockHandler() );
g_pGameSaveRestoreBlockSet->RemoveBlockHandler( GetDefaultResponseSystemSaveRestoreBlockHandler() );
g_pGameSaveRestoreBlockSet->RemoveBlockHandler( GetTemplateSaveRestoreBlockHandler() );
g_pGameSaveRestoreBlockSet->RemoveBlockHandler( GetAISaveRestoreBlockHandler() );
g_pGameSaveRestoreBlockSet->RemoveBlockHandler( GetPhysSaveRestoreBlockHandler() );
g_pGameSaveRestoreBlockSet->RemoveBlockHandler( GetEntitySaveRestoreBlockHandler() );

char *pFilename = g_TextStatsMgr.GetStatsFilename();
if ( !pFilename || !pFilename[0] )
{
g_TextStatsMgr.SetStatsFilename( "stats.txt" );
}
g_TextStatsMgr.WriteFile( filesystem );

IGameSystem::ShutdownAllSystems();

#ifdef CSTRIKE_DLL // BOTPORT: TODO: move these ifdefs out
RemoveBotControl();
#endif

#ifndef _XBOX
// destroy the Navigation Mesh interface
if (TheNavMesh)
{
delete TheNavMesh;
TheNavMesh = NULL;
}
#endif
+ SteamClient()->ReleaseUser( GetHSteamPipe(), GetHSteamUser() );
+ SteamClient()->BReleaseSteamPipe( GetHSteamPipe() );

DisconnectTier3Libraries();
DisconnectTier2Libraries();
ConVar_Unregister();
DisconnectTier1Libraries();

DisconnectTier3Libraries();
DisconnectTier2Libraries();
ConVar_Unregister();
DisconnectTier1Libraries();
}
Showing 1-3 of 3 comments
< >
xXSwagMasta420Xx Jun 5, 2013 @ 10:05am 
IIRC, I don't think you actually need to put the + symbols in the code.
Migz Jun 5, 2013 @ 10:09am 
okay so

SteamClient()->ReleaseUser( GetHSteamPipe(), GetHSteamUser() );
SteamClient()->BReleaseSteamPipe( GetHSteamPipe() );

DisconnectTier3Libraries();
DisconnectTier2Libraries();
ConVar_Unregister();
DisconnectTier1Libraries();

DisconnectTier3Libraries();
DisconnectTier2Libraries();
ConVar_Unregister();
DisconnectTier1Libraries();
}
Sandern Jun 5, 2013 @ 12:14pm 
I believe this is not needed anymore. You should attach the debugger and see if it hangs on "CNet Encrypt:0" to confirm if this is the problem you are actually having (and not something else).

You can also find more information in this mail from the hlcoders list:
http://www.mail-archive.com/hlcoders@list.valvesoftware.com/msg31629.html
Showing 1-3 of 3 comments
< >
Per page: 15 30 50