1

我有两年内在商店中的Windows应用商店应用。 Windows 10发布后,我得到了很多崩溃。我可以重现崩溃,但只能在Windows 10,而不是8或8.1上运行,而且我能够通过开发人员控制台查看此崩溃仅在Windows 10上发生。一个月的时间窗口10〜1000有很多这样的崩溃。仅在Windows 10上的Windows应用商店应用访问冲突例外

崩溃序列:我打开页面,app挂起一秒钟,然后关闭,没有任何报告建议。

当调试与Visual Studio应用程序,应用程序失败,异常:从dev.windows控制台

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

堆栈跟踪:

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 

这就是错误的描述,如果我下载报告:

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

有没有人也面临与Windows 10相同的问题呢? 据我所知,没有托管(我)函数调用堆栈跟踪,这是否意味着它是Windows 10的错误?

+0

你有没有崩溃转储分享?也发布链接到您的应用程序,以便其他人可以尝试 – magicandre1981

+1

我也遇到过这个问题,我相信它与播放媒体有关。我们有以下代码重现问题: var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri(“ms-appx:/// Resources/Sounds /”+ name +“.mp3”)); var stream =等待file.OpenAsync(FileAccessMode.Read); var mediaElement = new MediaElement(); mediaElement.SetSource(stream,file.FileType); mediaElement.Play(); 不好格式化的道歉! – Pooley

+0

@Pooley请将您的评论作为独立帖子发布,我会将其标记为答案!谢谢! –

回答

1

正如@Pooley所提到的,此代码会导致Windows错误10台计算机:

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(); 
0

我只是解决了一个非常类似的问题,在一个通用的应用程序将与读取访问冲突崩溃。堆栈跟踪与你的看起来非常相似,大多数情况下它都是从CXcpDispatcher :: Tick的某个地方崩溃的。尽管并非总是如此,但堆栈跟踪和异常本身有时会有所不同。

原因是一个本地的C++类,它是由一个简单的C#包装器dll导入(p/invoke)。当应用程序持有该类的实例时,它会偶尔崩溃。

该C++类有一个类型为std :: string的私有成员。删除该成员后,通用应用停止崩溃。 C++编译器实际上为该成员发出了一个警告C4251