The weirdest thing

Jan 23, 2013 at 10:28 AM
Edited Jan 23, 2013 at 10:30 AM

I have a weird bug.

When my device is connected to the system my game runs with out an Issue. When disconnected the game crashes.Any idea why this is happening???

 

I have added the basic AdrotatorXNA.dll and referenced that and AdDuplex.dll for Non Location aware. I gave a basic initialization and did not give any added properties to it.

this is my defaultAdSettings.xml

 

<?xml version="1.0" encoding="utf-8"?>
<AdSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <CultureDescriptors>
    <AdCultureDescriptor CultureName="en-US">
      <Probabilities Probability="100" AdType="PubCenter" AppID="8a494afc-REMOVED-373f11802faf" SecondaryID = "1028"/>
      <!--<Probabilities Probability="5" AdType="InnerActive" AppID="ZenithMoon_Studios_Flipped_WP7" />
      <Probabilities Probability="5" AdType="MobFox" AppID="474b65a3575dcbc261090efb2b996301" IsTest="false"/>
      <Probabilities Probability="40" AdType="PubCenter" AppID="78b9455f-db44-4de8-b0c3-1a91784790cd" SecondaryID="10029821" /> 
      <Probabilities Probability="40" AdType="Smaato" AppID="65754722" SecondaryID="923855310" />
      <Probabilities Probability="10" AdType="AdDuplex" AppID="7687"/>-->
      <Probabilities AdType="DefaultHouseAd" AppID="http://xna-uk.net/AdRotator/XNAHouseAdImage.png"/>
    </AdCultureDescriptor>
    <AdCultureDescriptor CultureName="en-GB">
      <Probabilities Probability="100" AdType="PubCenter" AppID="8a494afc-REMOVED-373f11802faf" SecondaryID = "108"/>
      <!--<Probabilities Probability="5" AdType="InnerActive" AppID="ZenithMoon_Studios_Flipped_WP7" />
      <Probabilities Probability="5" AdType="MobFox" AppID="474b65a3575dcbc261090efb2b996301" IsTest="false"/>
      <Probabilities Probability="40" AdType="PubCenter" AppID="78b9455f-db44-4de8-b0c3-1a91784790cd" SecondaryID="10029821" /> 
      <Probabilities Probability="40" AdType="Smaato" AppID="65754722" SecondaryID="923855310" />
      <Probabilities Probability="10" AdType="AdDuplex" AppID="7687"/>-->
      <Probabilities AdType="DefaultHouseAd" AppID="http://xna-uk.net/AdRotator/XNAHouseAdImage.png"/>
    </AdCultureDescriptor>
    <AdCultureDescriptor CultureName="de-DE">
      <Probabilities Probability="100" AdType="PubCenter" AppID="8a494afc-REMOVED-373f11802faf" SecondaryID = "108"/>
      <!--<Probabilities Probability="5" AdType="InnerActive" AppID="ZenithMoon_Studios_Flipped_WP7" />
      <Probabilities Probability="5" AdType="MobFox" AppID="474b65a3575dcbc261090efb2b996301" IsTest="false"/>
      <Probabilities Probability="40" AdType="PubCenter" AppID="78b9455f-db44-4de8-b0c3-1a91784790cd" SecondaryID="10029821" /> 
      <Probabilities Probability="40" AdType="Smaato" AppID="65754722" SecondaryID="923855310" />
      <Probabilities Probability="10" AdType="AdDuplex" AppID="7687"/>-->
      <Probabilities AdType="DefaultHouseAd" AppID="http://xna-uk.net/AdRotator/XNAHouseAdImage.png"/>
    </AdCultureDescriptor>
    <AdCultureDescriptor CultureName="default">
      <Probabilities Probability="100" AdType="PubCenter" AppID="8a494afc-REMOVED -373f11802faf" SecondaryID = "108"/>
      <!--<Probabilities Probability="5" AdType="InnerActive" AppID="ZenithMoon_Studios_Flipped_WP7" />
      <Probabilities Probability="5" AdType="MobFox" AppID="474b65a3575dcbc261090efb2b996301" IsTest="false"/>
      <Probabilities Probability="40" AdType="PubCenter" AppID="78b9455f-db44-4de8-b0c3-1a91784790cd" SecondaryID="10029821" /> 
      <Probabilities Probability="40" AdType="Smaato" AppID="65754722" SecondaryID="923855310" />
      <Probabilities Probability="10" AdType="AdDuplex" AppID="7687"/>-->
      <Probabilities AdType="DefaultHouseAd" AppID="http://xna-uk.net/AdRotator/XNAHouseAdImage.png"/>
    </AdCultureDescriptor>
  </CultureDescriptors>
</AdSettings>

Jan 23, 2013 at 11:56 AM

 

Hey I solved the issue.

This XML was stored on the local device. I forgot to give this

AdRotatorXNAComponent.Current.DefaultSettingsFileUri = "defaultAdSettings.xml";

I am really stupid sometimes.

Stan

Coordinator
Jan 23, 2013 at 1:45 PM

Glad you got it sorted.

Could you just clarify what that you said when it crashed on exit when running adrotator without config?

Also, we recommend not commenting out lines in the config, not an issue but for clarity just delete the lines and add them later as nessasary, crucial when you start hosting your config free online with Azure or Appharbout

Jan 23, 2013 at 5:00 PM

I had the defaultAdSettings.xml in the main project. I did not have one online(Check the link in DefaultHouseAd of the XML) and also I did not tell where to look for the file when it can't locate the webpage.

If you want to reproduce this.

- Create an empty XNA WP7 project

- Add the references for AdrotatorXNA.dll and AdDuplex.dll for Non-Location aware ads.

- Just Initialize the Adrotator component and add it to the components.

You will be able to run the game as long as it is connected to a system with Zune. If you unplug the device it will crash.