A couple of months ago a friend of mine asked me to take a look at an IT job posting that they were going to go for.  Being the good buddy that I am I followed the instructions to find the description but was confronted with a runtime error on each page.  I had been working on something earlier that week and had script debugging turned on in IE.  I guess it wasn't a big deal but I was drawn like a moth to a flame since this was happening on every single page on the site (at least all the ones I checked).  It didn't help that I was asked if I wanted to debug the script in each case, what do you think; of course I do.

First get the stack trace and read from the bottom of the stack to the top.  When looking at the stack you see that there are four calls in jscript, the last being OnScriptError.  Looking at those previous three calls you see that each function is packing around the memory address 069ac110.

0:016> kb
ChildEBP RetAddr  Args to Child              
0c1beefc 76980dde 7696b0b2 0005024a 00000001 ntdll!KiFastSystemCallRet
0c1bef00 7696b0b2 0005024a 00000001 00000000 USER32!NtUserWaitMessage+0xc
0c1bef34 7696bcda 000802dc 0005024a 00000001 USER32!DialogBox2+0x202
0c1bef5c 769bccdc 76960000 05d6b4b8 000105be USER32!InternalDialogBox+0xd0
0c1beffc 769bd25e 00000014 05daf898 00000000 USER32!SoftModalMessageBox+0x69f
0c1bf14c 769bd394 0c1bf158 00000028 000105be USER32!MessageBoxWorker+0x2c7
0c1bf1a4 769bd610 000105be 0c1bf280 00000000 USER32!MessageBoxTimeoutW+0x7f
0c1bf1c4 6d775985 000105be 0c1bf280 00000000 USER32!MessageBoxExW+0x1b
0c1bf1e4 769bd6ac 000105be 0c1bf280 00000000 IEFRAME!Detour_MessageBoxExW+0x2c
0c1bf200 6ba8ee6e 000105be 0c1bf280 00000000 USER32!MessageBoxW+0x45
0c1bf884 6ba0900e 0bbbcd08 0c1bf8f4 061889b8 mshtml!CScriptHolder::DoYouWishToDebug+0x20e
0c1bf8e8 6ee85320 05d13078 00000000 0c1bf954 mshtml!CScriptHolder::OnScriptError+0xa5
0c1bf8f8 6ee97f32 0bbbcd08 ffffffff 05f7b5a4 jscript!COleScript::OnScriptError+0x31
0c1bf954 6ee7fdd8 069ac110 0bbbcd08 86664004 jscript!COleScript::CreateScriptBody+0xe1
0c1bf9cc 6ee7fc46 069ac110 05f7b5a4 00000000 jscript!COleScript::ParseScriptTextCore+0x211
0c1bf9f8 6b8aca57 061889bc 069ac110 05f7b5a4 jscript!COleScript::ParseScriptText+0x2b
0c1bfa58 6b8ac888 05c7e970 05c1fb18 00000000 mshtml!CScriptCollection::ParseScriptText+0x240
0c1bfb14 6b99ece3 00000000 00000000 0688a660 mshtml!CScriptElement::CommitCode+0x263
0c1bfb3c 6b99ed2f 00000000 05c1fb18 0688a9a0 mshtml!CMarkup::CommitQueuedScripts+0x53
0c1bfb54 6b8cade8 00000000 05c1fb18 00000000 mshtml!CMarkup::CommitQueuedScriptsInline+0x3c

Dump whatever is at the suspect memory address and we find the error.

0:016> dU 069ac110
069ac110  "Synapse Website Usher Error: Dom"
069ac150  "ain not found...."

Since the runtime error was happening on each page I looked at the source of some of the pages and found that there were a few lines of HTML which inserted a JavaScript file used for analytics.

More than likely the average user would not have seen the errors because most folks have script debugging turned off, but I sent an email to the webmaster because it's always good to know about potential bugs.

By the way, this has apparently been fixed.