50

我最近发布了一个 Windows phone 8 应用程序。该应用程序有时似乎随机崩溃,但问题是它在没有中断的情况下崩溃,我得到的唯一信息是输出消息,告诉我存在访问冲突而没有提供任何详细信息。因此,在发布后,我能够从崩溃报告中获得更多信息,但它们对我来说有点神秘。

信息是:

Problem function: unknown //not very useful
Exception type: c0000005 //this is the code for Access violation exception
Stack trace: 
Frame    Image        Function      Offset 
0        qcdx9um8960                0x00035426 
1        qcdx9um8960                0x000227e2

我不习惯使用内存指针等,也不习惯看到这样的堆栈跟踪。

所以我有这些问题:

  1. 我应该如何解释/阅读这些信息,每条信息的含义是什么?
  2. 有没有办法利用这些信息来定位我对问题的搜索?
  3. 有没有办法在 VS2012 中调试时获取这些信息

笔记:

  • 我不是在问什么是访问冲突
  • 我将其标记为 c# 和 c++,因为我的代码在 c# 中,但异常是由 WebBrowser 组件的 c++ 实现生成的(我是半猜的)

编辑:

我尝试将 Debug 类型仅设置为 Native,这让我获得了与开发中心的崩溃报告中相同的信息。这样调试器会在抛出异常时中断并让我看到已禁用的代码,不幸的是没有 qcdx9um8960 .pdb 文件(即使在 Microsoft Symbol Server 上),所以我不知道导致错误的函数名称。

4

2 回答 2

17

Curiously, a search on the web for the image name "qcdx9um8960" returns several results referencing Windows Phone 8 and the WebBrowser control. Gathering the answers and replies (some even by MSFT), here is what you should possibly look into:

  • If you upgraded your application from Windows Phone 6/7 to 8, make sure you are not still referencing any 6/7 DLLs. 1
  • Make sure you aren't testing or publishing your software in Debug mode. There is a "qcdx9um8960.pdb" file that might be missing, causing the access violation. 1
  • "...there is a possible race condition known issue if the app has multiple copies of WebBrowser open. See if your code perhaps inadvertently makes more than one instance." 1
  • That image, "qcdx9um8960" is referencing a Qualcomm DirectX driver DLL. Perhaps it's not the WebBrowser component's fault, but the DirectX driver it might be using to render the web pages. 2
  • The name of the image suggests that the crash is happening on devices powered by a Qualcomm Snapdragon S4 Plus with model number MSM8960. 3
  • Assuming the processor above, and cross referencing Windows phones that use that chip, you're likely looking at the issue occurring on the Nokia Lumia 920T. 3 That's not to say that the driver doesn't work on several processor architectures or phones.

There are several other hits regarding crashes and issues debugging in the presence of that DLL, so unfortunately for you, I think you might be at the mercy of some third party software that has a few unresolved issues.


References

1 Access Violation since updated to WP8

2 [Toolkit][WP8] Performance issues with DepthStencilBuffer

3 Snapdragon (system on chip)

于 2013-09-10T18:40:01.063 回答
8

这种崩溃“不应该”由托管代码引起,因此您可以寻找应用程序错误调用某些系统或库 API 的情况。这很乏味。而且这个问题可能与您的应用程序无关,它可能完全是其他人的代码内部的。例如,当用户浏览某些邪恶页面时,WebBrowser 可能会崩溃。或者失败的代码可能运行在一个甚至从未运行您的代码的线程上。从您观察到调试器在访问冲突之前没有显示任何消息,并且调用堆栈上只有 2 帧这一事实,我怀疑这是最有可能的。

因此,您应该首先关注获得(相当)可靠的重现场景:将(经常或通常)产生崩溃的(最小)步骤集。这可能涉及采访经历过崩溃的用户,或者您可能会进行一些测试自动化以尝试加快故障率。

一旦你有了它,微软(或另一个第三方)将承担责任——托管代码永远不应该能够导致未处理的异常,如访问冲突。该场景可能会提示您如何更改应用程序的行为以避免问题,因为真正的修复可能需要很长时间才能发布和分发。

于 2013-09-07T00:06:12.307 回答