UWP MapControl crashes after zooming in

痞子三分冷 提交于 2020-12-26 07:08:27

问题


I created a simple UWP application with no code, just XAML.

    <Grid>
        <maps:MapControl/>
    </Grid>

If I zoom in to about US state level, the application will crash with an unhandled exception.

The event viewer Application Log shows:

Faulting module name: ucrtbase.dll, version: 10.0.19041.546, time stamp: 0x43cbc11d
Exception code: 0xc0000409

I'm running on Windows 10 Version 20H2 (OS Build 19042.630).

How can I fix or diagnose this crash further?

Update 1

I was able to capture the call stack at the time of the crash:

    ucrtbase.dll!abort()    Unknown
    ucrtbase.dll!terminate()    Unknown
    ucrtbase.dll!__crt_state_management::wrapped_invoke<void (*)(void),void>(void (*)(void))    Unknown
    BingMaps.dll!MapControl::DetailTextureSource::beginGetTexture(class MapControl::TileFrameKey const &,class std::shared_ptr<class Pal::AsyncOperationImplementation<class MapControl::Versioned<class std::shared_ptr<class Engine::Texture> >,class std::shared_ptr<class Pal::UntypedAsyncOperation> > > const &,class std::shared_ptr<class MapControl::TileImage>,class Math::TileId const &)    Unknown
    BingMaps.dll!MapControl::DetailTextureSource::childOperationCompleted(class MapControl::TileFrameKey const &,class std::shared_ptr<class Pal::AsyncOperationImplementation<class MapControl::Versioned<class std::shared_ptr<class Engine::Texture> >,class std::shared_ptr<class Pal::UntypedAsyncOperation> > >,class Math::TileId,class Pal::AsyncOperation<class std::shared_ptr<class MapControl::TileImage> > const &)    Unknown
    BingMaps.dll!std::_Func_impl_no_alloc<class std::_Binder<struct std::_Unforced,void ( MapControl::DetailTextureSource::*)(class MapControl::TileFrameKey const &,class std::shared_ptr<class Pal::AsyncOperationImplementation<class MapControl::Versioned<class std::shared_ptr<class Engine::Texture> >,class std::shared_ptr<class Pal::UntypedAsyncOperation> > >,class Math::TileId,class Pal::AsyncOperation<class std::shared_ptr<class MapControl::TileImage> > const &),class MapControl::DetailTextureSource *,class MapControl::TileFrameKey const &,class std::shared_ptr<class Pal::AsyncOperationImplementation<class MapControl::Versioned<class std::shared_ptr<class Engine::Texture> >,class std::shared_ptr<class Pal::UntypedAsyncOperation> > > &,class Math::TileId const &,struct std::_Ph<1> const &>,void,class Pal::AsyncOperation<class std::shared_ptr<class MapControl::TileImage> > &>::_Do_call(class Pal::AsyncOperation<class std::shared_ptr<class MapControl::TileImage> > &)    Unknown
    BingMaps.dll!Pal::AsyncOperation<struct Core::DummyType>::callbackFromBaseClass(void)   Unknown
    BingMaps.dll!Pal::UntypedAsyncOperation::tryComplete(class Core::StatusCode)    Unknown
    BingMaps.dll!Pal::UntypedAsyncOperation::setSucceededOrFailedInternal(class Core::StatusCode)   Unknown
    BingMaps.dll!MapControl::PipelineAsyncSource<class std::shared_ptr<class MapControl::TileImage>,class std::shared_ptr<class Pal::AsyncOperation<class MapControl::DownloadedResource> > >::process(class MapControl::TileFrameKey const &,class std::shared_ptr<class Pal::AsyncOperationImplementation<class std::shared_ptr<class MapControl::TileImage>,struct std::pair<class std::shared_ptr<class Pal::AsyncOperation<class MapControl::DownloadedResource> >,class std::shared_ptr<class Utility::PrioritizableTask> > > > const &,class std::shared_ptr<class Pal::UntypedAsyncOperationCancelList> const &)    Unknown
    BingMaps.dll!std::_Func_impl_no_alloc<class std::_Binder<struct std::_Unforced,void ( MapControl::PipelineAsyncSource<class MapControl::Versioned<class std::shared_ptr<class MapControl::GenericMesh<struct Engine::xyzFloat3uvShort2stShort2> > >,class std::shared_ptr<class Pal::AsyncOperation<class MapControl::DownloadedResource> > >::*)(class MapControl::TileFrameKey const &,class std::shared_ptr<class Pal::AsyncOperationImplementation<class MapControl::Versioned<class std::shared_ptr<class MapControl::GenericMesh<struct Engine::xyzFloat3uvShort2stShort2> > >,struct std::pair<class std::shared_ptr<class Pal::AsyncOperation<class MapControl::DownloadedResource> >,class std::shared_ptr<class Utility::PrioritizableTask> > > > const &,class std::shared_ptr<class Pal::UntypedAsyncOperationCancelList> const &),class MapControl::PipelineAsyncSource<class MapControl::Versioned<class std::shared_ptr<class MapControl::GenericMesh<struct Engine::xyzFloat3uvShort2stShort2> > >,class std::shared_ptr<class Pal::AsyncOperation<class Map    Unknown
    MapConfiguration.dll!Pal::Task::run(void)   Unknown
    MapConfiguration.dll!Utility::PrioritizedTaskQueue::executeNextTask(void)   Unknown
    MapConfiguration.dll!Pal::Task::run(void)   Unknown
    MapConfiguration.dll!Microsoft::WRL::Details::DelegateArgTraits<long (__cdecl ABI::Windows::System::Threading::IWorkItemHandler::*)(ABI::Windows::Foundation::IAsyncAction *)>::DelegateInvokeHelper<Microsoft::WRL::Implements<Microsoft::WRL::RuntimeClassFlags<2>,ABI::Windows::System::Threading::IWorkItemHandler,Microsoft::WRL::FtmBase>,<lambda_a2440968369958b092dc7b4a3993b234> &,-1,ABI::Windows::Foundation::IAsyncAction *>::Invoke()  Unknown
    threadpoolwinrt.dll!Windows::System::Threading::CThreadPoolWorkItem::CommonWorkCallback()   Unknown
    threadpoolwinrt.dll!Windows::System::Threading::CThreadPoolWorkItem::BatchedCallback()  Unknown
    ntdll.dll!TppWorkpExecuteCallback() Unknown
    ntdll.dll!TppWorkerThread() Unknown
    kernel32.dll!BaseThreadInitThunk()  Unknown
    ntdll.dll!RtlUserThreadStart()  Unknown

