2014-01-30 51 views
1

我一直在努力几天,在window.ui.xaml.dll中出现错误,当我在我的windows应用商店中使用bing-map SDK时。只有在地图上显示从A到B的路线并且每秒在地图上更新当前位置时才会出现此错误。当路线未显示时,错误尚未发生。Windows商店应用程序c#崩溃使用bing map sdk与路线

当我调试转储文件,我得到以下错误:

**The thread tried to to read from or write to a virtual address for which it does not have the appropriate access**
errorcode: 0xC0000005 access violation

调用堆栈:

Windows.UI.Xaml.dll!SolidColorBrushClone::SetValue() Unknown Windows.UI.Xaml.dll!CDependencyObject::UpdateEffectiveValue() Unknown Windows.UI.Xaml.dll!CAnimation::DoAnimationValueOperation() Unknown Windows.UI.Xaml.dll!CAnimation::UpdateAnimation() Unknown Windows.UI.Xaml.dll!CTimeline::ComputeStateImpl() Unknown Windows.UI.Xaml.dll!CTimeline::ComputeState() Unknown Windows.UI.Xaml.dll!CStoryboard::ComputeStateImpl() Unknown Windows.UI.Xaml.dll!CHardwareCompositor::TickIndependentAnimations() Unknown Windows.UI.Xaml.dll!CompositorScheduler::RenderThreadFrame() Unknown Windows.UI.Xaml.dll!CompositorScheduler::RenderThreadMain(void) Unknown Windows.UI.Xaml.dll!CompositorScheduler::RenderThreadMainStatic(unsigned char *) Unknown [email protected]@12() Unknown ntdll.dll!_RtlUserThreadStart() Unknown ntdll.dll![email protected]() Unknown`

的代码来更新我的位置:

 private async void UpdateMyPosition(Geocoordinate coordinates, bool setView = false) 
    { 
     try 
     { 
      await this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal,() => 
      { 
       try 
       { 
        MyLocation = new Location() 
        { 
         Latitude = coordinates.Point.Position.Latitude, 
         Longitude = coordinates.Point.Position.Longitude 
        }; 

        this.MyPosLayer.Children.Clear(); 
        AddPushpin(MyLocation, "", "", this.MyPosLayer, template: this.Resources["MyPositionPushpin"] as ControlTemplate); 

        if (setView) 
        { 
         double zoomLevel = (this.singleRoute == null) ? 14 : 18; 

         if (this.TargetsMap.ZoomLevel < zoomLevel) 
          zoomLevel = TargetsMap.ZoomLevel; 

         TargetsMap.SetView(MyLocation, zoomLevel); 
        } 
       } 
       catch (Exception exc) 
       { 
        Log.WriteLog(exc.ToString()); 
       } 
      }); 
     } 
    } 

错误没有用户在具有不同硬件的不同机器上的交互。 不幸的是我无法捕捉异常,因为它发生在windows.ui.xaml.dll中。 我正在使用bing-map的SDK的最新版本。

在应用程序崩溃文件夹中存在triagedump.dmp和显示相同错误的memory.hdmp。

有没有人遇到类似的错误?还是有人有任何建议?

感谢

回答

相关问题