Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HockeyApp crashes on back button press on Windows Phone

HockeyApp crashes on pressing back button when it prompts on app launch and asks for sending/deleting crash logs. A NullReferenceException occurs inside HockeyApp; the stacktrace is attached.

The platform is Windows Phone 8.1 RT and HockeyApp version is 2.2.2

How can I fix this issue in my app?

Stacktrace:

{
    "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
}
like image 391
nimbudew Avatar asked Dec 09 '25 09:12

nimbudew


1 Answers

It is bug in the HockeyApp sdk. It was fixed two month ago with this commit. But the lastest version of the sdk (2.2.2) built 8 moth ago.

So you should wrap SendCrashesAsync invocation with try { //... } catch (NullReferenceException) { } and wait for new build of the sdk.

like image 137
RavingDev Avatar answered Dec 12 '25 08:12

RavingDev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!