Skip to content

Conversation

@rohit-n
Copy link
Collaborator

@rohit-n rohit-n commented Oct 15, 2021

On Linux, the destructor is called when the program closes
instead of when libCShell.so is unloaded, resulting in
crashes. Instead, allocate CTO2GameClientShell on the heap when
the library is loaded, then delete it in CClientMgr::TermClientShellDE.

We also need to set a flag in CConsole when this happens, as PrintString
incorrectly thinks i_client_shell is not null and would call OnConsolePrint
from a null pointer when CClientMgr::Term calls ClientStringWhine.

On Linux, the destructor is called when the program closes
instead of when libCShell.so is unloaded, resulting in
crashes. Instead, allocate CTO2GameClientShell on the heap when
the library is loaded, then delete it in CClientMgr::TermClientShellDE.

We also need to set a flag in CConsole when this happens, as PrintString
incorrectly thinks i_client_shell is not null and would call OnConsolePrint
from a null pointer when CClientMgr::Term calls ClientStringWhine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants