#824 ✓incomplete

Stack overflow error

Reported by Josh | October 11th, 2009 @ 09:06 AM

Ok, I'm thinking this must be a problem with Internet Explorer. Bit surprise, huh?

Anyway, to the error. I get an error pop up that says "Stack overflow at line: 1715".

Now, this error was popping up on version, also. That's why i downloaded the newest version, 1.6.1. But the error persisted, just with a new line number.

The error happens whenever the page is unloaded. I don't have any scripts watching for a page unload, so I'm figuring it's something with prototype, given that it's the only third-party script that I'm using.

Any help would be appreciated.



Comments and changes to this ticket

  • Tobie Langel

    Tobie Langel October 11th, 2009 @ 01:01 PM

    • Tag cleared.
    • State changed from “new” to “incomplete”

    Thanks for your ticket. Unfortunately we aren't able to replicate the problem you've described. Could you please reopen this ticket with a failing test case attached?

    Thanks for taking the time to contribute.

  • matteo

    matteo November 6th, 2009 @ 03:27 PM

    • Tag set to bug, ie, overflow, stack
    • Assigned user set to “Tobie Langel”

    I found the same problem initializing an event observer with a null handler, like this:

    <a id="foo"> foo </a>
    <script type="text/javascript">
        $("foo").observe( "click", null );

    Check your code for eventual null pointer.

    Maybe we can do anything to solve the problem directly in prototype source code.

    I'm sorry for my english... ; ).


    OBCENEIKON November 16th, 2009 @ 09:38 PM

    After upgrading our version of prototype from (way out of date, I know) to 1.6.1 we started getting this error. I fixed it by simply changing

    Event.observe(window, 'load', functionName());
    Event.observe(window, 'load', function()

  • Tobie Langel
  • Tobie Langel

    Tobie Langel November 17th, 2009 @ 03:18 AM

    @obceneikon: the former is incorrect, the latter redundant. May I suggest: Event.observe(window, 'load', functionName); ?

  • Fjan

    Fjan January 14th, 2010 @ 04:05 PM

    Hi, I had exactly the same problem as matteo & obceneikon, just posting this for reference. The problem was an incorrect function call in my code inside document.observe, just like obceikon's first example. For some odd reason this problem was only exposed on 1.6.1, it worked fine on, and it only appears in IE.

  • Vijay shankar

    Vijay shankar January 15th, 2010 @ 03:39 PM

    This error unfortunately continues with me (occurs only on IE 7 though)! Does the prototype.js (1.6.1 version) does anything during onload, suppressing that would perhaps get rid of the "stack overflow error" !?

  • ronin-84834 (at lighthouseapp)

    ronin-84834 (at lighthouseapp) February 1st, 2010 @ 07:37 PM

    • Tag set to event observe, stack overlfow

    Hi, I kinda solved this problem by adding a return at the end of the function called by the observer (actually I got the idea from matteo's example of calling the observer with a null handler).

    Event.observe(window, 'load', doSomething());

    function doSomething() {
    ... does something ... return this; }

    Hope this is gonna work for you too..

  • Makoa

    Makoa February 19th, 2010 @ 08:35 AM

    • Tag changed from event observe, stack overlfow to stack overlfow

    I receive this error whenever the page whenever there is a redirect in one of my PHP scripts. I use header("Location: http://..."); to redirect the browser to a different page. It sounds like it is a header/PHP error, however, the stack overflow error only comes up when the previous page was loaded with prototype. I can put the URL that would have been called by clicking the link in the browser URL field, hit return, and the error message still appears. The line number that the error message references keeps moving depending on which link of mine is throwing the error.

    This is the only thing I have found consistent in where the error was occurring.

    This was not a problem in a previous version of prototype I was running and my code hasn't changed. As soon as prototype was upgraded, the stack buffer overflow started revealing itself.

    Send me a direct email if you want more info. I'm hoping we can get a fix soon.

  • Tobie Langel

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Prototype JavaScript library.

Shared Ticket Bins

People watching this ticket