Update 2

The crash does not occur in Aerial mode:

<maps:MapControl Style="AerialWithRoads" />

Update 3

From Microsoft support,

Upon investigation, the Bing Maps UWP control was inadvertently unable to handle a certain condition around the tiles. To mitigate this issue, our Product Group has initiated rolling back the change that impacted this experience. This issue should be beginning to resolve within the next hour, if not already.


回答1:


One of the maps services was returning bad data. This has been mitigated and the control should be working normally now.




回答2:


This is the support response I got from Microsoft:

Upon investigation, the Bing Maps UWP control was inadvertently unable to handle a certain condition around the tiles. To mitigate this issue, our Product Group has initiated rolling back the change that impacted this experience. This issue should be beginning to resolve within the next hour, if not already.

This issue is now resolved.




回答3:


I made a test for this. The sample works correctly in Build 2004 but it crashes in Build 20H2. If I remove the code that changes the ZoomLevel property, the sample will work correctly in Build 20H2 as well. I'll report this to the team.




回答4:


This happens to me also, it was just working fine yesterday and today the app is crashing when opening the page with the MapControl on it. Removing the ZoomLevel property helped.

 <maps:MapControl ZoomLevel="12" /> <!-- Crashed -->
 <maps:MapControl /> <!-- Working -->

Removing the ZoomLevel property but zoom in manual (or with mouse scrolling) the app is crashing while zooming in to far.

Temporary workaround:

 <maps:MapControl ZoomInteractionMode="Disabled" /> <!-- Better -->

Happens on Windows 10 Build 2004 also.




回答5:


I am facing exactly same issue. I have been testing my application for the last 2 months and it never crashed because of MapControl. I submitted the application on the store last week and yet no crash.

Suddenly, it started crashing today whenever the user navigated to map page containing PivotControl for different weather layers.

I don't think this has anything to do with Windows 10 build. I am facing this issue across multiple builds (1803, 1903 & 2004).

Here are my few observations.

  1. It works when I remove other Pivot Items and leave just one.
  2. It also works when I remove "ZoomLevel" property and leave all the pivot items.

It seems that Microsoft has changed something at the service end.



来源:https://stackoverflow.com/questions/64870089/uwp-mapcontrol-crashes-after-zooming-in

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!