50

I recently released a Windows phone 8 app. The app sometimes seem to crash randomly but the problem is it crash without breaking and the only info I get is a message on output that tells me there were an Access violation without giving any details. So after releasing, from the crash reports I was able to obtain some more information, but they're kinda cryptical to me.

The info are:

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

I'm not used to work with memory pointer et similia and I'm not used to see a stack trace like that.

So I have those question:

  1. How should I interpret/read those information, what's the meaning of every piece of information?
  2. Is there a way to leverage those information to target my search for the problem?
  3. Is there a way to get those information while debugging in VS2012

Notes:

  • I'm not asking what an Access Violation is
  • I tagged this as c# and c++ because my code is in c# but the exception is generated (I'm semi-guessing) by c++ implementation for the WebBrowser component

edit:

I tried setting the Debug type to Native only, this let me obtain the same info I had in the crash report on the dev center. This way the debugger break when the exception is thrown and let me see the disassebled code, unfortunately there's no qcdx9um8960 .pdb file (even on Microsoft Symbol Server), so I don't know the function name that caused the error.

Fabio Marcolini
  • 2,315
  • 2
  • 24
  • 30
  • 18
    +1 for clarifying your question and thought process in the notes. – Daniel Hilgarth Sep 06 '13 at 13:31
  • 4
    I don't know the whole answer, but the "Frame Image Function Offset" is actually a malformed table that has been squished to one line. [Here is a fixed version of it](http://pastebin.com/KDGpmzaG), what it is telling you is you are two stack frames in when the exception happened, I think the `Offset` is what the [Program Counter](http://en.wikipedia.org/wiki/Program_counter) was at when it exited the stack so the first function was called at `0x00035426` and the error happened at `0x000227e2`. – Scott Chamberlain Sep 06 '13 at 13:55
  • @ScottChamberlain hey thank you, I would have never guessed that, I was thinking that the problem was started by an image object inside a frame – Fabio Marcolini Sep 06 '13 at 14:01
  • @FabioMarcolini I had no idea what it meant either, what made it click for me was [finding this post in German](https://www.flashback.org/sp43147839) while searching Google for "Frame Image Function Offset" (I have no idea what the German post is actually talking about). – Scott Chamberlain Sep 06 '13 at 14:04
  • 3
    @ScottChamberlain - that's not german ^_^. Looks more like swedish. – Corak Sep 06 '13 at 14:18
  • based off all the information here, i'd say contact the windows 8 devs to see what they say and get back to us here because this is a very interesting problem! – pyCthon Sep 06 '13 at 15:10
  • @pyCthon you mean how to resolve the access violation in this particular problem? or how to use the information? if the former it was already planned to contact them, but since we already asked two question which where actually known "unresolveable" issues, I think this may be the same. Unfortunately WebBrowser for Windows phone seems to be pretty bugged up. Fortunately is not a very frequent crash – Fabio Marcolini Sep 06 '13 at 15:49
  • 2
    Do you have the "map" file for the application? A map file can be generated by the linker that lists all the symbols and their addresses. The map file would be searched for the "Offset" numbers. – Thomas Matthews Sep 06 '13 at 19:20
  • Is this the only information you're getting? Or do you have traces for other threads as well? –  Sep 06 '13 at 19:25
  • @ThomasMatthews It seems to be not possible to do that for c# based application as written [here](http://social.msdn.microsoft.com/Forums/vstudio/en-US/71bb3e85-8223-423b-b76f-8a50c644052e/how-to-create-a-map-file-for-c-based-applications) – Fabio Marcolini Sep 09 '13 at 08:53

2 Answers2

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)

Cᴏʀʏ
  • 105,112
  • 20
  • 162
  • 194
  • Thank you for the response, I had already found most of the link you suggested. 1. not mine case 2. seems wrong to me, pdb are debug files but shouldn't cause crashes they just contain symbol for debugging 3. this may be the case for our application since it ALWAYS have more than one WebBrowser, we already sent a mail to MS asking for more explanation on the problem since it was one of their engineering to say that. Question: how did you find that qcdx9um8960 was related to Qualcomm Snapdragon S4 Plus? google return only 14 result for qcdx9um8960 and none says Qualcomm Snapdragon S4 Plus – Fabio Marcolini Sep 11 '13 at 08:06
  • 2
    @FabioMarcolini: I found out about the Qualcomm driver through reference 2, specifically [this post](http://sharpdx.org/forum/4-general/2068-toolkit-wp8-performance-issues-with-depthstencilbuffer#2115). The "qc" in the name is Qualcomm, "dx9" is DirectX 9, I'm not sure about the "u", then I googled "m8960 qualcomm" and found that it likely refers to the processor model number. Then I used reference 3 (Wikipedia) to match the processor to the phone. You will also find DLLs, for example, that end with "m8930", another model number of the Snapdragon. – Cᴏʀʏ Sep 11 '13 at 12:14
8

This kind of crash "should" never be caused by managed code, so you could go looking for a case where your app invokes some system or library API incorrectly. That's tedious. And the problem might have nothing to do with your app, it might be entirely internal to someone else's code. E.g, maybe WebBrowser crashes when user browses to some evil page. Or the failing code could be running on a thread that never even runs your code. From your observation that the debugger doesn't show any message before the access violation, and the fact that there are only 2 frames on the call stack, I suspect that's most likely.

So you should focus first on getting a (fairly) reliable repro scenario: the (minimal) set of steps that will (often or usually) produce the crash. This may involve interviewing the users who experienced the crash, or maybe some test automation on your part to try to accelerate the failure rate.

Once you have that, Microsoft (or another 3rd party) will accept responsibility -- managed code is never supposed to be able to cause an unhandled exception like access violation. And the scenario might give you a hint about how you can change your app's behavior to avoid the problem, because a real fix might take a long time to be released and distributed.

BobHy
  • 1,575
  • 10
  • 23