Upload
harold-green
View
215
Download
1
Embed Size (px)
Citation preview
Catch your elusive bugs
Min Kwan ParkTest Tech Lead
Visual C# QA team
• Fail fast• To-Dos for fail fast• Analyze issues• Information for further action• Q&A
Agenda
• There are many ellusive bugs which are easily ended as “Not reproed”.
• They are not easy to track down to the root cause since the system fails later with random behavior.
• Static analysis can’t reveal all issues in run time.
• By using runtime error detection tools, you can sea the root cause at the moment of violation than later symptoms.
Fail Fast
• Disable OLE Exception filter– It hides your actual crash and leads you to wrong
direction• Enable JIT debugger
– Be ready to debug any crash• Install Appverifier and enable it for your native code
– Any other Exes from your product• Enable MDA for your managed code
– [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework] "MDA"="1“
• Enable Break at 1st chance AV
To-Dos for fail fast
• 1st chance AV– Check whether the AV is properly handled
or not• There should be specific exception
handler for AV case. • OLE Exception filter should not suck this
up• Crash
– Make sure that there was no 1st chance AV or improperly handled other exception types
Analyze issues
• Hang– Distinguish type between
• Visual freeze• 100% CPU usage• No back-ground thread activities
– Start from UI thread for sure since many cases hang means visual freeze
– See what events/objects are waited in UI thread
Analyze issues(Cont.)
• Appverifier Error reports– Stop at any error reporting from Appverifier and
debug it. – Read the error message from Appverifier carefully
and drill the information more. • MDA error reports
– If you start your test app under VS debugger. Use exception settings to enable necessary options
– Information on all options: http://msdn2.microsoft.com/en-us/library/d21c150d.aspx
Analyze issues(Cont.)
• Callstack– In many cases, call stack can tell the cause of
issues in dev’s eyes. • Dump file
– Prefer to have dump with heap. But mini dump is ok
• Screen shot – Often time the cause of issue can come from
unexpected components in UI. So having screen shot is often handy to analyze the issue. And it can help you to remember the repro later.
Information for further action
• Conclusion– Enable runtime analysis as much as possible to
reveal the bugs– Always, drill down the cause of issue. In other
words, Debug your bug to understand it. – Put enough information into your bug
Q&A