A Programmer’s Perspective twitter
A Programmer’s Perspective Rss

MooFlow Firefox Uncaught Exception Fix

Posted by Jason | Posted in javascript | Posted on 23-03-2009

7

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.

Comments (7)

Thanks dude!

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

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.

Thanks. That solved error but i can’t see any reflection in FF, but demos at mooflow are working good. Any idea?

// 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

Thanx a bunch, saved me some time

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.

Write a comment