-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Fix crash on exit. #13445
Fix crash on exit. #13445
Conversation
75d0902
to
a1dbfdd
Compare
thanks! |
xbmc/commons/Exception.cpp
Outdated
|
||
void Exception::LogThrowMessage(const char* prefix) const | ||
{ | ||
CLog::Log(LOGERROR,"EXCEPTION Thrown (%s) : %s", classname.c_str(), message.c_str()); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/platform/posix/main.cpp
Outdated
@@ -88,7 +87,6 @@ void XBMC_POSIX_HandleSignal(int sig) | |||
int main(int argc, char* argv[]) | |||
{ | |||
// set up some xbmc specific relationships |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/platform/win32/WinMain.cpp
Outdated
@@ -127,7 +126,6 @@ INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR commandLine, INT) | |||
int status; | |||
{ | |||
// set up some xbmc specific relationships |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
xbmc/threads/Thread.cpp
Outdated
@@ -226,7 +223,7 @@ void CThread::Action() | |||
} | |||
catch (...) | |||
{ | |||
LOG(LOGERROR, "%s - thread %s, Unhandled exception caught in thread process, aborting. auto delete: %d", __FUNCTION__, m_ThreadName.c_str(), IsAutoDelete()); | |||
CLog::Log(LOGERROR, "%s - thread %s, Unhandled exception caught in thread process, aborting. auto delete: %d", __FUNCTION__, m_ThreadName.c_str(), IsAutoDelete()); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Okay, Dealt with the issues that @Rechi pointed out. |
… on CThreads (and Exception) using XbmcContext rather than the means prescribed by GlobalHandling. XbmcContext was originally supposed to be the "down payment" on a dependency injection approach to modularizing the code but it never went anywhere so it's now removed all together.
48c1d16
to
d765a72
Compare
Commits now squashed |
This crash seems to be due to the logger being set on CThreads (and Exception) using XbmcContext rather than the means prescribed by GlobalHandling.
Description
XbmcContext was originally supposed to be the "down payment" on a dependency injection approach to modularizing the code but it never went anywhere so it's now removed all together. All of the code that was dependent on this functionality has been reverted to the standard means.
Motivation and Context
Crash on exit.
How Has This Been Tested?
Ran it several time on Linux so far to make sure it doesn't crash. Since the crash was rare this isn't a foolproof means of testing. @FernetMenta was able to reproduce it relatively easily.
Screenshots (if appropriate):
Types of change
Checklist: