UWP: optimize crash report with HockeyApp

2019-08-25 05:46发布

问题:

I've developed an UWP app for a client: as we encountered some bugs that I can't reproduce on my device, we've implemented HockeyApp. The client wanted to gain time/money so I only used the basis crash report:

HockeyClient.Current.Configure("xxxxxx",
  new TelemetryConfiguration() { EnableDiagnostics = true })
    .SetExceptionDescriptionLoader((Exception ex) =>
    {
      return "Exception HResult: " + ex.HResult.ToString();
    });

But it seems that isn't enough, as the doesn't allow me to fix the latest issues.

Edit - 28/11/2017:

I've uploaded the .pdb files as suggested by @XavierXie-MSFT, but this doesn't seem to change anything:

  • I don't get the the name of methods that occur exceptions in the StackTrace
  • there are many references to another project: "SharedLibrary"

To illustrate this, I noted these following exceptions:

WebService.WebServices.< CallXxxAsync >d__11.MoveNext

A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Address or server name could not be resolved)

Exception Stack:

unknown location
WebService.WebServices.<CallPullVComponentOrderAsync>d__18.MoveNext()

Raw Log:

Incident Identifier: 1ede9930-eee6-4c2f-a8c1-dc6db66b67c1
CrashReporter Key:   MeqZxKtCKaEOpv4tymz9cXaQ7gsapzCoRCrTZjfpIOw=
Hardware Model:      Surface Book
Identifier:      CompXxxReport.UWP
Version:         1.3.0.0

Date/Time:       2017-10-08T18:21:51.543Z
OS Version:      Windows 10.0.15063.632
Report Version:  104

Exception Type:  System.AggregateException
Crashed Thread:  2

Application Specific Information:
A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (Address or server name could not be resolved)

Exception Stack:
unknown location
WebService.WebServices.<CallPullVComponentOrderAsync>d__18.MoveNext()

=> I understand that the bug is related to a method of my synchronization that call a WebService, but why didn't I get more information in the stack trace?

System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw

The service cannot accept control messages at this time. Cannot open Vault

Exception Stack:

CompXxxReport.UWP!<BaseAddress>+0x1c9907c
CompXxxReport.UWP!<BaseAddress>+0x1c9943c
CompXxxReport.UWP!<BaseAddress>+0x1c9933d
CompXxxReport.UWP!<BaseAddress>+0x28dea0e
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
SharedLibrary!<BaseAddress>+0x69993e
SharedLibrary!<BaseAddress>+0x497d7c
CompXxxReport.UWP!<BaseAddress>+0x1c9907c
CompXxxReport.UWP!<BaseAddress>+0x1ce65e6
CompXxxReport.UWP!<BaseAddress>+0x1ce6514
Microsoft.HockeyApp.Extensibility.Windows.UnhandledExceptionTelemetryModule.CoreApplication_UnhandledErrorDetected(Object sender, ApplicationModel.Core.UnhandledErrorDetectedEventArgs e)

Raw Log:

Incident Identifier: 75cb3a76-fc12-48d9-9203-aee312aad7cc
CrashReporter Key:   bs7WcdiR7JeDpE1O7ZQc2SLDOk3VmOho4VSKm6tlSNY=
Hardware Model:      Surface Pro 4
Identifier:      CompXxxReport.UWP
Version:         1.3.0.0

Date/Time:       2017-10-30T13:11:19.472Z
OS Version:      Windows 10.0.14393.1715
Report Version:  104

Exception Type:  System.Exception
Crashed Thread:  2

Application Specific Information:
The service cannot accept control messages at this time.

Cannot open Vault

