Bug 91952 - www/mplayer-plugin - 3.17 hangs in nsPluginInstance::shutdown
Summary: www/mplayer-plugin - 3.17 hangs in nsPluginInstance::shutdown
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Joe Marcus Clarke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-18 11:10 UTC by Adi Pircalabu
Modified: 2006-01-20 00:00 UTC (History)
0 users

See Also:


Attachments
plugin-support.cpp.patch (449 bytes, patch)
2006-01-19 23:52 UTC, webmaster
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adi Pircalabu 2006-01-18 11:10:01 UTC
Previous version (3.16) does not have this problem
Reproduces on Firefox, Mozilla, Seamonkey
The wmp plugin hangs (hogging CPU) when closing a window playing a wmv stream BEFORE stopping the play.

Recompiling with CFLAGS+= -g I got this:

(gdb) thread apply all bt

Thread 7 (Thread 0x808c000 (runnable)):
#0  0x28ac7e53 in pthread_mutexattr_init () from /usr/lib/libpthread.so.2
#1  0x28ac7fe7 in pthread_mutexattr_init () from /usr/lib/libpthread.so.2
#2  0x28ac5f5c in pthread_mutex_lock () from /usr/lib/libpthread.so.2
#3  0x2ad60a86 in nsPluginInstance::shutdown (this=0x9086800) at Source/plugin.cpp:390
#4  0x2ad60ef5 in nsPluginInstance::shut (this=0x9086800) at Source/plugin.cpp:360
..
..
..
(gdb) thread 7
[Switching to thread 7 (Thread 0x808c000 (runnable))]#0  0x28ac7e53 in pthread_mutexattr_init () from /usr/lib/libpthread.so.2
(gdb) frame 3
#3  0x2ad60a86 in nsPluginInstance::shutdown (this=0x9086800) at Source/plugin.cpp:390
390                 pthread_mutex_unlock(&control_mutex);

Fix: 

Nothing yet. I'm not a C programmer but I'm playing with some workarounds.
How-To-Repeat: Go to www.cnn.com, play a stream, try to close the window. You'll hang the browser
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2006-01-18 11:12:13 UTC
Responsible Changed
From-To: freebsd-ports-bugs->marcus

Over to maintainer
Comment 2 Adi Pircalabu 2006-01-18 11:19:42 UTC
The following diff workarounds the issue for me. But I'm not sure about
the consequences, so don't take this as a fix, but investigate it
further.
Thanks

--- work/mplayerplug-in/Source/plugin.cpp.orig  Wed Jan 18 12:57:24 2006
+++ work/mplayerplug-in/Source/plugin.cpp       Wed Jan 18 12:57:46 2006
@@ -384,9 +384,9 @@
                paused = 0;
            }
            sendCommand(this, "quit\n");
-           pthread_mutex_lock(&read_mutex);
+/*         pthread_mutex_lock(&read_mutex); */
            cancelled = 1;
-           pthread_mutex_unlock(&read_mutex);
+/*         pthread_mutex_unlock(&read_mutex); */
            pthread_mutex_unlock(&control_mutex);
            pthread_cancel(player_thread);
            pthread_join(player_thread, NULL);


-- 
Adi Pircalabu (PGP Key ID 0x04329F5E)


-- 
This message was scanned for spam and viruses by BitDefender.
For more information please visit http://www.bitdefender.com/
Comment 3 Joe Marcus Clarke freebsd_committer freebsd_triage 2006-01-18 14:45:59 UTC
State Changed
From-To: open->closed

A fix has been committed.
Comment 4 webmaster 2006-01-19 23:52:02 UTC
This is the same bug as mplayerplug-in bug #1394652:
https://sourceforge.net/tracker/?func=detail&atid=530623&aid=1394652&group_id=71239

The attached patch is also needed on my system.