Windows Store App Access Violation Exception only on Windows 10

2

I have Windows Store app that is in the Store for 2 years. After Windows 10 release I get a lot of crashes. I can reproduce crash, but only on Windows 10, not 8, or 8.1, also, I`m able to see that this crash happens only on Windows 10, through developer console. There are a lot of such crashes on windows 10 ~ 1000, for month.

The crash sequence: I open the page, app hangs for a second and then it closes without any suggestion for report.

When I debug app with visual studio, app fails with exception:

Access violation reading location 0x00000090 in Windows.Ui.Xaml.dll

Stack trace from dev.windows console:

windows_ui_xaml DirectUI::CCueRenderer::Initialize  0x154
windows_ui_xaml DirectUI::CTimedTextSource::Initialize  0xE0
windows_ui_xaml DirectUI::CTimedTextSource::Create  0x60
windows_ui_xaml DirectUI::MediaElement::EnableTimedText 0x60
windows_ui_xaml DirectUI::MediaElement::HandleMediaOpened   0x21
windows_ui_xaml DirectUI::MediaElement::OnMediaOpened   0x4D
windows_ui_xaml CFxCallbacks::MediaElement_OnMediaOpened    0x20
windows_ui_xaml CMediaElement::OpenMedia    0x156
windows_ui_xaml CMediaElement::HandleSourceReadyEvent   0x12
windows_ui_xaml CMediaElement::HandleMediaEvent 0x90
windows_ui_xaml CMediaQueue::ProcessQueue   0x67
windows_ui_xaml CMediaQueueManager::ProcessQueues   0x90
windows_ui_xaml CCoreServices::Tick 0x246
windows_ui_xaml CCoreServices::NWDrawTree   0x2F1
windows_ui_xaml CCoreServices::NWDrawMainTree   0xB7
windows_ui_xaml CWindowRenderTarget::Draw   0x73
windows_ui_xaml CXcpBrowserHost::OnTick 0x1CB
windows_ui_xaml CXcpDispatcher::Tick    0x88
windows_ui_xaml CXcpDispatcher::OnReentrancyProtectedWindowMessage  0x6F
windows_ui_xaml CXcpDispatcher::WindowProc  0xE0
user32  _InternalCallWinProc    0x2B
user32  UserCallWinProcCheckWow 0x1F0
user32  DispatchMessageWorker   0x231
user32  DispatchMessageW    0x10
windows_ui  Windows::UI::Core::CDispatcher::ProcessMessage  0x356
windows_ui  Windows::UI::Core::CDispatcher::WaitAndProcessMessages  0x129
windows_ui  Windows::UI::Core::CDispatcher::ProcessEvents   0x75
windows_ui_xaml CJupiterWindow::RunCoreWindowMessageLoop    0x55
windows_ui_xaml CJupiterControl::RunMessageLoop 0x25
windows_ui_xaml DirectUI::DXamlCore::RunMessageLoop 0x1E
windows_ui_xaml DirectUI::FrameworkView::Run    0x1A
twinapi_appcore Windows::ApplicationModel::Core::CoreApplicationView::Run   0x3D
twinapi_appcore _lambda_8b2420e462ae079d580fd8e4ff08c89d_::_helper_func_stdcall_    0xAC
shcore  _WrapperThreadProc  0xCA
kernel32    BaseThreadInitThunk 0x24
ntdll   __RtlUserThreadStart    0x2F
ntdll   _RtlUserThreadStart

That is errors description if I download reports:

NULL_CLASS_PTR_READ_c0000005_Windows.UI.Xaml.dll
NULL_POINTER_READ_c0000005_Windows.UI.Xaml.dll

Does anyone has faced the same issue with windows 10 too? As I understand, there is no managed (my) function calls in stack trace, does it mean that it is Windows 10 bug?

c#
windows-8
windows-store-apps
windows-10
access-violation

2 Answers

1

As @Pooley mentioned, this code causes error on windows 10 computers:

 var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri("msappx:///Resources/Sounds/" + name + ".mp3"));
 var stream = await file.OpenAsync(FileAccessMode.Read);
 var mediaElement = new MediaElement();
 mediaElement.SetSource(stream, file.FileType); mediaElement.Play();
answered on Stack Overflow Jan 21, 2016 by Boris Rozhkovsky
0

I just solved a very similar problem where an universal app would crash with read access violation. The stack trace looked very similar to yours, most of the time it crashed somewhere down the road from CXcpDispatcher::Tick. Although not always, stack trace and also the exception itself would vary sometimes.

The cause was a native c++ class that was dll-imported (p/invoke) by a thin C# wrapper. When the app was holding an instance of that class it would crash every now and then.

That c++ class had one private member of type std::string. After removing that member the universal app stopped crashing. The c++ compiler actually issued a warning C4251 for that member.

answered on Stack Overflow Feb 16, 2016 by Jiri • edited Feb 17, 2016 by Jiri

User contributions licensed under CC BY-SA 3.0