Bug 43075 - App crashes while debugging, same app runs fun in debug build when not attached and debugging
Summary: App crashes while debugging, same app runs fun in debug build when not attach...
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Debugger ()
Version: 7.0 (C8)
Hardware: Macintosh Mac OS
: High major
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-08-05 03:07 UTC by David Hathaway
Modified: 2016-10-04 01:08 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Build Info (2.05 KB, text/plain)
2016-08-05 03:07 UTC, David Hathaway
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description David Hathaway 2016-08-05 03:07:01 UTC
Created attachment 16911 [details]
Build Info

While debugging application, app successfully runs for a little while, and then crashes.  logcat shows the error "android.os.DeadObjectException"

Full logcat output following crash here: https://gist.github.com/dwhathaway/5365a4f4844f9d74ce00186ed0de858f

Steps to reproduce

1. Download "EMDK for Xamarin" component from component store (https://components.xamarin.com/view/emdk-component)
2. Extract package, and browse to Samples folder.  Launch "BarcodeSample1" app in Xamarin Studio
3. Start the app debugging on Zebra TC75 device
4. Once debugging, choose "SOFT" on the "Select Trigger" spinner, and then check the box next to "Continuous"
5. Click "Start" to begin scanner.  Point at a barcode, and let the device repeatedly scan

Expected Result

Device continues to scan barcode repeatedly, indefinitely, and outputs scanned barcode to screen

Actual result

Device scans barcodes for 5 - 30 seconds (varies depending on run), and then app crashes (see link to log data in Gist above)

Next:

After debugger is disconnected, locate BarcodeSample1 in app drawer, and launch it.  Repeat step 5 from above

Expected Result: 

Device continues to scan barcode repeatedly, indefinitely, and outputs scanned barcode to screen

Actual Result

Device continues to scan barcode repeatedly, indefinitely, and outputs scanned barcode to screen
Comment 1 David Hathaway 2016-08-05 03:14:43 UTC
Symptoms are similar to bug 38500
Comment 2 David Hathaway 2016-08-05 03:48:00 UTC
Downgraded Xamarin.Android to 5.1.9.0, and the issue doesn't happen.  This is a regression in the newer 6.x releases as it occurs in both 6.0.4.0 and 6.1.2.21, but not earlier 5.x releases.

It's also worth nothing that the issue is progressively worse from 6.0.4.0 to 6.1.2.21.  In 6.0.4.0, the app runs for about a minute before crashing.  In 6.1.2.21, the app crashes in < 30 seconds, and usually less than 10 seconds.
Comment 3 Jonathan Pryor 2016-09-22 16:59:32 UTC
@David: Did anything get printed *before* the first line of output in the gist?

> 08-04 17:34:23.152: I/ActivityManager(812): Process Symbol.XamarinEMDK.BarcodeSample1 (pid 8136) has died.

More logged output would be nice...
Comment 4 Jonathan Pryor 2016-09-23 20:54:47 UTC
More log output, courtesy David:

https://gist.github.com/dwhathaway/b4a6c20b77c33e317c98f26432071300

Interesting lines:

> 08-05 03:24:59.913: I/ActivityManager(812): Process Symbol.XamarinEMDK.BarcodeSample1 (pid 10308) has died.```
...
> 08-05 03:24:59.963: D/Zygote(166): Process 10308 terminated by signal (5)```

The process is dying because of signal (5), which is SIGTRAP.

Last message before the crash (not sure if relevant):

> 08-05 03:24:42.474: D/Mono(10308): GC_MINOR: (Nursery full) pause 22.92ms, total 22.95ms, bridge 0.03ms promoted 1136K major 1136K los 52K
Comment 5 David Hathaway 2016-10-04 01:08:50 UTC
Retested this issue, and it appears to be fixed with Cycle 8 (build 7.0.0.18 of Xamarin.Android).  Closing the bug report.