330 likes | 650 Views
Agenda. Introduction to Window Error Reporting (WER)WER InfrastructureEnable WER in your platformLooking at WER data on your ownHow to access WER data from Microsoft Analyze and fix crashing problems. Introduction What is it?. Windows CE/Mobile Error Reporting a.k.a Watson, Dr. Watson, WER, Er
E N D
1. EMB318Improve Product Quality Using Windows CE Error Reporting (Watson) James Stulz
Program Manager
Windows CE Core Tools
Microsoft Corporation
3. Agenda Introduction to Window Error Reporting (WER)
WER Infrastructure
Enable WER in your platform
Looking at WER data on your own
How to access WER data from Microsoft
Analyze and fix crashing problems
4. Introduction What is it? Windows CE/Mobile Error Reporting a.k.a Watson, Dr. Watson, WER, Error Reporting
New for Windows CE/Mobile 5.0
The Error Reporting Client uploads crash data to Microsoft
Captures both System and Application level crashes
Microsoft actively utilizes Error Reporting data to identify and prioritize crashing problems
Share the Error Reports with OEMs and ISVs
Fix problems to improve quality
5. IntroductionWhat are the benefits? Provides actionable data for customer reported issues with your product
Educates you about the frequency/scale of those issues
Provides you with crash data and ability to analyze the problem
Bug prioritization based on report volume
Customer satisfaction and a successful product
6. IntroductionBug prioritization
7. IntroductionPrivacy The user gives permission for the upload
User can review the contents of the upload
All data is saved to a Microsoft-managed and secured database
Meets Federal Trade Commission's Safe Harbor Agreement and EU laws
Intent is fixing bugs, not to track users
8. IntroductionProcess overview
9. InfrastructureDesign overview
10. InfrastructureComponents Kernel components
Hd.dll
Osaxst0.dll
Driver components
Dwxfer.dll
Dwui.dll
Client app
Dw.exe
Approximate size = 110KB (ARM)
11. Infrastructure Captures Unhandled 2nd chance exceptions
3 types of captures
Standard MS minidump format
Context (4-64KB)
System (64KB-several MB)
Complete (all physical mem + 64KB)
Best fit approach depending on how much OEM allocates dedicated memory
We recommend 300KB RAM
12. Infrastructure Consent UI e.g. Pocket PC
13. Infrastructure Headless Devices Easy to configure
Simply exclude the UI component
Set the NoConsentRequired in the registry
Headless means no UI for users to opt-in
Is privacy an issue?
Some devices dont have privacy issues
If so, opt-in is not an issue
WER requires users to agree to the Privacy policy
Add the privacy policy to the User license
EULA
Shrink wrap license agreement
On host computer configuration
14. InfrastructureUpload to Microsoft Minidumps are compressed
Uploads using an HTTPS connection
Configurable
Directly thru an internet connection
Pass thru Active Sync connection
If the connection is successful
Files are deleted
If the connection is unsuccessful
Additional attempts will be made on new connection events
Asynchronous as connections happen
15. InfrastructureBucketing parameters Bucketing parameters are
Application name, version, and timestamp
Module name, version, and timestamp
Offset into the module
Owner application name, version, and timestamp
Group crash dumps into buckets
Similar crashes will result in the same bucket
After collecting so many just increment counters
16. Integrate WER Into AppsProgrammatically Capture BOOL CaptureDumpFileOnDevice(
DWORD dwProcessId,
DWORD dwThreadId,
LPCWSTR pwzExtraFilesPath
);
dwProcessId, dwThreadId
0 = current
Otherwise, provide the Id
pwzExtraFilesPath
Optional
Unique folder name (ownership changes)
Returns
TRUE = successful
FALSE = failure, check GetLastError()
17. Integrate WER Into Apps Exception Handling Handled exceptions do not trigger the capture
Generate a dump file from within an exception filter
EFaultRepRetVal ReportFault(
LPEXCEPTION_POINTERS pep,
DWORD dwOpt
);
pep Pointer to an EXCEPTION_POINTER structure
dwOpt Reserved and should be zero
Returns
frrvErrNoDW on error
fvvrOk successful capture
18. Integrate WER Into Apps Exception Handling Example __try
{
FunctionThatGeneratesAnException();
}
__except(ReportFault(GetExceptionInformation(),0), EXCEPTION_EXECUTE_HANDLER)
{
SomeHandlerFunction();
}
19. Add WER To Your Platform Using PB on a new platform
Add the features using Platform wizard
Using PB on an existing platform
Add features from the Catalog
Using the command line
Define the SYSGENs
Allocate dedicated memory the capture
20. Add WER To Your Platform Platform Wizard Windows CE Error Reporting checkbox
Selects all of the components
Exception Report Generator
Error Report Transfer Driver
Error Report Control Panel
Report Upload Client
Default is Client Without User Interface
Allocate the dedicated memory
Build your platform
21. Add WER To Your Platform Catalog Under CoreOS\Windows CE Devices
Add Windows CE Error Reporting components to your platform
Exception Report Generator
Error Report Transfer Driver
Error Report Control Panel
Report Upload Client
Report Client User Interface
Allocate the dedicated memory
Build your platform
22. Add WER To Your Platform Command line builds Define the SYSGENs
SYSGEN_WATSON_DMPGEN
SYSGEN_WATSON_XFER
SYSGEN_WATSON_CTPNL
SYSGEN_WATSON_CLIENT
SYSGEN_WATSON_CLIENT_UI
Allocate the dedicated memory
Build your platform
23. Add WER To Your Platform Dedicated memory Allocate the dedicated memory
In RAM (default)
Does not persist across cold boots
Set dwNKDrWatsonSize variable in OEMInit()
e.g. for 300 KB dwNKDrWatsonSize = (300 * 1024);
In OEM defined storage
Set dwNKDrWatsonSize variable in OEMInit()
OEM must provide the following routines
RAMDrWatsonFlush(void)
RAMDrWatsonClear(void)
RAMDrWatsonRead(DWORD dwOffset, LPVOID pData, DWORD cbSize)
RAMDrWatsonWrite(DWORD dwOffset, LPVOID pData, DWORD cbSize)
24. Configurability On device thru registry [HKEY_LOCAL_MACHINE\System\ErrorReporting\DumpSettings]
"MaxLogFiles"=dword:00000064
"MaxDiskUsage"=dword:000e1000
"UploadClient"="\\windows\\Dw.exe"
"ExtraFilesDirectory"="\\windows\\ExtraDumpFiles"
"CabDirectory"="\\Windows\\System\\DumpFiles\\CabFiles"
"DumpDirectory"="\\Windows\\System\\DumpFiles"
"DumpEnabled"=dword:00000001
[HKEY_LOCAL_MACHINE\System\ErrorReporting\UploadSettings]
"ManifestConsent"=dword:00000001
"UploadFailedDlg"=dword:00000000
"UploadSucceededDlg"=dword:00000000
"MaxDailyReports"=dword:00000000
"MaxWeeklyReports"=dword:00000000
"DontUpload"=dword:00000000
"NoConsentRequired"=dword:00000000
25. Analyzing The WER DataOn the device Lose advantages of bucketing parameters
Dumps are stored on the device
Configure not to Upload
Move the WER data off the device
Create your own client app
26. Analyzing The WER DataThru WinQual WinQual Windows Quality Online
http://winqual.microsoft.com
Part of the Windows Logo Program website
You do not have to have a logo
Requirements
Code Signing VerisignID Certificate
Sign Term of Use agreement (TOU)
File mapping
Request Responses
Close the loop with customers
27. Analyzing The WER DataDebugging Platform Builder Kernel Debugger
Postmortem debugger missed Windows CE 5.0
Power tools
UIDumpView.exe
http://download.microsoft.com/download/7/8/4/784bf4d2-2a21-416f-b495-1fd0f2340e3b/UIDumpViewer.exe
Matching binaries and sources are required
WinQual
Microsoft Symbol server
28. Debugging The crash James StulzProgram Manager
Windows CE Core Tools
29. Summary WER is easy to add
WinQual gives you direct access to your data
Fix hard to find crashing problems
Create a successful product
30. While at MEDC 2005 Fill out an evaluation for this session
Randomly selected instant WIN prizes!
31. After The Conference
32. Tools & Resources