Archive for the 'Bugs' Category

Bug in Firefox 3.0.1 MAC

Friday, September 12th, 2008 by Luis

In the last few days I’ve been experiencing weird rendering problems in some websites while using the latest stable version of Firefox (3.0.1) in MAC.

Searching google I found more people having similar issuses like blinking pages when using SWFAddress for Flash in FF3 MAC.

In all the cases the solution given for the problem is to add a small delay between the visual transition and the JavaScript interaction of SWFAddress.

After reading all this posts I thought the problem was specific for SWFAddress but my surpsise was when I found similar problems in one of our projects which is not using SWFAddress at all and it is almost 4 years old (AS2). In this specific project we were using ExternalInterface extensivelly.

I have done a small test with just a gradient background and three round corner buttons using ExternalInterface call method to call three different javscript functions and the results are scary:

1) First button (left) calls an alert in javascript using a timeout:

JAVASCRIPT: setTimeout(”alert(’test 1 with timeout’)”, 1000);
FLASH: ExternalInterface.call(”test1″);

2) Second button (middle) calls an alert in javascript:

JAVASCRIPT: alert(”test2 no timeout”);
FLASH: ExternalInterface.call(”test2″);

3) Third button (right) calls scrollTo in javascript:

JAVASCRIPT: scrollTo(0,100);
FLASH: ExternalInterface.call(”test3″);

Second and third button in FF3 MAC makes the flash movie to behave in a weird way when the javascript action is executed.

http://www.lessrain.com/projects/luis/as3/bugs/ff3mac/deploy/

Looking at this results and considering that SWFAddress uses ExternalInterface I can say for now that part of the problem is caused by using the ExternalInterface call method in FF3 MAC (looking at the problem from a flash developer point of view, I don’t know what is happening behind the “Cocoa Firefox” scenes), but maybe the problem goes deeper than this, I don’t know yet, this is only my first attempt to find out the causes of Flash blinking and behaving bad in FF3 MAC.

Flash loading and browser cache test-suite

Thursday, July 10th, 2008 by Thomas

As a little homage to our most popular and seemingly helpful blog post about the Nasty XML load bug in Internet Explorer I created an app that tests the caching behavior of the browser it’s running in.

To recap - Loading XML files in Flash over an SSL Connection in Internet Explorer fails if the “Pragma: no-cache” or “Cache-Control: no-cache” HTTP headers are set in the server’s response.
In AS2 the loading failed silently, in AS3 we at least get an IO Error #2032, which has been discussed several times (see below)

If you want to keep the browser from caching your dynamic content you’ll have to use other means.
Judging from my tests, the best headers to prevent caching without causing errors in IE are: “Cache-Control: no-store” and/or “Expires: Thu, 01 Jan 1970 01:00:00 GMT”.

You can access the test suite here:

Set the headers that you’d like the server-script to return and find out what happens when the same request is sent twice after each other.
Use the Live HTTP Headers Plugin for Firefox if you’d like to see what the server actually returns.

Other interesting insights

  • The problem still exists in Internet Explorer 7! Don’t know about Vista…
  • Here it’s suggested that “Cache-Control: must-revalidate” and “Cache-Control: max-age=0″ also work. While that’s true in the sense that they don’t cause an error IE, they don’t seem to prevent caching 100% - there is a timeout.
  • “Pragma: no-cache” causes the error in IE, but doesn’t actually prevent it from caching at all when it’s set on a non-ssh connection.
  • Firefox internally sets the expiry date of script files to the past - so unless you set the “Expires” header to the future it’ll never cache the content.
  • Safari and Firefox change their caching behavior when the “Last Modified” header is set. If it’s in the past they seem to be happy to cache the file for you.

PHP sessions

Note that in PHP, as soon as you use sessions with session_start() the no-cache headers are added automatically. You’ll have to replace those headers or turn the default behavior off in php.ini. To replace the headers (found in the comments of the original post, see also the session-cache-limiter function and comments):

session_cache_limiter(’public’);
session_start();
header (”Cache-Control: cache, must-revalidate”);
// or if you still want to prevent caching
header (”Cache-Control: no-store”);
header (”Pragma: public”);

Related links:

Flash full-screen mode and Flash Player Update 3 Beta 1 (build 9.0.60.120)

Monday, July 16th, 2007 by Luis

It seems to be a small problem when triggering the full-screen mode in AS2 with the Flash Player Update 3 Beta 1 (build 9.0.60.120).

When triggering the full-screen mode from a button by using onPress handler under the Flash Player Update 3 Beta 1 plugin, the swf gets stack showing the hand cursor and blocking any kind of interactivity, instead the same trigger mode under the latest stable Flash Player version (9,0,47,0) behaves correctly.

The behavior is normal when triggering the full-screen mode from a button by using onRelease handler rather than onPress handler.

Since the Flash Player Update 3 Beta 1 is not release yet, this behavior can’t be considered as a bug (or maybe Adobe has changed the way you can trigger the full-screen mode) but just keep it in mind if you play around with this Flash player version and suddenly nothing works as you expected.

You can download the Flash Player Update 3 Beta 1 (build 9.0.60.120) here.

Test it here.

Flash: Anti-alias for readability + justify

Monday, March 27th, 2006 by Luis

Last month during the development of the new Redbull Formula 1 site, we found a big number of unexpected behaviors when using some of the new Flash 8 features such as the texfield advanced anti-aliasing mode.

When setting the align property of a textfield to "justify", the advanced antialising-mode is ignored completely. I don't really know if this is a bug or there is an explanation for it.

[UPDATED] It seems to work fine with Flash 8.5 player.

Example: [flash]http://www.blog.lessrain.com/wp-content/upload/justify.swf,450,200[/flash]

Flash: Nasty XML load bug in Internet Explorer

Thursday, November 17th, 2005 by Thomas

Loading XML files in Flash over an SSL Connection in Internet Explorer fails if the Pragma:no-cache or Cache-control:no-cache HTTP headers are set on the XML file.

Wow! I've been chewing on this one for a while... We have a Flash site running on https with dynamically generated XML content. The server always returned the Pragma:no-cache header so that the dynamic data isn't cached in the browser.

The bug is especially hard to find because the request goes out to the server successfully, but the XML object in flash remains undefined for no apparent reason. Only after removing the header output on the server it started to work.

Not nice.

This MS bug report seems to be related.

[edit]

This post has been replaced by a more recent one, including an application to test the caching behavior of Flash in different browsers.

Flash loading and browser cache test-suite

[edit]

Some more posts on the topic:

Marc Speck

Adobe Technote