Exception Stack:
CompXxxReport.UWP!<BaseAddress>+0x1c9907c
CompXxxReport.UWP!<BaseAddress>+0x1c9943c
CompXxxReport.UWP!<BaseAddress>+0x1c9933d
CompXxxReport.UWP!<BaseAddress>+0x28dea0e
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
SharedLibrary!<BaseAddress>+0x69993e
SharedLibrary!<BaseAddress>+0x497d7c
CompXxxReport.UWP!<BaseAddress>+0x1c9907c
CompXxxReport.UWP!<BaseAddress>+0x1ce65e6
CompXxxReport.UWP!<BaseAddress>+0x1ce6514
Microsoft.HockeyApp.Extensibility.Windows.UnhandledExceptionTelemetryModule.CoreApplication_UnhandledErrorDetected(Object sender, ApplicationModel.Core.UnhandledErrorDetectedEventArgs e)

Thread 2 Crashed:
0   CompXxxReport.UWP          0x00007fff8110907c 0x00007fff7f470000 + 29986940
1   CompXxxReport.UWP          0x00007fff8110943c 0x00007fff7f470000 + 29987900
2   CompXxxReport.UWP          0x00007fff8110933d 0x00007fff7f470000 + 29987645
3   CompXxxReport.UWP          0x00007fff81d4ea0e 0x00007fff7f470000 + 42854926
4   SharedLibrary              0x00007fff7ce512b1 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs at 61:13
5   SharedLibrary              0x00007fff7d09993e System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__9_0(Object state) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Runtime\CompilerServices\AsyncMethodBuilder.cs at 957:49
6   SharedLibrary              0x00007fff7ce97d7c System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Threading\SynchronizationContext.cs at 171:21
7   CompXxxReport.UWP          0x00007fff8110907c 0x00007fff7f470000 + 29986940
8   CompXxxReport.UWP          0x00007fff811565e6 0x00007fff7f470000 + 30303718
9   CompXxxReport.UWP          0x00007fff81156514 0x00007fff7f470000 + 30303508
10  CompXxxReport.UWP          0x00007fff81b9f4ce 0x00007fff7f470000 + 41088206


Binary Images:
0x00007fff7f470000 - 0x00007fff827b9000 +CompXxxReport.UWP unknown  <d01255703a1f44bbbbc1d6cb327fc12c-1> C:\Projets\GitTablet - VS17\car-3.0-tablet\CompXxxReport.UWP\obj\x64\Release\ilc\intermediate\Native\CompXxxReport.UWP.pdb
0x00007fff7ca00000 - 0x00007fff7d195000 +SharedLibrary unknown  <824b2b5bacbe41bbbdc3422e6090614b-1> f:\ddSetup\SD\2\setup\msis\x86ret\enu\netfx_ProjectNamd64\TestILC\ExternalFiles\SharedAssemblyPath\ret.intermediate\Native\SharedLibrary.pdb

=> I understand that the bug is related to PasswordVault that I use to store user's credentials, but why didn't I get the related method?

System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw

Unspecified error (Excep_FromHResult 0x80004005)

Exception Stack:

CompXxxReport.UWP!<BaseAddress>+0x1c9907c
CompXxxReport.UWP!<BaseAddress>+0x1c9943c
CompXxxReport.UWP!<BaseAddress>+0x1f29c81
CompXxxReport.UWP!<BaseAddress>+0x2c44d8d
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
SharedLibrary!<BaseAddress>+0x4511ee
SharedLibrary!<BaseAddress>+0x451168
SharedLibrary!<BaseAddress>+0x50c81a
CompXxxReport.UWP!<BaseAddress>+0x2c511b7
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
SharedLibrary!<BaseAddress>+0x69993e
SharedLibrary!<BaseAddress>+0x497d7c
CompXxxReport.UWP!<BaseAddress>+0x1c9907c
CompXxxReport.UWP!<BaseAddress>+0x1ce65e6
CompXxxReport.UWP!<BaseAddress>+0x1ce6514
Microsoft.HockeyApp.Extensibility.Windows.UnhandledExceptionTelemetryModule.CoreApplication_UnhandledErrorDetected(Object sender, ApplicationModel.Core.UnhandledErrorDetectedEventArgs e)

Raw Log:

Incident Identifier: ad9d1d59-d444-49e6-88fb-2d412a3980e3
CrashReporter Key:   qcygznd4Cv/R0+Ne9+KNn/+iP4aMuMLf2Q2kw0LgpsY=
Hardware Model:      Latitude 5175
Identifier:      CompXxxReport.UWP
Version:         1.3.0.0

