Error on site with image preload

What's happening at the Club. You can post your suggestions and ideas here, along with reports of any problems using the site.

Moderators: IMOC Moderators, IMOC Committee Members

Locked
Aidy

Error on site with image preload

Post by Aidy »

Anyone else get this sometimes? If you shut the errors all down it gives a stack overflow error then pops a new batch up. You have to shut IE down via Task Manager

Image
Waldo Dobbs
Posts: 111
Joined: Fri Dec 17, 2004 12:47 pm

Re: Error on site with image preload

Post by Waldo Dobbs »

I haven't had that, unless it's the same error I always get with animated gifs just coming out differently:

Image
BenF
Premium Member
Posts: 10764
Joined: Mon Dec 13, 2004 4:04 pm
Location: Ipswich
Contact:

Re: Error on site with image preload

Post by BenF »

Just use Firefox ;-)
Aidy

Re: Error on site with image preload

Post by Aidy »

BenF wrote:Just use Firefox ;-)


So I assume it just ignores errors which is just burying your head in the sand rather than fixing the fault :P
tonigmr2
IMOC Committee
Posts: 18054
Joined: Wed Dec 15, 2004 2:30 pm
Location: Here

Re: Error on site with image preload

Post by tonigmr2 »

I use IE and I've never had this...ever.
T
Aidy

Re: Error on site with image preload

Post by Aidy »

tonigmr2 wrote:I use IE and I've never had this...ever.
T


I think it is a timing thing depending on how many images are on the page. I only get it from time to time. It could probably be fixed using some try...catch blocks.
Sidewinder
Posts: 2766
Joined: Tue Dec 14, 2004 1:48 pm
Location: Wellingborough (or thereabouts)
Contact:

Re: Error on site with image preload

Post by Sidewinder »

Aidy wrote:
BenF wrote:Just use Firefox ;-)


So I assume it just ignores errors which is just burying your head in the sand rather than fixing the fault :P


...or maybe Firefox can handle webpages better than IE? :wink:
Mk2 NA Rev1 -*- Mk2 Turbo Rev2 -*- Mk1 NA -*- Mk2 Turbo Rev 3 = all gone!
_______________________________________
"Cruisey, Sporty, more innovation, more adult. A Man In Dandism. Powered mid-ship specialty."
jonno
Posts: 1157
Joined: Mon Dec 13, 2004 8:34 pm
Location: Derby
Contact:

Re: Error on site with image preload

Post by jonno »

Firefox quite happily ignores bad HTML and VBscript, this is usually a good thing since most web developers seem to have learnt their "skillz" without ever learning structured programming techniques or good practice. It also means that its a very bad browser to use for development testing since it glosses over your bad code.

Microsoft have been rushing IE updates through lately and im not totally convinced that some of them havent changed the way the browser renders VBscript in particular. I do have problems with the image resize script code when it runs through Finjan though, which seems to just remove the offending code and I dont see any pictures.

Being as most normal people dont have a problem it might be worth visiting http://windowsupdate.microsoft.com and catching up on the latest round of browser updates.
Forever Feels Like Home, Sitting All Alone Inside Your Head...
BenF
Premium Member
Posts: 10764
Joined: Mon Dec 13, 2004 4:04 pm
Location: Ipswich
Contact:

Re: Error on site with image preload

Post by BenF »

Aidy wrote:
BenF wrote:Just use Firefox ;-)


So I assume it just ignores errors which is just burying your head in the sand rather than fixing the fault :P


Aidy, more seriously - I'm assuming your PC has Visual Studio etc on it to handle website development?

I've found some of the debugging hooks it has cause real problems with IE's handling of pages, resulting in errors that you see.

I do use IE to view the site and I'm afraid I don't have any problems with it.

If we can get a repeatable error that many people see it makes it a lot easier to trace back the source of the error and fix it.

I'll see if it has been reported elsewhere and if there are any fixes.
Aidy

Re: Error on site with image preload

Post by Aidy »

My educated guess is that script on the page is trying to resize the image before the image is loaded into the array. Next time I get the error I'll debug it and see if it makes any sense.
Aidy

Re: Error on site with image preload

Post by Aidy »

I had a go at debugging the code and I think the problem is that it is retrying the same images multiple times. This might be becuase it sets a timer off for 10 seconds after which all images are refreshed. The problem might be if the images are not all loaded by the time that 10 seconds is up. It would need a lot more work to get the exact cause. You could try getting around the image by playing with the length of the timer that kicks off the table refresh.
poyntesm

Re: Error on site with image preload

Post by poyntesm »

Aidy,

Right had a look...believe it might be due to line 124

Code: Select all

rmw_obj.setAttribute('resizemod','over');


This can cause a bug if for some reason the onload event fires twice.

So I have deleted that line.

Regards
Esmond
Aidy

Re: Error on site with image preload

Post by Aidy »

poyntesm wrote:Aidy,

Right had a look...believe it might be due to line 124

Code: Select all

rmw_obj.setAttribute('resizemod','over');


This can cause a bug if for some reason the onload event fires twice.

So I have deleted that line.

Regards
Esmond


Yep, that's the problem. It sets the mode to "over" when it is done, and when the re-load fires the mode is neither on or off so it assumes it is a number (?) It tries to convert "over" to a number and things just fail.

Not sure if it is important but the page I looked at threw the problem on an image that was a smilie from another site. Might have been due to the small size of the image. Without getting the whole thing running locally I can't really say.
poyntesm

Re: Error on site with image preload

Post by poyntesm »

Think it should work no matter how small the image is...ler me know if you see the error again on the live site...but i am hopefull it is fixed now.
Locked

Return to “Club News and Announcements”