locked
How to handle crash dump and errors in metro app?

    Question

  • Dear all,

    I'm trying to figure out how our Metro app(written in C++) should handle crash or errors. Here're a few questions:

    1. Does Microsoft have a recommend approach/mechanism to handle crash in Metro app?

    2. We also would like to log our app. Should the logging be file-based?

    3. When crash happens, how to create a mini-dump file?

    I tried to search the answers from this forum. But so far I only found this seems useful: http://msdn.microsoft.com/en-us/library/windows/desktop/br205755.aspx 

    Let me know if you know the answers. Also please recommend any article/blog or books regarding this topic.

    Thanks!

    Friday, July 27, 2012 12:19 AM

Answers

All replies

  • Just let the app crash and have WER take care of if. User willing, a crash dump will be automatically collected and uploaded to your store summary page. See Improving apps with Quality reports .

    --Rob

    Friday, July 27, 2012 1:03 AM
    Owner
  • Hi Rob,

    Thank you so much for your reply. That's a great post. It's glad to see Microsoft making a big step forward in this direction.

    Another question is, how about logging? We'd like to do the book-keeping style logging in our code. That will help us understand and analyze where the real problem located.

    Can we use file-based logging? I got a feeling that Metro app limits native file access. Is it true? Correct me if I'm wrong. Also, is it okay to upload the log file to our file server(we can write our own HTTP/HTTPS uploader)? I'm just not sure if this is the recommended approach. 

    Thanks again!

    - Kenny

    Friday, July 27, 2012 6:58 PM
  • So long as you follow appropriate privacy guidelines and disclosure logging shouldn't be an issue.

    As far as the file system goes, you have full access to your application data folder. The limits are on access to arbitrary parts of the file system.

    --Rob

    Friday, July 27, 2012 7:46 PM
    Owner
  • Great! Thank you so much, Rob.
    Tuesday, July 31, 2012 12:34 AM
  • What would I, as the user of a particular machine, need to do to ensure that it generates a crash dump every time?

    I've just seen my app crash on my own Surface RT device, and I went looking for the crash info. All I found was a Report.wer file that contains very little. What I'd like to do is configure my own device always to produce a crash dump when my app crashes, so that if I see a crash, I know I'll be able to investigate it.

    It's not obvious to me what I have to do to enable that.

    This is a Windows Store app, and it's a development build side-loaded onto the machine using a developer license, so I'm guessing the normal production mechanism in which crash reports are uploaded to WER won't be available to me. I just want to be able to extract crash dumps directly from my own machine when it's running a dev build of my store app.

    Thursday, August 1, 2013 10:45 AM