Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6199419
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:11:05+00:00 2026-05-24T04:11:05+00:00

My problem : uncaught exception: [Exception… Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMCanvasRenderingContext2D.drawImage] nsresult:

  • 0

My problem :

uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMCanvasRenderingContext2D.drawImage]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: file:///***************.js :: redrawView :: line 308"  data: no]

The code which produce this behaviour (tmpImg is loading dynamically, so if it is not loaded yet, it skip it).

if(tmpImg!=null && tmpImg.img.complete===true && tmpImg.img.src!=null){
    var tmpPos = i_getCoordsImage(tmpImg);
    var rect = getRectInCurrentView(tmpPos.x,tmpPos.y,tmpPos.w,tmpPos.h);
    console.log(tmpImg);
    console.log(rect);
    mainDisplayContext.drawImage(tmpImg.img,rect.x,rect.y,rect.w,rect.h);
}

The problem happens several times when the tmpImg is just loaded (a least according to Firebug’s log), and then disappear.
The code snippet is called several times in a row, so I can’t see if the image is actually displayed when the error is thrown.
The value in rect.* are floating point, something like {x:-1500, y:-2500,h:1000,w:1000}

Do you have any idea about the origin of this error ?

Edit 1

This code produce the error (you need to have an image named “test.png” in the same directory

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">
<head>
    <meta charset="UTF-8" />
</head>
<body id="body">
    <canvas id="canvas" width="600" height="600"></canvas>
    <script>
    //[CDATA[
        var img = new Image();
        var mdc = document.getElementById("canvas").getContext("2d");
        function displayCallback(){
            if(img.complete===true && img.src!=null){
                mdc.drawImage(img,0,0,600,600);
            }
            setTimeout(displayCallback, 50);
        }
        setTimeout(function(){img.src = "test.png";}, 10000);
        setTimeout(displayCallback, 1000);
    //]]
    </script>
</body>
</html>

It seems related to the fact that the empty image has a src propriety of “”. Is it always true ?

edit 2

In fact, for the bug reporting, this JavaScript would suffice (if I understood) :

document.getElementById("canvas").getContext("2d").drawImage(new Image(),0,0);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T04:11:06+00:00Added an answer on May 24, 2026 at 4:11 am

    You get this kind of unhelpful error message from Firefox when a DOM API call throws a Javascript exception that isn’t caught. The code implementing drawImage — http://mxr.mozilla.org/mozilla-central/source/content/canvas/src/nsCanvasRenderingContext2D.cpp#3212 — appears to return the error code NS_ERROR_NOT_AVAILABLE (which is translated to a JS exception at the C++/JS boundary) when, for some reason, all of the data it needs to draw the image is not currently available. It appears that this can happen even when the image is considered to be fully loaded; I am not familiar enough with this part of the code to know why that might be.

    It is my opinion as an occasional Firefox internals hacker that you have found a bug in the browser: the specification for drawImage does not license the production of an exception with this error code under any circumstances. (Note the comment on line 3243, which seems to have misunderstood what the spec says.) Please construct a complete, self-contained test case that demonstrates the problem, and I will then be happy to help you file a bug report.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I encounter this problem Fatal error: Uncaught exception 'PDFlibException' with message 'Couldn't find encoding
I have an uncaught exception: Syntax error, unrecognized expression: ) in a jQuery application.
I'm seeing the following exception in FF 3.5.6: uncaught exception: [Exception... The URI is
Is there any way I could catch any uncaught exception in javascript? I mean,
Background I'm using UKCrashReporter in my app. I've installed my own Uncaught Exception Handler.
what is meaning * Terminating app due to uncaught exception 'NSRangeException', reason: '* -[NSMutableArray
I'm having a problem with either typecasting or object scope. I'm getting an uncaught
I am having an Terminating app due to uncaught exception 'NSRangeException', reason: '*** -[NSArray
so I encountered this error from Zend Framework: Fatal error: Uncaught exception 'Zend_Loader_PluginLoader_Exception' with
I'm having following Zend Session error with my zend project: Fatal error: Uncaught exception

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.