locked
App crashes when navigating away from a page that has ads RRS feed

  • Question

  • Trying to add ads to a javascript metro style split app.  I'm adding the apps on the second page (that is split into the 2 parts).  The ads display properly however clicking the back button crashes the app with the following error:

    SCRIPT16389: Unhandled exception at line 593, column 17 in ms-appx://fc3df194.removed/MSAdvertisingJS/ads/ad.js
    0x80004005 - JavaScript runtime error: Unspecified error.
    File: ad.js, line: 593 column: 17

    The line in question is this:

    var adRect = this.element.getBoundingClientRect();

    Something to note  I'm using the test mode values from http://msdn.microsoft.com/en-us/library/hh506361(v=msads.10).aspx and

    Back button works fine with AdUnitId10043105

    But back button crashes the app with AdUnitIds: 10043106,10043107,10043104

    Friday, October 19, 2012 1:20 AM

Answers

  • Are you calling .dispose() on the control before navigating to the other page?  If not, that could be the issue you are running into here.
    • Proposed as answer by Naveen CS Monday, October 22, 2012 8:08 PM
    • Marked as answer by Song Tian Thursday, October 25, 2012 10:16 AM
    Saturday, October 20, 2012 5:41 AM

All replies

  • anyone?
    Friday, October 19, 2012 3:56 PM
  • Are you calling .dispose() on the control before navigating to the other page?  If not, that could be the issue you are running into here.
    • Proposed as answer by Naveen CS Monday, October 22, 2012 8:08 PM
    • Marked as answer by Song Tian Thursday, October 25, 2012 10:16 AM
    Saturday, October 20, 2012 5:41 AM