[mythtv] [PATCH] mythvideo crash on exit (was Mythvideo compiling on Mac OS X? and keypresses in VideoManager)

Jeremiah Morris jm at whpress.com
Fri Nov 12 21:06:34 UTC 2004

Isaac: I think I'm inching toward the solution, thanks for your past 
and future patience in walking me through this. ;)

On 12 Nov 2004, at 3:03 PM, Isaac Richards wrote:
> On Friday 12 November 2004 12:52 pm, Jeremiah Morris wrote:
>> I don't think the application is locked coming into this code.
> It is locked coming in, which is why your patches don't make any 
> sense. =)

I stuck in some debugging with qApp->locked() to check your assertion.  
It's locked when loaded through the main menu, but in the "mythfrontend 
mythvideo" case, it is not locked.  This is the case where Joshua 
noticed the problem; mythvideo is locking the library mutex and nothing 
unlocks it.

The "runplugin-small" patch locks the mutex for this latter case, so 
that it is always locked when entering mythvideo (or any plugin for 
that matter).  It unlocks the mutex before exiting early from main().

Looking through the rest of mythfrontend's main(), however, I notice 
that this method of running the plugins will prevent other cleanup code 
from running, such as the exit for the privileges thread.  As an 
alternative fix, I am including a "runplugin-large" patch that does not 
exit early from main() when a plugin is run.  This allows the normal 
application-exit code to execute in all cases.

- Jeremiah

-------------- next part --------------
A non-text attachment was scrubbed...
Name: runplugin-small.diff.bz2
Type: application/octet-stream
Size: 456 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20041112/b3db2bb3/runplugin-small.diff.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: runplugin-large.diff.bz2
Type: application/octet-stream
Size: 785 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20041112/b3db2bb3/runplugin-large.diff.obj

More information about the mythtv-dev mailing list