Date/Time:       2017-11-12T08:54:52.741Z
OS Version:      Windows 10.0.14393.1770
Report Version:  104

Exception Type:  System.Exception
Crashed Thread:  2

Application Specific Information:
Unspecified error (Excep_FromHResult 0x80004005)

Exception Stack:
CompXxxReport.UWP!<BaseAddress>+0x1c9907c
CompXxxReport.UWP!<BaseAddress>+0x1c9943c
CompXxxReport.UWP!<BaseAddress>+0x1f29c81
CompXxxReport.UWP!<BaseAddress>+0x2c44d8d
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
SharedLibrary!<BaseAddress>+0x4511ee
SharedLibrary!<BaseAddress>+0x451168
SharedLibrary!<BaseAddress>+0x50c81a
CompXxxReport.UWP!<BaseAddress>+0x2c511b7
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
SharedLibrary!<BaseAddress>+0x69993e
SharedLibrary!<BaseAddress>+0x497d7c
CompXxxReport.UWP!<BaseAddress>+0x1c9907c
CompXxxReport.UWP!<BaseAddress>+0x1ce65e6
CompXxxReport.UWP!<BaseAddress>+0x1ce6514
Microsoft.HockeyApp.Extensibility.Windows.UnhandledExceptionTelemetryModule.CoreApplication_UnhandledErrorDetected(Object sender, ApplicationModel.Core.UnhandledErrorDetectedEventArgs e)

