ShawnGarbett
12-05-2003, 09:28 AM
I've got some JavaScript for doing dynamic HTML based on a set of XML files. It loads an XML file and parses it, then based on that it loads and parses another one, till it gets what it wants built up and then dynamically adds it to the page. I call the parser using "document.onload". Full source code available at
jsFind (http://www.elucidsoft.net/projects/jsfind).
It sometimes mysteriously exits with no reason. No javascript errors occur, nothing. I tried capturing exceptions to no avail. The exit is cross platform as well, under different implementations of JavaScript. So I suspect that something is wrong with my script.
I tried the following fix and it didn't work either. I added a watchdog timer to timout after 10 seconds, if it wasn't disabled. This watchdog could then restart the parse. At least that was my idea. The watchdog never gets called (It does get called if I don't call the parse and put in a big loop). JavaScript has stopped mysteriously, and I get no error message, exception or means of recovery.
Any ideas how to fix/debug this? Anything?
jsFind (http://www.elucidsoft.net/projects/jsfind).
It sometimes mysteriously exits with no reason. No javascript errors occur, nothing. I tried capturing exceptions to no avail. The exit is cross platform as well, under different implementations of JavaScript. So I suspect that something is wrong with my script.
I tried the following fix and it didn't work either. I added a watchdog timer to timout after 10 seconds, if it wasn't disabled. This watchdog could then restart the parse. At least that was my idea. The watchdog never gets called (It does get called if I don't call the parse and put in a big loop). JavaScript has stopped mysteriously, and I get no error message, exception or means of recovery.
Any ideas how to fix/debug this? Anything?