当HockeyApp在应用程序启动时提示并按要求发送/删除崩溃日志时,按下后退按钮会崩溃。 HockeyApp内部发生NullReferenceException
;堆栈跟踪已附加。
平台是Windows Phone 8.1 RT和HockeyApp版本是2.2.2
如何在我的应用中修复此问题?
堆栈跟踪:
{
"contact": null,
"description": null,
"log": "Package: BuggyApp\nVersion: 1.1.0.0\nOS: Windows Phone\nWindows Phone: 8.1\nManufacturer: Microsoft\nModel: Virtual\nDate: 2015-09-07T10:29:41.6261178Z\nProduct-ID: 00000000-0000-0000-0000-000000000000
System.NullReferenceException: Object reference not set to an instance of an object.
at HockeyApp.CrashHandler.<AskUserForAgreementAsync>d__c.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at HockeyApp.CrashHandler.<HandleCrashesAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at HockeyApp.HockeyClientExtensionsWinUniversal.<SendCrashesAsync>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()
at BuggyApp.App.<OnLaunched>d__e.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<ThrowAsync>b__3(Object state)
at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore()",
"sdk": "HockeySDKWP81",
"sdk_version": "2.2.2",
"userID": null
}
答案 0 :(得分:3)
是bug in the HockeyApp sdk。两个月前用this commit修复了它。但最新版本的sdk(2.2.2)建于8天前。
所以你应该用SendCrashesAsync
包装try { //... } catch (NullReferenceException) { }
调用并等待新版本的sdk。