Not getting any ads

Mar 15, 2013 at 8:37 PM
I've spent some time playing with AdRotator but can't seem to get it to send me any ads. I have gone through the sample apps which work fine, of course, and I have been able to get it working on a blank new app but when I add the control to my own app it just never sends any ads. I've tried to strip out all the extra bits but nothing seems to work so any nudge in the right direction would be appreciated.

Thanks,
Ben

Xaml:

<AdRotator:AdRotatorControl x:Name="AdRotatorControl"
SettingsUrl="http://dagr8.com/dagr8/Note2Self/AdRotator/defaultAdSettings.xml" 
/>
Code:
    public MainPage()
    {
        // Umm... Did we just come back from a spectacular crash?
        LittleWatson.CheckForPreviousException();

        InitializeComponent();

        BuildApplicationBars();

        // Force the markup to respect the culture of the user's device
        this.Language = XmlLanguage.GetLanguage(Thread.CurrentThread.CurrentCulture.Name);

        Loaded += new System.Windows.RoutedEventHandler(PhoneApplicationPage_Loaded);
    }

    private void PhoneApplicationPage_Loaded(object sender, RoutedEventArgs e)
    {

        // AdRotator
        AdRotatorControl.Invalidate();

        // Set Trial or Purchased screen
        SetTrialOrPurchase();
etc...

Remote File is visible in a browser definitely reachable:

<?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="0" AdType="PubCenter" AppID="5d236161-a3c2-42b2-9a35-508a2b100cb9" SecondaryID="70092" />
        <Probabilities Probability="0" AdType="AdMob" AppID="a151429b4ac6725"/> 
        <Probabilities Probability="100" AdType="AdDuplex" AppID="36383"  />
    </AdCultureDescriptor>
    <AdCultureDescriptor CultureName="default">
        <Probabilities Probability="0" AdType="PubCenter" AppID="5d236161-a3c2-42b2-9a35-508a2b100cb9" SecondaryID="70092" />
        <Probabilities Probability="0" AdType="AdMob" AppID="a151429b4ac6725"/> 
        <Probabilities Probability="100" AdType="AdDuplex" AppID="36383"  />
    </AdCultureDescriptor>
</CultureDescriptors>
</AdSettings>
Mar 15, 2013 at 11:34 PM
Hi Ben, sorry you are having troubles.

First off, don't shoot the messenger but there is nothing wrong with your code / config above

I just through up a blank app and put your code in above verbatim (minus the proprietary stuff you've added) and it worked first time.

Here's what I did:
  • Created a new WP7 project
  • installed AdRotator 1.0.3 from nugget
  • Added the AdRotator name space and your XAML above to the main page
  • Added the "Loaded" event and invalidate code
And it just worked.

If you want, I can put the app on dropbox/skydrive or somewhere for you, but if you replicate the steps it should just work. So i'm guess something else is blocking it or (heaven forbid) it's being drawn off screen?

Hope that helps
Mar 15, 2013 at 11:48 PM
Thanks for the quick reply, Simon.

I promise not to shoot the messenger or anyone else. :)

I was pretty sure it was not in my code as I had done the same exercise you did by creating a blank project and getting that working fine. Thanks for confirming that.

I'm sure it's something simple in my project but I can't seem to figure out what's going on (no output, no exceptions and so nothing to go on). Could you provide some tips as to how I might debug what's going on? It's not clear if the app is requesting ads and they're not coming back or not doing anything at all. I'd love to get a scope on the thing to see what's going on under the covers. Is there any easy way to do that? I do see there is a Log event on the control but couldn't figure out what that did and couldn't find any docs for that. Do you think that might prove useful?

Thanks again for building and maintaining this project. It's a huge boon for the community.

Regards,
Ben
Mar 15, 2013 at 11:58 PM
One thing you can do (which the sample project highlight) is bind to the LOG event that AdRotator has which outputs information about what it's trying to do.
It's not overly detailed (something we wish to improve greatly in V2) but should give you enough info to tell you if you are getting ads or not, or if it's not even checking for some reason.

One other trick you can do is to use Fiddler while the device is tethered to your machine (disabling it's own wifi and data of course), or the emulator and you will see what requests / responses are coming out.

Hope this helps and thanks for the kind words :D

Still loving the podcast btw :D
Mar 16, 2013 at 12:08 AM
Thanks, Simon.

Can't believe I didn't think to use Fiddler. I'll give that a try.

I'm not seeing any reference to Log in the 2 samples I've been playing with BlankSilverlightProject - location and nonLocation-aware versions from the AdRotator Monster Sample Set. Am I missing it or is there another sample I should be looking at?

Thanks,
Ben
Mar 16, 2013 at 12:15 AM
Oops. Never mind. I just noticed that "AdRotator v1.3 Silverlight" includes a sample that is much more complete. I'll have a look at that.
Mar 16, 2013 at 1:10 AM
So hooking into the log event shows that the app is trying to request ads but failing with System.NullReferenceException on all the providers. Have you seen anything like this before?


AR-Log: Control tested before loaded
'TaskHost.exe' (Managed): Loaded '\Applications\Install\228C5A62-5C21-42F4-99EB-1B2A86F238B2\Install\Coding4Fun.Toolkit.Controls.dll'
TOMBSTONING EVENT: Navigated From MainPage at 5:02:09 PM
TOMBSTONING EVENT: Navigated To MainPage at 5:02:32 PM
AR-Log: Control tested before loaded
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: PubCenter
A first chance exception of type 'System.NullReferenceException' occurred in AdRotator.dll
AR-Log: Ads failed request for: PubCenter
AR-Log: Ads failed for: PubCenter
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: None
AR-Log: Ads failed request for: None
AR-Log: Ads failed for: None
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: None
AR-Log: Ads failed request for: None
AR-Log: Ads failed for: None

[keeps repeating until I hit the button to request the next provider]

AR-Log: Ads being requested for: AdMob
A first chance exception of type 'System.NullReferenceException' occurred in AdRotator.dll
AR-Log: Ads failed request for: AdMob
AR-Log: Ads failed for: AdMob
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: None
AR-Log: Ads failed request for: None
AR-Log: Ads failed for: None
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: None
AR-Log: Ads failed request for: None
AR-Log: Ads failed for: None

[keeps repeating until I hit the button to request the next provider]

AR-Log: Ads being requested for: AdDuplex
A first chance exception of type 'System.NullReferenceException' occurred in AdRotator.dll
AR-Log: Ads failed request for: AdDuplex
AR-Log: Ads failed for: AdDuplex
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: None
AR-Log: Ads failed request for: None
AR-Log: Ads failed for: None
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: None
AR-Log: Ads failed request for: None
AR-Log: Ads failed for: None

[keeps repeating until I hit the back key to exit]

TOMBSTONING EVENT: Navigated From MainPage at 5:02:44 PM
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: None
AR-Log: Ads failed request for: None
AR-Log: Ads failed for: None
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: None
AR-Log: Ads failed request for: None
AR-Log: Ads failed for: None
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: None
AR-Log: Ads failed request for: None
AR-Log: Ads failed for: None
The thread '<No Name>' (0x1cd225d6) has exited with code 0 (0x0).
The thread '<No Name>' (0x1cea236e) has exited with code 0 (0x0).
The thread '<No Name>' (0x157f22c2) has exited with code 0 (0x0).
The thread '<No Name>' (0x1df21e7e) has exited with code 0 (0x0).
Mar 16, 2013 at 1:33 AM
Hmm. I was able to get some strange results in the sample app by removing the defaultsettingsuri and using my own remote config file.
        <adRotator:AdRotatorControl x:Name="AdRotatorControl"
            SettingsUrl="http://dagr8.com/dagr8/Note2Self/AdRotator/defaultAdSettings.xml" 
            Margin="0,5" Visibility="Collapsed" SlidingAdDirection="None"/>
It seemed to try to request ads from Smaato and Inneractive and Mobfox even though I don't have those in my config file. Does not having a local settings file cause issues?

I'm not sure this is related to my issue though so might be a red herring for me.
Mar 16, 2013 at 2:00 AM
Sorry for the stream of consciousness here.

I just copied my own file locally to the sample project and it does request and get some ads but it also still seems to be trying to get ads from smaato, mobfox and inneractive which I don't have in either the local or remote settings file. Bizarre behavior. I wonder if I'm missing something somewhere...

I tried the same thing on my own app and it did solve my issue in that I started seeing ads but it alos still tries to get smaato, mobfox and inneractive and eventually it crashed hard with an exception:
System.Core.dll!System.Linq.Enumerable.First<AdRotator.Model.AdProbability>(System.Collections.Generic.IEnumerable<AdRotator.Model.AdProbability> source) + 0x53 bytes  
AdRotator.dll!AdRotator.AdRotatorControl.GetSecondaryID(AdRotator.Model.AdType adType) + 0x29 bytes 
AdRotator.dll!AdRotator.AdRotatorControl.DefaultHouseAdBody.get() + 0x17 bytes  
AdRotator.dll!AdRotator.AdRotatorControl.CreateDefaultHouseAdControl() + 0x56 bytes 
AdRotator.dll!AdRotator.AdRotatorControl.Invalidate(bool selectNextAdType) + 0x255 bytes    
Note2Self-v2.dll!Note2Self_v2.MainPage.Next_Button_Click(object sender, System.Windows.RoutedEventArgs e) Line 405 + 0xd bytes C#
System.Windows.dll!System.Windows.Controls.Primitives.ButtonBase.OnClick() + 0x1f bytes 
System.Windows.dll!System.Windows.Controls.Button.OnClick() + 0x1f bytes    
System.Windows.dll!System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(System.Windows.Input.MouseButtonEventArgs e) + 0x4e bytes  
System.Windows.dll!System.Windows.Controls.Control.OnMouseLeftButtonUp(System.Windows.Controls.Control ctrl, System.EventArgs e) + 0xc bytes    
System.Windows.dll!MS.Internal.JoltHelper.FireEvent(System.IntPtr unmanagedObj, System.IntPtr unmanagedObjArgs, int argsTypeIndex, int actualArgsTypeIndex, string eventName) + 0x115 bytes 
[External Code] 


Here's the log info:

AR-Log: Control tested before loaded
'TaskHost.exe' (Managed): Loaded '\Applications\Install\228C5A62-5C21-42F4-99EB-1B2A86F238B2\Install\Coding4Fun.Toolkit.Controls.dll'
TOMBSTONING EVENT: Navigated From MainPage at 5:51:37 PM
TOMBSTONING EVENT: Navigated To MainPage at 5:51:51 PM
AR-Log: Control tested before loaded
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: PubCenter
A first chance exception of type 'System.NullReferenceException' occurred in AdRotator.dll
AR-Log: Ads failed request for: PubCenter
AR-Log: Ads failed for: PubCenter

Requesting next ad: AdProvider.Text = AdRotatorControl.Invalidate(true);
AR-Log: Ads are enabled for display
AR-Log: Testing "AdMob" - Result True
AR-Log: Testing "AdDuplex" - Result True
AR-Log: Ads being requested for: AdMob
AR-Log: Ads being served for: AdMob
AR-Log: Ads being served for: AdMob
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: AdMob
AR-Log: Ads being served for: AdMob
AR-Log: Ads being served for: AdMob

Requesting next ad: AdProvider.Text = AdRotatorControl.Invalidate(true);
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: AdDuplex
AR-Log: Ads being served for: AdDuplex
AR-Log: Ads being served for: AdDuplex

Requesting next ad: AdProvider.Text = AdRotatorControl.Invalidate(true);
'TaskHost.exe' (Managed): Loaded 'System.SR.dll'
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.IsolatedStorage.IsolatedStorageException' occurred in mscorlib.dll
AR-Log: Ads are enabled for display
AR-Log: Testing "AdMob" - Result True
AR-Log: Testing "AdDuplex" - Result True
AR-Log: Ads being requested for: AdMob
'TaskHost.exe' (Managed): Loaded 'System.ServiceModel.Web.dll'
AR-Log: Ads being served for: AdMob
AR-Log: Ads being served for: AdMob

Requesting random ad: AdProvider.Text = AdRotatorControl.Invalidate();
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.Phone.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.Phone.dll
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.Phone.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.Phone.dll
'TaskHost.exe' (Managed): Loaded 'System.ServiceModel.dll'
The thread '<No Name>' (0x1c1e064a) has exited with code 0 (0x0).
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.Phone.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.Phone.dll
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.Phone.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.Phone.dll
The thread '<No Name>' (0x1ca02486) has exited with code 0 (0x0).
The thread '<No Name>' (0x1c201546) has exited with code 0 (0x0).
The thread '<No Name>' (0x1de61576) has exited with code 0 (0x0).
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.Phone.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.Phone.dll
The thread '<No Name>' (0x1d281fd2) has exited with code 0 (0x0).
The thread '<No Name>' (0x1dd7200e) has exited with code 0 (0x0).
The thread '<No Name>' (0x1cb319b2) has exited with code 0 (0x0).
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: InnerActive
'TaskHost.exe' (Managed): Loaded '\Applications\Install\228C5A62-5C21-42F4-99EB-1B2A86F238B2\Install\Inneractive.Nokia.Ad.dll'
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
AR-Log: Ads failed request for: InnerActive

Requesting next ad: AdProvider.Text = AdRotatorControl.Invalidate(true);
AR-Log: Ads are enabled for display
AR-Log: Testing "AdMob" - Result True
AR-Log: Testing "AdDuplex" - Result True
AR-Log: Ads being requested for: AdMob
AR-Log: Ads being served for: AdMob
AR-Log: Ads being served for: AdMob
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.Phone.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.Phone.dll
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.Phone.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.Phone.dll
A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in Microsoft.Phone.dll
A first chance exception of type 'System.UnauthorizedAccessException' occurred in Microsoft.Phone.dll
The thread '<No Name>' (0x1ddc1796) has exited with code 0 (0x0).
The thread '<No Name>' (0x1c682302) has exited with code 0 (0x0).
The thread '<No Name>' (0x1cfe1cca) has exited with code 0 (0x0).
Error - Ad Not Available (NoFill)
AR-Log: Admob Failed: Ad Not Available
AR-Log: Ads failed request for: AdMob
AR-Log: Ads are enabled for display
AR-Log: Testing "AdDuplex" - Result True
AR-Log: Ads being requested for: AdDuplex
AR-Log: Ads being served for: AdDuplex
AR-Log: Ads being served for: AdDuplex
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: MobFox
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
AR-Log: Ads failed request for: MobFox
AR-Log: Ads failed for: MobFox

Requesting next ad: AdProvider.Text = AdRotatorControl.Invalidate(true);
AR-Log: Ads are enabled for display
AR-Log: Testing "AdDuplex" - Result True
AR-Log: Ads being requested for: AdDuplex
AR-Log: Ads being served for: AdDuplex
AR-Log: Ads being served for: AdDuplex
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: Smaato
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
AR-Log: Ads failed request for: Smaato
AR-Log: Ads failed for: Smaato

Requesting next ad: AdProvider.Text = AdRotatorControl.Invalidate(true);
AR-Log: Ads are enabled for display
AR-Log: Testing "AdDuplex" - Result True
AR-Log: Ads being requested for: AdDuplex
AR-Log: Ads being served for: AdDuplex
AR-Log: Ads being served for: AdDuplex
AR-Log: Ads are enabled for display
AR-Log: Ads being requested for: DefaultHouseAd
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
Mar 17, 2013 at 3:42 PM
Interesting Log there Ben, will have to investigate.

The only reason I can think of why it might look at other providers would be if you had another local config file or the default config file being picked up by AdRotator. It shouldn't do that and I've not seen any evidence of it happening.
You could try deleting the default config file in your project to see if the issue replicates.

AdRotator does not persist or have any other config other than what it is given so there's no reason it should try other providers.

In your fiddler traces could you see the AdID's being used and do they match up to anything present in your project?

I'll look into it this side
Mar 19, 2013 at 1:24 AM
Thanks, Simon,

I looked some more and there is definitely no other xml file there. The only one there is a duplicate of the remote one. I tried this on the sample app that comes with the sdk and got the following Output (note the exceptions). I hooked it up to Fiddler as well and noticed that it not going out to any of the ad networks except for AdDuplex and Admob. I've put a copy of the sample project up on SkyDrive if you'd like to take a look: http://sdrv.ms/Uz8TLT

Curiouser and Curiouser. I'd love to know what's going on with this.

Thanks for the help and support,
Ben

'TaskHost.exe' (Managed): Loaded 'mscorlib.dll'
'TaskHost.exe' (Managed): Loaded 'System.Windows.RuntimeHost.dll'
'TaskHost.exe' (Managed): Loaded 'System.dll'
'TaskHost.exe' (Managed): Loaded 'System.Windows.dll'
'TaskHost.exe' (Managed): Loaded 'System.Net.dll'
'TaskHost.exe' (Managed): Loaded 'System.Core.dll'
'TaskHost.exe' (Managed): Loaded 'System.Xml.dll'
'TaskHost.exe' (Managed): Loaded '\Applications\Install\6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22\Install\AdRotatorExample.dll', Symbols loaded.
'TaskHost.exe' (Managed): Loaded 'Microsoft.Phone.dll'
'TaskHost.exe' (Managed): Loaded 'Microsoft.Phone.Interop.dll'
'TaskHost.exe' (Managed): Loaded '\Applications\Install\6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22\Install\AdRotator.dll'
'TaskHost.exe' (Managed): Loaded '\Applications\Install\6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22\Install\Microsoft.Advertising.Mobile.dll'
'TaskHost.exe' (Managed): Loaded '\Applications\Install\6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22\Install\MobFox.Ads.dll'
'TaskHost.exe' (Managed): Loaded '\Applications\Install\6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22\Install\Google.AdMob.Ads.WindowsPhone7.dll'
'TaskHost.exe' (Managed): Loaded '\Applications\Install\6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22\Install\Microsoft.Advertising.Mobile.UI.dll'
'TaskHost.exe' (Managed): Loaded '\Applications\Install\6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22\Install\Microsoft.Phone.Controls.dll'
'TaskHost.exe' (Managed): Loaded '\Applications\Install\6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22\Install\AdDuplex.WindowsPhone.dll'
A first chance exception of type 'Microsoft.Advertising.Shared.AdException' occurred in Microsoft.Advertising.Mobile.dll
The thread '<No Name>' (0xf4301ae) has exited with code 0 (0x0).
The thread '<No Name>' (0xeb401da) has exited with code 0 (0x0).
The thread '<No Name>' (0xea70216) has exited with code 0 (0x0).
The thread '<No Name>' (0xeba01ce) has exited with code 0 (0x0).
The thread '<No Name>' (0xf2001e2) has exited with code 0 (0x0).
A first chance exception of type 'Microsoft.Advertising.Shared.AdException' occurred in Microsoft.Advertising.Mobile.dll
The thread '<No Name>' (0xe750206) has exited with code 0 (0x0).
The thread '<No Name>' (0xe640172) has exited with code 0 (0x0).
The thread '<No Name>' (0xf3401b6) has exited with code 0 (0x0).
The thread '<No Name>' (0xe530232) has exited with code 0 (0x0).
The thread '<No Name>' (0xea70226) has exited with code 0 (0x0).
The thread '<No Name>' (0xf870166) has exited with code 0 (0x0).
Error - Ad Not Available (NoFill)
'TaskHost.exe' (Managed): Loaded 'System.ServiceModel.Web.dll'
'TaskHost.exe' (Managed): Loaded 'System.Runtime.Serialization.dll'
'TaskHost.exe' (Managed): Loaded 'System.ServiceModel.dll'
The thread '<No Name>' (0xeb60166) has exited with code 0 (0x0).
The thread '<No Name>' (0xe3a021a) has exited with code 0 (0x0).
The thread '<No Name>' (0xf4c01ba) has exited with code 0 (0x0).
The thread '<No Name>' (0xf54017e) has exited with code 0 (0x0).
The thread '<No Name>' (0xe980246) has exited with code 0 (0x0).
The thread '<No Name>' (0xffb01f6) has exited with code 0 (0x0).
Error - Ad Not Available (NoFill)
'TaskHost.exe' (Managed): Loaded '\Applications\Install\6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22\Install\Inneractive.Nokia.Ad.dll'
'TaskHost.exe' (Managed): Loaded 'System.SR.dll'
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Core.dll
Mar 19, 2013 at 1:04 PM
Hmm, that's looking like a bug we found in one of the releases which was resolved.
Might I ask that you download the Alpha Release and replace the AdRotator reference in your project to that one to see if it clears it up.

If so we'll see about getting the Alpha out the door.
Mar 20, 2013 at 4:32 AM
I pulled down the Alpha release but it does not fix the problem although it is better in that no longer crashes the app.

Using the sample that came with that I replaced the local settings file with my own and pointed it at my remote settings file and ran it in the emulator (tried both 7.1 and WXGA). It does the same thing but does not crash now. It still fails to get any ads other than Ad Duplex in the emulator (I guess that is ok as PubCenter won't and Admob has a near zero fill rate these days). It still seems to try getting ads from Inneractive and then tries to get an ad from Mobfox and Smaato (neither Inneractive nor Mobfox or Smaato are in my settings file). At least at some point now when it fails the log shows the Ad Control getting disabled. At that point nothing works in the app since the ad control is disabled. Running it on a 7.1 device gives the exact same behavior.

Do you think this is something new? Would going back to an earlier version fix this for me?

Thanks for all the help and support on this issue.

Ben
Mar 20, 2013 at 4:34 AM
Not sure it will be of much use but here's the output jic:

'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: DefaultDomain): Loaded 'C:\windows\system32\mscorlib.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Windows.RuntimeHost.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Windows.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Net.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Xml.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs{6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22}\Install\AdRotatorExample.DLL'. Symbols loaded.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\Microsoft.Phone.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\Microsoft.Phone.Interop.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs{6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22}\Install\AdRotator.DLL'. Cannot find or open the PDB file.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Core.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs{6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22}\Install\SOMAWP7.DLL'. Cannot find or open the PDB file.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs{6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22}\Install\MobFox.Ads.DLL'. Module was built without symbols.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs{6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22}\Install\AdDuplex.WindowsPhone.DLL'. Cannot find or open the PDB file.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs{6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22}\Install\Google.AdMob.Ads.WindowsPhone7.DLL'. Module was built without symbols.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs{6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22}\Install\Microsoft.Advertising.Mobile.UI.DLL'. Cannot find or open the PDB file.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs{6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22}\Install\Microsoft.Advertising.Mobile.DLL'. Cannot find or open the PDB file.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Xml.Serialization.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs{6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22}\Install\Microsoft.Phone.Controls.DLL'. Cannot find or open the PDB file.
An exception of type 'Microsoft.Advertising.Shared.AdException' occurred in Microsoft.Advertising.Mobile.DLL and wasn't handled before a managed/native boundary
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\en-US\mscorlib.debug.resources.dll'. Module was built without symbols.
An exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary
An exception of type 'System.IO.IsolatedStorage.IsolatedStorageException' occurred in mscorlib.ni.dll and wasn't handled before a managed/native boundary
The thread 0xa80 has exited with code 259 (0x103).
The thread 0xa7c has exited with code 259 (0x103).
The thread 0xa9c has exited with code 259 (0x103).
The thread 0xaa0 has exited with code 259 (0x103).
The thread 0xab0 has exited with code 259 (0x103).
The thread 0xab8 has exited with code 259 (0x103).
The thread 0xab4 has exited with code 259 (0x103).
Error - Ad Not Available (NoFill)
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.ServiceModel.Web.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\System.Runtime.Serialization.ni.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread 0xa24 has exited with code 259 (0x103).
The thread 0xad8 has exited with code 259 (0x103).
The thread 0xa2c has exited with code 259 (0x103).
The thread 0xb34 has exited with code 259 (0x103).
The thread 0xb38 has exited with code 259 (0x103).
The thread 0xb3c has exited with code 259 (0x103).
The thread 0xb44 has exited with code 259 (0x103).
The thread 0xb48 has exited with code 259 (0x103).
The thread 0xb4c has exited with code 259 (0x103).
Error - Ad Not Available (NoFill)
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\Data\Programs{6F148D31-E9FC-40FD-9CC4-CDA0A4EF5F22}\Install\Inneractive.Nokia.Ad.DLL'. Cannot find or open the PDB file.
'TaskHost.exe' (CLR C:\windows\system32\coreclr.dll: Silverlight AppDomain): Loaded 'C:\windows\system32\en-US\System.Core.debug.resources.DLL'. Module was built without symbols.
The program '[2500] TaskHost.exe' has exited with code -1 (0xffffffff).
Mar 20, 2013 at 9:54 AM
OK, suggest two next steps:
1: if possible can you put the project or a replica project that has the issue and mail me the link as I've been unable to replicate the exact issue
2: Can you try setting up a new project just implementing the Ad Controls individually as there seems to be a lot of "no Ad" reports listed above, just want to check your ad providers are actually serving ads in your setup.
Mar 20, 2013 at 3:19 PM
I had put an earlier project on my skydrive here: http://sdrv.ms/Uz8TLT

This is the sample project but with my settings files (local and remote).

Let me know if you need more.
Mar 20, 2013 at 9:21 PM
Hi Ben

I downloaded your test project and not seeing any abhorrent behaviour.

in a few seconds it's served AdDuplex ads in the emulator Pubcenter ads cannot be displayed because it's ran in an emulator (limitation by pubcenter)

but not seeing any of the other problems you mention, the logs only show the configured providers being polled and no others.

Any other info?
Mar 21, 2013 at 6:05 AM
Hi Simon,

That's really odd. In my case the app does serve ads from the my list but if I keep tapping the next ad button eventually the app seems to move on and try to request from the others. If I then continue to tap then after a few more taps the app crashes.

It's unclear to me how we could get such different behavior on the exact same project. VS version maybe (would that really affect this)? I'm using VS 2012 Update 1. Any other ideas as to what might affect the performance this much?

Thanks,
Ben
Mar 21, 2013 at 4:04 PM
Ahh, the world starts to make sense again :D

That means you are calling invalidate and passing "true" as the parameter, which is a debug only option. That effectively allows you to step through the AdProviders without using the probability but it expects all providers to be available. It was a test option for us to test providers were delivering results in the test app.

You should be calling "Invalidate()" with no parameters for live use.

Hope this helps.
Mar 21, 2013 at 5:30 PM
That's it!! :)

Ok. So that makes more sense now. You should probably document that somewhere. ;) Maybe just a comment on the line in the sample app (which is where I got the code from).

I think I'm good to go. some more testing then maybe publishing and perhaps a blog post or something like that.

Thanks a bunch for all the help and support on this one.

Regards,
Ben
Mar 28, 2013 at 12:21 AM
Hi Simon,

I've continued playing with this and found what I think is another issue. I've worked around it but thought I'd report it here in case it's not a known issue.

The control is working fine for me but what I found was that on first loading my app the ads would not load. The control was there and I was calling Invalidate() on PageLoaded but the control would never make the call to request the ads. I hooked up the Log and saw the "Control tested before loaded" message nut the control would just sit there empty. If I added a button to send a manual Invalidate() call then "Ads are enabled for display" message would appear and ads would begin coming in.

In my case I found that I had to wait for the control itself to be loaded and then call Invalidate() from within that AdRotatorControl_Loaded event. It seems like it may be a timing issue of some sort.

So does this look familiar? Known issue? Let me know if you need any additional on this.

Thanks,
Ben