[SWFObject] fp9 bug in IE with multiple swf files +externalinterface (out of memory)

Jonathan Spooner jspooner at aviatech.com
Tue Jul 25 10:20:54 PDT 2006


Thanks for the fix.  It works great.

Will this change go into the SVN?

--JS


On Jul 25, 2006, at 10:20 AM, Geoff Stearns wrote:

> we have been working on this today... we have a fix.
>
> it turns out there is a function called __flash_unloadHandler() -  
> that does almost the exact same thing that my cleanUpSWFs()  
> function does (makes sense because I was e-mailing with a Flash  
> Player engineer about the streaming issue (which this is partially  
> related to) and they ended up putting code similar to my fix into  
> fp9, only it looks like the adobe version doesn't work so hot...
>
> anyway, here's how we fixed it:
>
> changed the cleanUpSWFs() function to fire using onbeforeunload  
> instead of onunload - and inside the beforeunload, we remove the  
> __flash_unloadHandler() function, so that it won't cause the out of  
> memory error.
>
> attached is the version with the fix in it... if you all could test  
> this out and let me know how it looks that would be great.
>
> i uploaded it to the test files pablo provided and it looks like it  
> fixes it... so if a few of you could verify that, it would be great.
>
> here's the test files with the new js file:
> http://dev.deconcept.com/etc/outofmemory/
>
> in ie6 i get no crash and all seems fine.
>
>
> <swfobject.js>
>
> for the adobe people here:Â
>
> the difference in your code and mine is that mine does a  
> getElementsByTagName('OBJECT'); and then loops through only those,  
> and your code has a variable called 'embedded' that is looped  
> through - not sure where the embedded var comes from, but it looks  
> like maybe it was much more stuff in it that is really needed...
>
>
>
> On Jul 25, 2006, at 12:46 PM, Jonathan Spooner wrote:
>
> Here is my research on javaScript functions written out by Flash 9.
>
> It seems Flash prefixes their functions with '__flash'.  And not  
> all browsers get these functions.
>
> Our favorite browser MSIE doesn't seem to get any of these __flash  
> functions.
>
> The list below was from looping through the page object.
> var myList;
> for (var i in this) {
> 	//if(typeof(this[i]) == "function") {  // show only functions
> 		myList += i +"        "+ typeof(this[i]) + "<br/>\n";
> 	//	}
> 	}
> document.getElementById('output').innerHTML =    myList;
>
>
>
> MSIE
> <pastedGraphic.png>
> onbeforeunload object
> onafterprint object
> top object
> location object
> parent object
> offscreenBuffering string
> frameElement object
> onerror object
> screen object
> event object
> clipboardData object
> onresize object
> defaultStatus string
> onblur object
> window object
> onload function
> onscroll object
> screenTop number
> onfocus object
> Option object
> length number
> onbeforeprint object
> frames object
> self object
> clientInformation object
> external object
> screenLeft number
> opener undefined
> onunload function
> document object
> closed boolean
> history object
> Image object
> navigator object
> status string
> onhelp object
> name string
>
>
>
> MAC FIRE FOX 1.5.0.4
> getInterface      function
> __flash__request      function
> __flash__toXML      function
> __flash__escapeXML      function
> __flash__objectToXML      function
> __flash__argumentsToXML      function
> __flash__arrayToXML      function
> onMyLoad      function
> myswfo2      object
> window      object
> myswfo1      object
> onload      function
> SWFObject      function
> FlashObject      function
> getQueryParamValue      function
> deconcept      object
> myflashExec2      function
> myflashExec1      function
> document      object
> console      object
> addEventListener      function
> location      object
> navigator      object
> Packages      object
> sun      object
> java      object
> netscape      object
> XPCNativeWrapper      function
> Components      object
> parent      object
> top      object
> scrollbars      object
> name      string
> scrollX      number
> scrollY      number
> scrollTo      function
> scrollBy      function
> getSelection      function
> scrollByLines      function
> scrollByPages      function
> sizeToContent      function
> prompt      function
> dump      function
> setTimeout      function
> setInterval      function
> clearTimeout      function
> clearInterval      function
> setResizable      function
> captureEvents      function
> releaseEvents      function
> routeEvent      function
> enableExternalCapture      function
> disableExternalCapture      function
> open      function
> openDialog      function
> frames      object
> find      function
> self      object
> screen      object
> history      object
> content      object
> menubar      object
> toolbar      object
> locationbar      object
> personalbar      object
> statusbar      object
> directories      object
> closed      boolean
> crypto      object
> pkcs11      object
> controllers      object
> opener      object
> status      string
> defaultStatus      string
> innerWidth      number
> innerHeight      number
> outerWidth      number
> outerHeight      number
> screenX      number
> screenY      number
> pageXOffset      number
> pageYOffset      number
> scrollMaxX      number
> scrollMaxY      number
> length      number
> fullScreen      boolean
> alert      function
> confirm      function
> focus      function
> blur      function
> back      function
> forward      function
> home      function
> stop      function
> print      function
> moveTo      function
> moveBy      function
> resizeTo      function
> resizeBy      function
> scroll      function
> close      function
> updateCommands      function
> atob      function
> btoa      function
> frameElement      object
> removeEventListener      function
> dispatchEvent      function
> getComputedStyle      function
>
> SAFARI
> <pastedGraphic.png>
> EvalError      function
> RangeError      function
> ReferenceError      function
> SyntaxError      function
> TypeError      function
> URIError      function
> console      function
> myflashExec1      function
> myflashExec2      function
> deconcept      object
> getQueryParamValue      function
> FlashObject      function
> SWFObject      function
> myswfo1      object
> [[DOMDocument.prototype]]      object
> document      object
> navigator      object
> clientInformation      object
> [[DOMElement.prototype]]      object
> [[DOMNode.prototype]]      object
> __flash_getWindowLocation      function
> __flash_getTopLocation      function
> myswfo2      object
> onMyLoad      function
> [[DOMEvent.prototype]]      object
> event      object
> frames      object
> onmouseup      object
> NodeFilter      object
> CSSRule      object
> length      number
> print      function
> opener      object
> parent      object
> scrollX      number
> scrollY      number
> XMLSerializer      object
> menubar      object
> defaultStatus      string
> onblur      object
> confirm      function
> scrollBy      function
> pageXOffset      number
> pageYOffset      number
> Node      object
> toolbar      object
> Image      object
> onabort      object
> onmousemove      object
> scrollTo      function
> onsearch      object
> onmousewheel      object
> screenLeft      number
> onmouseover      object
> crypto      undefined
> screenTop      number
> Range      object
> status      string
> onreset      object
> onselect      object
> document      object
> onunload      object
> onerror      object
> innerHeight      number
> innerWidth      number
> defaultstatus      string
> name      string
> frameElement      undefined
> offscreenBuffering      boolean
> onscroll      object
> history      object
> Event      object
> onresize      object
> navigator      object
> self      object
> top      object
> clientInformation      object
> outerWidth      number
> getSelection      function
> blur      function
> locationbar      object
> DOMException      object
> setInterval      function
> scrollbars      object
> clearTimeout      function
> moveBy      function
> alert      function
> clearInterval      function
> personalbar      object
> Option      object
> closed      boolean
> focus      function
> location      object
> konqueror      undefined
> outerHeight      number
> screenX      number
> screenY      number
> statusbar      object
> scroll      function
> moveTo      function
> resizeBy      function
> resizeTo      function
> window      object
> screen      object
> XMLHttpRequest      object
> DOMParser      object
> prompt      function
> open      function
> setTimeout      function
> close      function
> captureEvents      function
> releaseEvents      function
> addEventListener      function
> removeEventListener      function
> onchange      object
> onclick      object
> ondblclick      object
> ondragdrop      object
> onfocus      object
> onkeydown      object
> onkeypress      object
> onkeyup      object
> onload      function
> onmousedown      object
> onmouseout      object
> onmove      object
> onsubmit      object
> onbeforeunload      object
> showModalDialog      function
>
>
> -/-
>
> JONATHAN SPOONER | senior interactive developer
>
> ph 858 777 5013  fx 858 777 5034
> jspooner at aviatech.com
> www.aviatech.com
>
> <signature_logo.gif>
>
>
> Aviatech, LLC
> Integrated Marketing Solutions
> 4350 Executive Drive, Suite 200
> San Diego, CA 92121
>
> CONFIDENTIALITY NOTICE: This email transmission, and any documents,  
> files or previous email
> messages attached are intended only for the person(s) or entity to  
> which it is specifically addressed
> and may contain confidential information that is legally  
> privileged. Any review, re-transmission,
> dissemination or other use of, or taking of any action in reliance  
> upon, this information by persons
> or entities other than the intended recipient is prohibited. If you  
> received this in error, please
> contact the sender and destroy the original transmission and its  
> attachments without copying or
> saving in any manner.
>
>
> On Jul 24, 2006, at 6:59 PM, Geoff Stearns wrote:
>
> could you give us a list of them?
>
> to unset them, try either setting it to null, or just setting it to  
> ÂÂ
> an empty function:
>
> functionName = null;
>
> or
>
> functionName = new Function() {}
>
>
> On Jul 24, 2006, at 7:47 PM, Jonathan Spooner wrote:
>
> I'm able to find the functions.  Does anyone know how to remove one
> of them?
>
>
>
> On Jul 24, 2006, at 3:23 PM, Geoff Stearns wrote:
>
> well that's what i was afraid of... kinda bad news.
>
> there may be a small chance to fix it... when the player initializes,
> it inserts some js into the page... if we can watch what it's
> inserting, and remove the 'bad' code, then we might be able to fix ÂÂ
> it.
>
> i'm not sure i have time to do it this week, but if someone else can
> find ways to watch what js is being inserted (maybe just write some
> js that loops through all the javascript functions on the page after
> it's done loading and the flash player is initialized?) then we could
> try removing the functions one by one and see if that fixes the
> problem.
>
>
>
>
> On Jul 24, 2006, at 5:35 PM, Pablo Garayzábal wrote:
>
>
> The problem DOES NOT disappear using <object>, <embed> tags
> instead of
> SWFObject.js!!
>
> http://www.dinamik.es/test/normalEmbed.html
>
> So... it has to be a flash player 9 bug, not a SWFObject problem!.
>
> I think Adobe should be informed about it.
>
> Anybody knows how to do it? (any direct link or email for flash
> player
> bugs)?
>
> Do you think they'll do something to fix it?
>
>
>
> -----Mensaje original-----
> De: swfobject-bounces at lists.deconcept.com
> [mailto:swfobject-bounces at lists.deconcept.com] En nombre de Geoff
> Stearns
> Enviado el: lunes, 24 de julio de 2006 22:39
> Para: swfobject at lists.deconcept.com
> Asunto: Re: [SWFObject] BUG FOUND
>
> have you tried using a non-js embed method? just the generic object/
> embed tag that flash spits out?
>
> it's interesting that only fp9 shows the issue... i spoke briefly
> with a flash player tech when i made the streaming content fix in
> 1.4.2, and it sounded like he was going to put a similar fix into ÂÂ
> fp9
> to fix the problem (which is really an IE bug)
>
>
> the other issue with the movies changing position i'm treating as a
> different issue.
>
> if you comment out the 'onunload' part do they still change position
> when you click the link?
>
>
> On Jul 24, 2006, at 4:26 PM, Pablo wrote:
>
>
> Here are a few points I found (just to summarize):
>
> When two different swf with two different ExternalInterface Calls
> are in the
> same html:
>
> - Flash 8 works perfectly (It's only a flash 9 issue).
>
> - The adobe's suggested AC_RunActiveContent.js script presents the
> same
> problem (If not bigger. I had 2 more error messages testing it).
>
> - SWFObject v1.4.2 changes the position of the movies when pressing
> any
> link. Downgrading to v1.4.1 fixes this problem.
>
> - Different error messages depending on the machine (all running
> windows xp,
> iExplorer 6 and flash 9)
>
>
>
>
> -----Mensaje original-----
> De: swfobject-bounces at lists.deconcept.com
> [mailto:swfobject-bounces at lists.deconcept.com] En nombre de Geoff
> Stearns
> Enviado el: lunes, 24 de julio de 2006 22:08
> Para: swfobject at lists.deconcept.com
> Asunto: Re: [SWFObject] BUG FOUND
>
> i'm looking at this today actually... we have a project where this
> may be an issue, so hopefully in the next day or two i'll have a ÂÂ
> fix
> for you...
>
>
>
>
>
> On Jul 24, 2006, at 12:06 PM, Pablo Garayzábal wrote:
>
> Hi Geoff,
>
> I hope you have enjoyed your holidays!
>
> Do you have any clue about the ExternalInterface bug?
>
> The url and test files are here: http://www.dinamik.es/test/
>
> Thank you,
> Pablo.
>
>
>
> -----Mensaje original-----
> De: swfobject-bounces at lists.deconcept.com
> [mailto:swfobject-bounces at lists.deconcept.com] En nombre de Geoff
> Stearns
> Enviado el: miércoles, 19 de julio de 2006 10:01
> Para: swfobject at lists.deconcept.com
> Asunto: Re: [SWFObject] BUG FOUND
>
> someone just posted something to my blog and said that changing it
> from onunload to onbeforeunload fixed it. anyone want to try it ÂÂ
> out
> and let us know how it goes?
>
>
>
> On Jul 18, 2006, at 8:37 PM, Pablo Garayzábal wrote:
>
>
> Thanks for the "match case" point in the reference link.
>
> I did an extended replace from FLASHObject to SWFObject and ÂÂ
> caught
> the
> reference too (the site has more than 250 pages!!). You know, a
> minute after
> doing the change I found out that the change was not ÂÂ
> necessary...!
>
> I'll change it in all the pages, but it seems not to be the
> solution.
>
> About the crash, it behaves different depending on the machines.
> Some of my
> client's computers only show the "out of memory" alert, others ÂÂ
> the
> "stack
> overflow" thing, and others get totally freeze.
> It seems that there is not a regular pattern for that.
> (All machines run Windows XP Pro, ie6, Flash Player 9.)
>
> Thanks again for your help Jimbo,
> Pablo.
>
> ________________________________________
> De: swfobject-bounces at lists.deconcept.com
> [mailto:swfobject-bounces at lists.deconcept.com] En nombre de Jim
> Berkey
> Enviado el: martes, 18 de julio de 2006 20:10
> Para: swfobject at lists.deconcept.com
> Asunto: Re: [SWFObject] BUG FOUND
>
> Okay, I couldn't duplicate it locally at all, BUT, I uploaded ÂÂ
> your
> files
> here and find the same as you:
> http://jimbo.us/swfobjectTest/
>
> I did find that on index.html your javascript link is to
> SWFObject.js - but
> the file is actually all lowercase, so I changed it in ÂÂ
> index.html.
> Note: The version of swfobject.js is the one you have with the
> commented out
> section. I tried with a fresh version, and got the same time-
> out in
> IE when
> refreshing. I didn't crash, but did get the time-out message,
> referencing
> line 56.
> jimbo
> *********** REPLY SEPARATOR ***********
>
> On 7/18/2006 at 6:59 PM Pablo Garayzabal wrote:
> Hi Jim,
>
> If the message is null, then the player security policies are
> blocking the
> jsflash communication, and so the page doesnt crash.
>
> Are the test source files located in your desktop? Try to move
> them to
> another location (c: for example). It sounds weird, but flash
> player doesnt
> like C:\Documents and Settings\User\Desktop\  (dont ask me why,
> but Ive
> experienced very estrange situations with files residing in
> Windows
> desktop.).
>
> If I test the source files residing in the desktop, I get the ÂÂ
> same
> result
> (null, no crash).
>
> Anyway, have you tried http://www.dinamik.es/test/  ? (the same
> files
> located in a server)
>
> Thank you for your time!
> Pablo.
>
> ________________________________________
> De: swfobject-bounces at lists.deconcept.com
> [mailto:swfobject-bounces at lists.deconcept.com] En nombre de Jim
> Berkey
> Enviado el: martes, 18 de julio de 2006 18:01
> Para: swfobject at lists.deconcept.com
> Asunto: Re: [SWFObject] BUG FOUND
>
> Just tried again with the window.onload method added back in and
> still
> couldn't make IE crash??
>
> *********** REPLY SEPARATOR ***********
>
> On 7/18/2006 at 5:24 PM Pablo Garayzabal wrote:
> Hi Geoff,
>
> This is a real website problem I am dealing with. The example
> shown in
> dinamik.es is just a dummy simplification trying to debug it. (I
> didnt find
> it just testing, I wish I had time for that these days!!)
>
> The window.onunload method is commented since my first post.
>
> Heres the source code if you want to test:
>  http://www.dinamik.es/test/source.zip
>
> Thank you for your answer, and enjoy your holidays!!
> Pablo.
>
>
> ________________________________________
> De: swfobject-bounces at lists.deconcept.com
> [mailto:swfobject-bounces at lists.deconcept.com] En nombre de Geoff
> Stearns
> Enviado el: martes, 18 de julio de 2006 14:07
> Para: swfobject at lists.deconcept.com
> Asunto: Re: [SWFObject] BUG FOUND
>
> thanks for the extra testing... i haven't had time to verify this
> yet (i'm
> on vacation in europe until saturday night)
>
> I first thought that this might be related to the cleanUpSWFs()
> function i
> added in to address a streaming bug that popped up when you use
> innerHTML to
> write the <object> tag in IE, but if it happens with just 2
> movies,
> i'm not
> sure that's the case.
>
> if you have time, try commenting out the part that adds the
> window.onunload
> method and see if that helps. aside from that i'll have to take a
> closer
> look at it when i have more time (next week)
>
>
>
>
> On Jul 18, 2006, at 12:00 AM, Pablo Garayzabal wrote:
>
>
> Hi,
>
> First of all, I want to thank Geoff for his great and useful ÂÂ
> code.
>
> I found a bug affecting Flash player 9.
>
> When you try to establish two ExternalInterface callBacks for two
> different
> swfobjects, the page crashes in Internet Explorer 6 and Flash
> player 9.
>
> This is the environment:
>
> One html containing 2 different SWFObjects.
>
> Each swf with its unique Id
>
> Each swf with a different  ExternalInterface callBack method ÂÂ
> name.
> (Calling
> different javascript functions)
>
> In flash player 8 works fine. In flash player 9 the page crashes:
>
> - Out of memory message when trying to execute a getURL method
> from
> any swf
> movie.
> - Displacement of the swfs from their original position.
> - Clicking a simple <a href =whatever.html> html tag takes ÂÂ
> about
> 30-40
> seconds to execute. Then out of memory message
> - Out of memory at line ## error
> - Stack overflow at line ## error
>
> Downgrading to SWFObject v1.4.1 fixes the displacement problem.
>
> Source code and example at http://www.dinamik.es/test/
>
> Any help will be much appreciated.
>
> Thanks in advance,
> Pablo.
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
>
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
> <pastedGraphic.png>
> <pastedGraphic.png>
> <signature_logo.gif>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com
>
> _______________________________________________
> SWFObject mailing list
> SWFObject at lists.deconcept.com
> http://lists.deconcept.com/listinfo.cgi/swfobject-deconcept.com




More information about the Swfobject mailing list