FLUID-2351: [Uploader] rev 6621 of Uploader.js and Progress.js crash FF on the server

Metadata

Source
FLUID-2351
Type
Bug
Priority
Blocker
Status
Closed
Resolution
Fixed
Assignee
Eli Cochran
Reporter
Eli Cochran
Created
2009-03-16T11:18:11.000-0400
Updated
2009-03-26T10:24:01.000-0400
Versions
  1. 0.8
Fixed Versions
  1. 1.0
Component
  1. Uploader

Description

May be just a fluke with my server but I can consistently crash FF3 running the Uploader from my local server. This is revision 6621. Revision 6566 on builds.fluidproject.org does not display the same behavior.

Lets see:
Server version only
Flash 10
Firefox 3 (I tried disabling all my add-ons, no luck)

The reproducible steps are:
1. Click Browse Files
2. Add a few files to the queue
3. Click Upload
4. Let all files complete
5. Click Browse Files again
6. Add a few files
7. Click Upload

Result: FF immediately exits

Environments

FF3/Flash 10, running uploader from server

Comments

  • Eli Cochran commented 2009-03-16T11:19:50.000-0400

    rolled my server back to 6566 and the crash stopped. now rolling forward slowly to see where the big bad is.

  • Eli Cochran commented 2009-03-16T13:18:02.000-0400

    commented out the offending lines in Uploader.js:

    that.locate("totalFileProgressBar").addClass(that.options.styles.completed);
    that.locate("totalFileProgressBar").removeClass(that.options.styles.completed);

    and added a comment to that effect.

    This isn't a fix, it's just a temporary measure so that I can work on error messages

  • Justin Obara commented 2009-03-16T14:29:31.000-0400

    Bug Parade 1.0 release

  • Eli Cochran commented 2009-03-19T22:28:08.000-0400

    Not sure that we can easily fix this one. Or even difficultly fix this one.

    Because in trying to fix this bug, I discovered that this bug and FLUID-2334 (progress bars positioned in the wrong place) are related.

    So, I managed to reduce the FF crash from a crash to intermittent hang. Better, but suddenly FLUID-2334, which before I'd only seen in the demo version started happening in the server version.

    So what's happening is interesting. In both cases, bugs are being caused by SWFUpload's insistence on refreshing the Flash object on the page if anything in it's DOM ancestry changes.

    In the case of this crash, we get a funny race condition that crashes FF or occasionally hangs SWFUpload (not unlike the Pause bug by the way).

    In the case of FLUID-2334, we get recycled file ids because the refreshed Flash object doesn't remember that it had already used that id.

    This gives me a little insight on how to fix the bug... move the button out of the DOM ancestry... wonky... but it might work. Or I could move the styling for the total progress bar out of the ancestry, that might work as well.

    Anyway, I should have noticed a while back that when I commented out the feature to stop the crash, the other bug (FLUID-2334) stopped happening.

    Sorry for the ramble, but it's that kind of a bug!

  • Eli Cochran commented 2009-03-19T22:29:41.000-0400

    Same feature, changing the styling of the Uploader footer causes both FLUID-2334 and FLUID-2351

  • Eli Cochran commented 2009-03-20T20:15:00.000-0400

    Uploading the FLUID-2351.etc.a.patch

    After much thought and a lot of code I figured out that if I used the existing progress bar to indicated total doness for the Uploader instead of changing the footer (where the Flash object lives) that I could avoid the FF crash and a bunch of other problems. It also opened up an opportunity to fix a bunch of other bugs.

    This patch fixes:

    and moves FLUID-2355 one more step closer to completion!

    Mr. Colin Clark participated in a walk-through of the code, I made the recommended changes, so I'm checking it in. Still should be reviewed.

  • Eli Cochran commented 2009-03-20T20:15:57.000-0400

    Enclosed Fluid-2351.etc.a.patch fixes this bug. See comment above.

  • Jacob Farber commented 2009-03-26T10:12:23.000-0400

    Reviewed, and it works for me.

  • Justin Obara commented 2009-03-26T10:24:01.000-0400

    Verified fix using:

    FF3/Flash 10, running uploader from server