2014-01-30 52 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。

有沒有人遇到類似的錯誤?還是有人有任何建議?

感謝

回答

相關問題