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

  • Home
  • SEARCH
  • 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 7648219
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T10:39:39+00:00 2026-05-31T10:39:39+00:00

I have a simple image i select with (i’ve also try on() and one()

  • 0

I have a simple image i select with (i’ve also try on() and one()):

$container.find('.thumbnail img').load(function(){
  $container.trigger('resize');
});

For some reason tho I get Uncaught RangeError: Maximum call stack size exceeded. I’m loading these images from an S3 instance if that matters. I know it does redirects a few times, but I dont think that’d matter.

Has anyone run into this or something similar. I don’t feel like this should ever be an infinite loop. This also happens intermittently which is more confusing.

The resize stuff:

publicMethod.resize = function (options) {
    if (open) {
        options = options || {};

        if (options.width) {
            settings.w = setSize(options.width, 'x') - loadedWidth - interfaceWidth;
        }
        if (options.innerWidth) {
            settings.w = setSize(options.innerWidth, 'x');
        }
        $loaded.css({width: settings.w});

        if (options.height) {
            settings.h = setSize(options.height, 'y') - loadedHeight - interfaceHeight;
        }
        if (options.innerHeight) {
            settings.h = setSize(options.innerHeight, 'y');
        }
        if (!options.innerHeight && !options.height && $loaded.find('iframe').length == 0) {
            var $child = $loaded.wrapInner("<div style='overflow:auto'></div>").children(); // temporary wrapper to get an accurate estimate of just how high the total content should be.
            settings.h = $child.height();
            $child.replaceWith($child.children()); // ditch the temporary wrapper div used in height calculation
        }
        if("scrollTop" in options) {
            settings.scrollTop = options.scrollTop;
        }
        $loaded.css({height: settings.h});

        publicMethod.position(settings.transition === "none" ? 0 : settings.speed);
    }
};
  • 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-31T10:39:40+00:00Added an answer on May 31, 2026 at 10:39 am

    After a couple days of debugging this I finally tracked down the issue. The problem is a shim a developer on the Rails side a few months prior by Paul Irish that overrode an internal jQuery special.add method which completely broke any img.load() stuff. The snippet looks like this (and it’s deployed all over the web actually, but doesn’t cause an issue until jQuery 1.6-1.7+

    /*
     * Special event for image load events
     * Needed because some browsers does not trigger the event on cached images.
    
     * MIT License
     * Paul Irish     | @paul_irish | www.paulirish.com
     * Andree Hansson | @peolanha   | www.andreehansson.se
     * 2010.
     *
     * Usage:
     * $(images).bind('load', function (e) {
     *   // Do stuff on load
     * });
     * 
     * Note that you can bind the 'error' event on data uri images, this will trigger when
     * data uri images isn't supported.
     * 
     * Tested in:
     * FF 3+
     * IE 6-8
     * Chromium 5-6
     * Opera 9-10
     */
    (function ($) {
        $.event.special.load = {
            add: function (hollaback) {
                if ( this.nodeType === 1 && this.tagName.toLowerCase() === 'img' && this.src !== '' ) {
                    // Image is already complete, fire the hollaback (fixes browser issues were cached
                    // images isn't triggering the load event)
                    if ( this.complete || this.readyState === 4 ) {
                        hollaback.handler.apply(this);
                    }
    
                    // Check if data URI images is supported, fire 'error' event if not
                    else if ( this.readyState === 'uninitialized' && this.src.indexOf('data:') === 0 ) {
                        $(this).trigger('error');
                    }
    
                    else {
                        $(this).bind('load', hollaback.handler);
                    }
                }
            }
        };
    }(jQuery));
    

    So if you’re working on a large code base that uses jQuery and you’re getting call stack exceeded errors while trying to do an image load, this shim was probably added at some point.

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

Sidebar

Related Questions

I write a simple program to print a image in JSF.... I have one
I am looking for a fairly simple image comparison method in AS3. I have
I have a simple Button control that contains an Image object as its content.
I have a Base64 jpeg image string which is a simple signature image. I
I have a simple page with images, and when the user clicks the image,
so I have a simple problem. I have a hover background image change effect,
I have a fairly simple layout with an image, and some textviews wrapped in
i have a very simple animation in flash CS4. My image travels from point
I have a C++ program. It's quite simple - shows an image (splash screen)
I am having trouble implementing image rotation in CUDA. I have a very simple

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.