Image swap generates stack overflow error at line 0

M

Magnetoram

I have a page index4.htm that has a DWT and CSS attached. On the index4.htm
page I have an image that I am swapping out with image 2. When I save the
page and preview it in the browser I get the stack overflow error at line 0.
Any thoughts?
Thanks
 
K

Kevin Spencer

Stack overflows are almost always caused by infinite loops. An infinite loop
is when a looping sequence of statements doesn't terminate at any point. A
simple example:

for (i = 0; i < 20; i++)
{
i = 5;
}

Since i never gets to 20, the loop never quits.

However, some infinite loops are not so simple:

function add (a, b)
{
return Math.Abs(subtract(0 - a, b));
}

function subtract(x, y)
{
return add(x + (0 - y));
}

var result = add(1, 1);

The function add() calls the function subtract(), which calls the function
add() which... infinitely.

So, you have to follow the sequence through one or more functions sometimes
to find it.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Hard work is a medication for which
there is no placebo.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

stack overflow at line 1054 5
Stack Overflow 7
Styles: one personal useful layout 0
Stack Overflow 1
front page image swap 4
Background image 2
page with rotating image needing resave 0
swap image problem 5

Top