问题
I have added Microsoft Ad SDK to my WinJS app and it crashes if I navigate away from my default.html page too fast.
<script src="/MSAdvertisingJS/ads/ad.js"></script>
If I comment out this line it does not crash. If I navigate to the default.html page and wait 10 seconds (possibly less) then it does NOT crash. It only crashes if I land on the page and immediately navigate to another page in the app. I set the destination page to be a blank html page and it still crashes.
Any ideas how I can debug further to see what is causing the issue?
Debugging it gives this call stack.
> kernel32.dll!00007ffc2c9c83a6() Unknown
combase.dll!00007ffc2e6a65b0() Unknown
twinapi.appcore.dll!00007ffc1b5847ac() Unknown
twinapi.appcore.dll!00007ffc1b58480f() Unknown
combase.dll!00007ffc2e6a61c2() Unknown
mscorlib.ni.dll!00007ffc0a8a2b2d() Unknown
I've further narrowed down the issue to being related to the link I'm navigating with.
<a href="home2.html">
<h1 class="mid">Start</h1>
</a>
<a href="home2.html">
<img src="images/d20.png" alt="d20 image" />
</a>
The first link crashes, the second doesn't. I changed the H1 tag into a span and it no longer crashes an early navigation. A few mins later it starts crashing again after adding a Div.
thanks
来源:https://stackoverflow.com/questions/24521856/how-to-debug-unhandled-win32-exception-in-winjs-win8-store-app