1
Vote

Invalid cross-thread access

description

Invalid cross-thread access.
at MS.Internal.XcpImports.CheckThread()
at System.Windows.DependencyObject.GetValueInternal(DependencyProperty dp)
at System.Windows.FrameworkElement.GetValueInternal(DependencyProperty dp)
at System.Windows.DependencyObject.GetValue(DependencyProperty dp)
at MC.Phone.Ads.AdControl.get_AdProviderStrategy()
at MC.Phone.Ads.AdControl.OnAdError(AdErrorEventArgs e)
at MC.Phone.Ads.AdControl.<ProvideAd>b__12(AdControl instance, Object source, AdErrorEventArgs args)
at MC.Phone.Ads.Utils.WeakEventListener`3.OnEvent(TSource source, TEventArgs eventArgs)
at MC.Phone.Ads.Provider.BaseAdProvider.OnAdError(Exception exception)
at MC.Phone.Ads.InnerActive.InnerActiveAdProvider.AdFailed(Object sender)
at Inneractive.Nokia.Ad.InneractiveAd.IaAdFailed.Invoke(Object sender)
at Inneractive.Nokia.Ad.InneractiveAd.staticAdControl_AdFailed()
at Inneractive.Nokia.Ad.InneractiveAdControl.HandleAdFailed()
at Inneractive.Nokia.Ad.InneractiveAdControl.HandleGetWebPageResponse(IAsyncResult asyncResult)
at System.Net.Browser.ClientHttpWebRequest.<>c__DisplayClass1d.<InvokeGetResponseCallback>b__1b(Object state2)

Putting an Dispatcher.BeginInvoke around AdControl.OnAdError fixes the problem

comments

henkrik wrote Aug 6, 2013 at 8:41 AM

Is this a problem that only occurs with Inneractive ads or can it occur with other ads as well?

This happened to me and I disabled the inneractive ads hoping the app will be crash-safe, but the exception is thrown inside of AdControl...