MooFlow Firefox Uncaught Exception Fix
by Jason on March 23, 2009
I am using MooFlow for a project at work and it is absolutely fantastic. Nothing else gives the ease of use and nice look like MooFlow. However, it kept throwing an uncaught exception in Firefox:
Error: uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMCanvasRenderingContext2D.drawImage]” nsresult: “0×80040111 (NS_ERROR_NOT_AVAILABLE)” location: “JS frame :: http://your-server/MooFlow.js :: anonymous :: line 423″ data: no]
I have figured out a simple fix for this.
In the file MooFlow.js look for the following line of code:
ctx.drawImage(i, 0, 0, arg.width, arg.height);
And change it to this:
try {
ctx.drawImage(i, 0, 0, arg.width, arg.height);
} catch(err) {}
And that will do it!
Note: this “fix” will disable refllections in the firefox browser.
8 comments
Thanks dude!
by Primalmotion on April 1, 2009 at 1:11 am. #
Hey, how about that other stupid exception trying to open a frame’s document and write into it in the newest Firefox? I am getting that too all of a sudden in similar cirucmstances but noone else seems to be. Have you found out what it is?
I can open lots of iframe documents and write into them, just not some. Cant see the difference
by benson bear on April 4, 2009 at 12:15 am. #
Hi Benson,
I have experienced similar issues with the latest firefox. In my experience, my code would retrieve values set in another frame several times, then at the end of the function it would fail to do more of those operations. At some point in time, it was as though the window object had become corrupt.
The way I solved it was to define a variable at the very top of my function that would contain the reference to the window object. This solved it for me.
Hope this helps.
by Jason on April 4, 2009 at 7:37 am. #
Thanks. That solved error but i can’t see any reflection in FF, but demos at mooflow are working good. Any idea?
by mgsmus on April 9, 2009 at 2:11 am. #
// just change this to the one below
// var i = arg.img.clone();
var i = arg.img.clone().set(‘src’, arg.img.src);
and this works fine in mootools 1.2.1
by lizux on April 28, 2009 at 10:36 pm. #
Thanx a bunch, saved me some time
by Fonsan on July 2, 2009 at 7:58 am. #
Wow, lizux that worked great for me too in mootools 1.2.3, reflections are there. Only problem I’m having now is the bridge with ReMooz.
by BriAnn on July 27, 2009 at 4:25 pm. #
@lizux thanks a lot, that’s it.
by Thomas on March 30, 2010 at 3:14 am. #