Crash only when disconnecting from USB debugging with device - info/guidance

New to Xamarin/VS and just wanted to get more information on why a Forms app crashes only when running on device outside of a (connected USB) debugging session. In other words, trying to run the app on the device just like "any other app installed" (not debugging, nor connected to any other device)

To reproduce:

  • build an Xamarin Forms app
  • use device (I have a Nexus 4) for debugging

    • In my case the app uses Maps which requires Google Play Services so that effectively rules out the VS emulator (for sanity's sake :smile: - I'm aware of the workarounds to this with Gapps, just didn't want to create even more problems from an "unofficial" non-Google source). In any case this seems irrelevant(?)
  • Debugging goes without a hitch - all good! :+1:

  • Disconnect from USB debug session
  • Run the app -> crashes

There is something on Stack Overflow about some settings (workaround), so perhaps some resource so we know what is "actually going on" and not just toggle things without really understanding the "whys"?

As additional info, running a native debug log on the device shows these lines:

 14225 14225 F libc    : Fatal signal 6 (SIGABRT), code -6 in tid 14225 (foo.MapTest)
   185   185 I DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
   185   185 I DEBUG   : Build fingerprint: 'google/occam/mako:5.1.1/LMY48T/2237560:user/release-keys'
   185   185 I DEBUG   : Revision: '11'
   185   185 I DEBUG   : ABI: 'arm'
   185   185 I DEBUG   : pid: 14225, tid: 14225, name: foo.MapTest  >>> com.foo.MapTest <<<
   185   185 I DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
   185   185 I DEBUG   : Abort message: '* Assertion at /Users/builder/data/lanes/3511/501e63ce/source/mono/mono/mini/unwind.c:385, condition `read16 (p) == (guint32)(op->when - loc)' not met

Thank you!

Best Answer

  • EdChavez.1786EdChavez.1786 US
    Accepted Answer

    Disregard the above. No explanation as to how it seemingly fixed itself, but it did. My best guess:

    1. I had "cleared app data" on my phone sometime before the issues started popping
    2. After experiencing the above, I removed/uninstalled the app completely

    After a new debugging session (which re-installs the app), back to normal.

Answers

  • EdChavez.1786EdChavez.1786 USMember
    Accepted Answer

    Disregard the above. No explanation as to how it seemingly fixed itself, but it did. My best guess:

    1. I had "cleared app data" on my phone sometime before the issues started popping
    2. After experiencing the above, I removed/uninstalled the app completely

    After a new debugging session (which re-installs the app), back to normal.

Sign In or Register to comment.