So when I am creating an App Package, the Windows App Certification Kit
fails with:
Crashes and hangs • Error Found: The crashes and hangs test detected the following errors:◦Application 47878User.MyApp_1.0.0.3_neutral__a2qvk4qzttz7j was detected by Windows Error Reporting and experienced a crash or hang.
In my event log I see the following:
Application: MyApp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.Exception Stack: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Threading.WinRTSynchronizationContext+Invoker.b__0(System.Object) at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
and:
Faulting application name: MyApp.exe, version: 1.0.0.0, time stamp: 0x50546b92 Faulting module name: KERNELBASE.dll, version: 6.2.9200.16384, time stamp: 0x5010ac2f
Exception code: 0xe0434352
Fault offset: 0x00014b32
Faulting process id: 0x1894
Faulting application start time: 0x01cd933a183ece6a
Faulting application path: C:\Program Files\WindowsApps\47878User.MyApp_1.0.0.3_neutral__a2qvk0qzyyn7m\MyApp.exe
Faulting module path: C:\Windows\SYSTEM32\KERNELBASE.dll Report Id: 6b9e9db3-ff2d-11e1-be8d-001c42ac6e2f Faulting package full name: 47878User.MyApp_1.0.0.3_neutral__a2qvk0qzyyn7m
The problem is that I can't for the life of me reproduce any crash, neither in Debug mode, Release mode, forcing Suspend/Re-activation events etc..
When the Windows App Certification Kit runs my app the 6th (or the 7th) time, my splash screen shows briefly, then my app disappears (crashing, likely).
What is the WAPK doing in the 6th run, and how can I reproduce/debug this?
I'm not an expert, but i have just been through the same process with my application to see if I could work out what was going on. Below is write up of what I did (in the hope it is useful to someone else).
Certiication Kit results
FAILED: Crashes and hangs
Error Found: The crashes and hangs test detected the following errors:
Application neutral__6j94sra26jgtm was detected by Windows Error Reporting and experienced a crash or hang. Impact if not fixed: An app that stops responding or crashes can cause data loss and is a poor user experience. How to fix: Investigate, debug the executable(s) in question to identify and fix the problem, then rebuild and re-test the app. Using Application Verifier Within Your Software Development Lifecycle.
This did not help at all. I assume the link has been updated since this discussion, however I didnt think it was that useful.
Investigation
Some errors are logged in the Event Viewer (windows key + R, type in "eventvwr"). I can see three useful entries:
The Windows Error Reporting Event has a bit more information including some filepaths of where your it has saved its log file.
I ended up running the windows application certification tool from command line and isolated the test that was failing to the PerfromanceShutdown test. Command used to run from command prompt is:
C:\Program Files (x86)\Windows Kits\8.0\App Certification Kit>appcert test -apptype windowsstoreapp -packagefullname <applicationfullname> -reportoutputpath e:\Projects\AlbumFlow.Win8\output1.xml
This lead us towards something happening in the suspend / exit / resume methods.
The other place I looked was in C:\Users\<userName>\AppData\Local\Microsoft\AppCertKit
. This had a couple of large files (~100Mb) Windows Performance Analysis trace files. This looked useful, but I didnt understand it.
Solution Whilst I was looking at the trace files other people in the team found that the suspension manager was not closing the file references correctly.
This could be reproduced by using the DebugLocation toolbar in visual studio. Chooseing Suspend, Resume, Suspend and Terminate reproduced the problem.
Hope this helps someone as it seems to be a bit of a dark art debugging these errors.
Ok, I found the issue a couple of days ago.
I didn't test the suspend and shutdown scenario properly.
If somebody has a similar issue; enable the Debug Location toolbar (View->Toolbars->Debug Location)
Start debugging and select the Suspend and Shutdown option.
I had an unhandled Exception in my OnSuspending event.
For all of you who come visiting this question deeply frustrated and not understanding why there's no dumps, no signs of actual crash or hang, no new entries from Windows Error Reporting appearing in Application Event Log, I have a recipe:
Clear your Application Event Log.
In my case I had the following problem: once upon a time our QA set device time in the future to test some application-specific stuff. We were unlucky enough to launch WACK while still being in the future. And our app crashed. After having time unwound to actual, we never managed to pass WACK crash and hang test on that device again. The reason was that WACK itself seems to use Windows Event Log to find reports from Windows Error Reporting. And in this case it finds them because they are actually still there, in the future. What makes things worse is that these future entries are actually pushed to the bottom in the default event view by ones that arrived later despite the timestamp, so they are hard-to-see unless you explicilty sort event log by date & time.
I wish I saved someone several hours of headbang.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With