Thread 2 Crashed:
0   CompXxxReport.UWP          0x00007ffb7cb0907c 0x00007ffb7ae70000 + 29986940
1   CompXxxReport.UWP          0x00007ffb7cb0943c 0x00007ffb7ae70000 + 29987900
2   CompXxxReport.UWP          0x00007ffb7cd99c81 0x00007ffb7ae70000 + 32676993
3   CompXxxReport.UWP          0x00007ffb7dab4d8d 0x00007ffb7ae70000 + 46419341
4   SharedLibrary              0x00007ffb846312b1 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs at 61:13
5   SharedLibrary              0x00007ffb846311ee System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess($Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Runtime\CompilerServices\TaskAwaiter.cs at 187:25
6   SharedLibrary              0x00007ffb84631168 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification($Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Runtime\CompilerServices\TaskAwaiter.cs at 156:42
7   SharedLibrary              0x00007ffb846ec81a System.Runtime.CompilerServices.TaskAwaiter.GetResult() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Runtime\CompilerServices\TaskAwaiter.cs at 113:13
8   CompXxxReport.UWP          0x00007ffb7dac11b7 0x00007ffb7ae70000 + 46469559
9   SharedLibrary              0x00007ffb846312b1 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs at 61:13
10  SharedLibrary              0x00007ffb8487993e System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.<ThrowAsync>b__9_0(Object state) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Runtime\CompilerServices\AsyncMethodBuilder.cs at 957:49
11  SharedLibrary              0x00007ffb84677d7c System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Threading\SynchronizationContext.cs at 171:21
12  CompXxxReport.UWP          0x00007ffb7cb0907c 0x00007ffb7ae70000 + 29986940
13  CompXxxReport.UWP          0x00007ffb7cb565e6 0x00007ffb7ae70000 + 30303718
14  CompXxxReport.UWP          0x00007ffb7cb56514 0x00007ffb7ae70000 + 30303508
15  CompXxxReport.UWP          0x00007ffb7d59f4ce 0x00007ffb7ae70000 + 41088206


Binary Images:
0x00007ffb7ae70000 - 0x00007ffb7e1b9000 +CompXxxReport.UWP unknown  <d01255703a1f44bbbbc1d6cb327fc12c-1> C:\Projets\GitTablet - VS17\car-3.0-tablet\CompXxxReport.UWP\obj\x64\Release\ilc\intermediate\Native\CompXxxReport.UWP.pdb
0x00007ffb841e0000 - 0x00007ffb84975000 +SharedLibrary unknown  <824b2b5bacbe41bbbdc3422e6090614b-1> f:\ddSetup\SD\2\setup\msis\x86ret\enu\netfx_ProjectNamd64\TestILC\ExternalFiles\SharedAssemblyPath\ret.intermediate\Native\SharedLibrary.pdb

=> Why don't we get related method names in our project?

System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw

TaskExceptionHolder_UnhandledException

Exception Stack:

unknown location
CompXxxReport.UWP!<BaseAddress>+0x28dd51d
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
SharedLibrary!<BaseAddress>+0x4511ee
SharedLibrary!<BaseAddress>+0x451168
SharedLibrary!<BaseAddress>+0x699af7
CompXxxReport.UWP!<BaseAddress>+0x28ff980
CompXxxReport.UWP!<BaseAddress>+0x28ffa4a

Raw Log:

Incident Identifier: 2c241fee-8cec-4d2e-95c8-8be80000fdfd
CrashReporter Key:   X0dgXzbEV5Ge89Jwey0pDrGWBFaOvpaepsgklxxjIlE=
Hardware Model:      Latitude E6320
Identifier:      CompXxxReport.UWP
Version:         1.3.0.0

Date/Time:       2017-11-05T20:27:28.604Z
OS Version:      Windows 10.0.14393.1770
Report Version:  104

Exception Type:  System.AggregateException
Crashed Thread:  3

Application Specific Information:
TaskExceptionHolder_UnhandledException

Exception Stack:
unknown location
CompXxxReport.UWP!<BaseAddress>+0x28dd51d
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
SharedLibrary!<BaseAddress>+0x4511ee
SharedLibrary!<BaseAddress>+0x451168
SharedLibrary!<BaseAddress>+0x699af7
CompXxxReport.UWP!<BaseAddress>+0x28ff980
CompXxxReport.UWP!<BaseAddress>+0x28ffa4a

Thread 3 Crashed:
0   CompXxxReport.UWP          0x00007ff830a1d51d 0x00007ff82e140000 + 42849565
1   SharedLibrary              0x00007ff83d2712b1 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() in f:\dd\ndp\fxcore\CoreRT\src\System.Private.CoreLib\src\System\Runtime\ExceptionServices\ExceptionDispatchInfo.cs at 61:13
2   SharedLibrary              0x00007ff83d2711ee System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess($Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Runtime\CompilerServices\TaskAwaiter.cs at 187:25
3   SharedLibrary              0x00007ff83d271168 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification($Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Runtime\CompilerServices\TaskAwaiter.cs at 156:42
4   SharedLibrary              0x00007ff83d4b9af7 System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd($Task task) in f:\dd\ndp\fxcore\CoreRT\src\System.Private.Threading\src\System\Runtime\CompilerServices\TaskAwaiter.cs at 128:17
5   CompXxxReport.UWP          0x00007ff830a3f980 0x00007ff82e140000 + 42989952
6   CompXxxReport.UWP          0x00007ff830a3fa4a 0x00007ff82e140000 + 42990154


Binary Images:
0x00007ff82e140000 - 0x00007ff831489000 +CompXxxReport.UWP unknown  <d01255703a1f44bbbbc1d6cb327fc12c-1> C:\Projets\GitTablet - VS17\car-3.0-tablet\CompXxxReport.UWP\obj\x64\Release\ilc\intermediate\Native\CompXxxReport.UWP.pdb
0x00007ff83ce20000 - 0x00007ff83d5b5000 +SharedLibrary unknown  <824b2b5bacbe41bbbdc3422e6090614b-1> f:\ddSetup\SD\2\setup\msis\x86ret\enu\netfx_ProjectNamd64\TestILC\ExternalFiles\SharedAssemblyPath\ret.intermediate\Native\SharedLibrary.pdb

=> Why don't we get related method names in our project?


My client is agree to add Events logging with HokceyApp to collect more information and to fix the latest bugs: but is it the right solution? Are there other possibilites? Could it be more interesting to use App Center, now that now works with UWP apps?