Deadlock in mplayerplug-in 3.50, when 2 embeds want to swap their "src" content.
<[email protected]> Tue, 27 May 2008 12:29:26 +0200
| Newsgroups | gmane.comp.mozilla.mplayerplug-in |
|---|---|
| Message-ID | <[email protected]> |
Hi! I've got serious problem, when I am trying to change contents of 2 embeds by switching src or using Open(filename),SetFileName()) (in parallel of 2 different movies). In the attachments there is "test.html" which contain reproducable code.. (it doesn't include sample1.avi and sample2.avi, please apply your own sample movies, it doesn't matter) I was trying to fix it when my suspicious was pointed to one pthread_join occurence, but currently I have no idea where the bug is located. :( Nevertheless, the result is that whole Mozilla UI is just freeze.. (some plugin threads are working, mplayer is responding.. but Mozilla and it's javascript engine simply not). It is 100% reproducable, but sometimes it needs 2-3 itterations.. (sometimes it is working for even 1-2 minutes, sometimes only 10 seconds is enough) I was using Debian with Gnome, with newest Mplayer, with newest Mplayer-Plugin, with newest Firefox... but tested on different platforms, with different compilations flags. Please help. Zbigniew ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Mplayerplug-in-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mplayerplug-in-devel
test.html
(text/html, 1 KB)
<html>
<head>
<script type="text/javascript">
var mySwitch=true;
var embed;
var src1 = "sample1.avi";
var src2 = "sample2.avi";
function run()
{
alert("juz");
tmp_div = document.getElementById("test1");
embed = tmp_div.getElementsByTagName("embed");
embed[0].src = ((mySwitch) ? src2 : src1);
tmp_div = document.getElementById("test2");
embed = tmp_div.getElementsByTagName("embed");
embed[0].src = ((mySwitch=!mySwitch) ? src2 : src1);
}
</script>
</head>
<body onLoad='setInterval("run()",5000);'>
<div id="test1" style="position:absolute; left:0px; top:0px;">
<embed type="video/mpeg" src="sample1.avi" height="300" width="400" autostart="true" loop="false" showcontrols="false"></embed>
</div>
<div id="test2" style="position:absolute; left:400px; top:0px;">
<embed type="video/mpeg" src="sample2.avi" height="300" width="400" autostart="true" loop="false" showcontrols="false"></embed>
</div>
</body>
</html>