Closed
Bug 445599
Opened 17 years ago
Closed 17 years ago
Firefox 3 seems to "double initialize" Flash
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 438830
People
(Reporter: robertburke, Unassigned)
Details
Attachments
(1 file)
|
18.15 KB,
application/x-zip-compressed
|
Details |
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9) Gecko/2008052906 Firefox/3.0
In Firefox 3 on Windows XP, when you load a very simple SWF which, during its initialization, has ActionScript which calls a JavaScript function via ExternalInterface, you often get two calls instead of the expected result of just one call; since the ActionScript function should only fire once, it appears as if the Flash runtime is getting reinitialized.
Reproducible: Sometimes
Steps to Reproduce:
1. Using Flash Professional 8 IDE, create a very simple SWF that consists of just the following ActionScript 2 code attached to Level 1, Frame 1:
import flash.external.ExternalInterface;
ExternalInterface.call( "asCallback", (new Date()).getMilliseconds() );
stop();
2. Publish the SWF as Firefox3Bug.swf.
3. Create test.html with the following HTML and deploy to same place as SWF file:
<html>
<head>
<title>Test FireFox 3 Bug</title>
<script type="text/javascript">
function asCallback( data )
{
document.getElementById( "result" ).innerHTML = document.getElementById( "result" ).innerHTML + "<br>" + data;
}
</script>
</head>
<body bgcolor="#ffffff">
<embed id="TestFireFox3Bug" width="1" height="1" allowscriptaccess="always" quality="high" bgcolor="#FFFFFF" name="TestFireFox3Bug" src="Firefox3Bug.swf" type="application/x-shockwave-flash"/>
<div>
<span id="result" name="result"></span>
</div>
</body>
</html>
3. Load HTML page in Firefox 3. You may need to clear Firefox cache.
Actual Results:
You get two calls from Flash, each with a different number passed.
Expected Results:
Should have only got one call from Flash (this was the consistent behavior in FF 2).
Five other developers in my group are seeing the same bug in FF 3 on their XMP machines.
Running in Safe Mode with all add-ons disabled eliminates this bug. Disabling all add-ons also eliminates this bug. I have been unable to determine which add-ons cause this to occur. It appears having 2 or 3 or more add-ons of any type cause the bug. Depending on the add-ons, the bug may occur the first time you refresh after clearing the cache, or it may appear intermitantly (every 3 or 4 times you refresh).
The add-ons I have currently while seeing this bug are:
Firebug 1.2.0b6
Greasemonkey 0.8.20080609.0
iMacros for Firefox 6.0.5.4
ySlow 0.9.5b2
Other developers in my group with other combinations of add-ons also see this bug.
This bug is breaking our RIA, since we rely upon on an ExternalInterface call from our SWF to know the SWF is initialized. The ActionScript code and HTML/JavaScript I have given in this bug report are the minimum needed to reproduce the bug.
Comment 1•17 years ago
|
||
content bugs like this one can't be product Firefox
Component: General → Plug-ins
Product: Firefox → Core
QA Contact: general → plugins
Version: unspecified → 1.9.0 Branch
Comment 2•17 years ago
|
||
dup of bug 438830?
| Reporter | ||
Comment 3•17 years ago
|
||
Quite possibly is it is a duplicate; it sounds similar.
I am puting together a very simple working sample that demonstrates the bug and I will attach.
I have dome some NSPR logging with just going to my page with a SWF as described in the initial bug report, and I see some odd stuff i do not see when logging the same scenario in FF2:
*****************************************************
My Batch File:
REM see firefox_3.0.1\mozilla\modules\plugin\base\public\nsPluginLogging.h
set NSPR_LOG_FILE=C:\dev\projects\ex\npSampleNPR\firefox.log
SET NSPR_LOG_MODULES=Plugin:9, PluginNPP:9, PluginNPN:9
"C:\Program Files\Mozilla Firefox3\firefox.exe" "http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/test.html"
pause
*****************************************************
Excerpts from log:
0[332140]: nsPluginHostImpl::InstantiateEmbeddedPlugin Begin mime=application/x-shockwave-flash, owner=342dc80, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginHostImpl::TrySetupPluginInstance Begin mime=application/x-shockwave-flash, owner=342dc80, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginHostImpl::GetPluginFactory Begin mime=application/x-shockwave-flash, plugin=C:\WINDOWS\system32\Macromed\Flash\NPSWF32.dll
0[332140]: nsPluginHostImpl::UserAgent return=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
0[332140]: nsPluginHostImpl::TrySetupPluginInstance Finished mime=application/x-shockwave-flash, rv=0, owner=342dc80, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginStreamListenerPeer::InitializeEmbedded url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginHostImpl::InstantiateEmbeddedPlugin Finished mime=application/x-shockwave-flash, rv=0, owner=342dc80, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginStreamListenerPeer::OnStartRequest this=314ac80 request=2c46c9c mime=application/x-shockwave-flash, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginStreamListenerPeer::OnDataAvailable this=314ac80 request=2c46c9c, offset=0, length=146, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginStreamListenerPeer::OnStopRequest this=314ac80 aStatus=0 request=2c46c9c
0[332140]: nsPluginHostImpl::UserAgent return=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
0[332140]: nsPluginStreamListenerPeer::dtor this=314ac80, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginHostImpl::StopPluginInstance called instance=31d2440
0[332140]: nsPluginHostImpl::InstantiateEmbeddedPlugin Begin mime=application/x-shockwave-flash, owner=342dc80, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginHostImpl::TrySetupPluginInstance Begin mime=application/x-shockwave-flash, owner=342dc80, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginHostImpl::GetPluginFactory Begin mime=application/x-shockwave-flash, plugin=C:\WINDOWS\system32\Macromed\Flash\NPSWF32.dll
0[332140]: nsPluginHostImpl::UserAgent return=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
0[332140]: nsPluginHostImpl::TrySetupPluginInstance Finished mime=application/x-shockwave-flash, rv=0, owner=342dc80, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginStreamListenerPeer::InitializeEmbedded url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginHostImpl::InstantiateEmbeddedPlugin Finished mime=application/x-shockwave-flash, rv=0, owner=342dc80, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginStreamListenerPeer::OnStartRequest this=3410a40 request=2c4714c mime=application/x-shockwave-flash, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginStreamListenerPeer::OnDataAvailable this=3410a40 request=2c4714c, offset=0, length=146, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginStreamListenerPeer::OnStopRequest this=3410a40 aStatus=0 request=2c4714c
0[332140]: nsPluginHostImpl::UserAgent return=Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1
0[332140]: nsPluginStreamListenerPeer::dtor this=3410a40, url=http://jcmsdev7.turner.com:82/rburke/Firefox3Bug/Firefox3Bug.swf
0[332140]: nsPluginHostImpl::StopPluginInstance called instance=31f9d00
0[332140]: nsPluginHostImpl::Destroy Called
*****************************************************
Notice that nsPluginStreamListenerPeer goes through its destructor twice, which does not happen with FF2.
Strangely, you need a few add-ons installed and enabled to make the bug occur.
| Reporter | ||
Comment 4•17 years ago
|
||
Just read Bug 445520. It mentions that the bug occurs using Flash loaded with SWFObject 1.5. We also determined that this was part of our problem. We upgraded to SWFObject 2.1 and the problem went away. The difference seems to be the HTML DOM inserted by SWFObject 1.5 as opposed to 2.1.
SWFObject 1.5 inserts an "embed" tag.
SWFObject 2.1 inserts an "object" tag with nested "param" tags.
So, we worked around this bug by goinf to SWFObject 2.1.
The bug is still in FF3. FF2 and all other non-IE browsers handle the embed tag just fine, but FF3 no longer handles it the event that certain add-ons are enabled.
| Reporter | ||
Comment 5•17 years ago
|
||
The zip file contains HTML and supporting files to demonstrate this bug. Must run on a web server (not file system or localhost) due to Flash security restrictions.
| Reporter | ||
Comment 6•17 years ago
|
||
I just added an attachment (see previous comment). I also put these files on my personal web site: http://homepages.rootsweb.ancestry.com/~reburke/work/Firefox3Bug/ff3buginfo.html
This bug is real. Please someone give it the attention it deserves.
| Reporter | ||
Comment 7•17 years ago
|
||
This may be fixed in Firefox 3.1. Using version 3.1a2pre (Minefield), I was unable to reproduce the bug.
I am not quite sure, however, because none of my add-ons are compatible.
I found that setting extensions.checkCompatibility to false in about:config let the add-ons load, but I am not sure that is a legitimate test.
Two questions if anyone can answer, please:
1) Did the fix for bug 438830 go into 3.1? (For future reference, how can I find out which bugs are fixed in a particular build?)
2) Since the bug I am seeing in 3.0.1 involves add-ons, is setting extensions.checkCompatibility to false in about:config for version 3.1a2pre a legitimate test?
By the way, I work for cnn.com. My work email is robert.burke@cnn.com. This bug has caused Flash video playback in Firefox 3 on www.cnn.com and sister web sites to be broken. We simplified the problem down to the minimal example code I attached to this bug report.
Go to http://www.cnn.com/video/?xmpLog=debug in Firefox 3. The "xmpLog=debug" parameter causes a log area to be added to the bottom of the page. If you have one or more offending add-on enabled, video will fail to play (you may need to refresh, or navigate away from the page and then back, to see the bug).
In the log area you will see several messages, one of which is:
FlashXhrTransportManager: Transition init state from "Ready" to "Relaying handleInit".
This is a very unexpected state transition. It means that the SWF is calling a JavaScript method twice which we only expected to be called once.
The result is that our video player is hosed, and other JavaScript exceptions are inevitable. We will be releasing a patch to our code that works around this bug, but the bug is still present in Firefox 3.0.1.
We found that the problem has to do with the way Firefox 3 handles a SWF loaded in an embed tag. The other thing the bug requires is one or more add-ons enabled which implement "Content Policies". This appears to be the bug described in bug 438830.
Updated•17 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → DUPLICATE
Updated•3 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•