xbmc/xbmc — pull request #549 by jimfcarroll (2011-11-27 20:36:12+00:00)
Title: [fix] fixes #12186. Fixed the missed exception catch of UnrarXLib in CFileRar

It appears that UnrarXLib can throw an exception that causes CFileRarExtractThread::Process to exit without calling Reset on the hRunning CEvent. In that case the thread shutdown locks up (sometime hours later).

On the trac ticket for 12186 you can see this behavior. The xbmc.log file submitted shows:

923 20:14:01 T:2959319040 ERROR: staticThread - thread XFILE::CFileRarExtractThread, Unhandled exception caught in thread process, attemping cleanup in OnExit

... and then several hours later, on shutdown, XBMC locks up when cleaning up blocking on the hRunning event since it was never reset.

This commit does two things. Adds logging specific to UnrarXLib throwing exceptions with more detailed information. It will also allow the hRunning CEvent to be Reset even when an exception is thrown in UnrarXLib since a try/catch surrounds the CmdExtract::ExtractCurrentFile in the CFileRarExtractThread::Process method.

Please verify this looks good.