Bug 48842 - Entire App Locks up after Running Idle on Android Devices targeting Android 6
Summary: Entire App Locks up after Running Idle on Android Devices targeting Android 6
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 7.0 (C8)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
Depends on:
Reported: 2016-12-02 21:06 UTC by James
Modified: 2016-12-29 17:46 UTC (History)
2 users (show)

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

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:

Description James 2016-12-02 21:06:03 UTC
When Customer app is running on an Android 6 Marshmallow device, after a period of time ranging from 20 minutes to 20+ hours, our application will freeze up. 

Typically when an app freezes up after a few seconds the Android Operating System will prompt the user with a message saying “App x is not responding, would you like to close it?.” This message never happens. Our app will remain in a frozen and unusable state. If we try tapping on the screen a few times we will eventually see the message I mentioned. 

We do not see this lockup issue happen on any devices running Android 5 or 4.4.

As a note, this issue does NOT occur with Xamarin 3.9 and run that APK on the same Android 6 device, the lockup/freeze issue will not occur. This suggests it is a Marshmellow specific API issue in later updates. Working on getting the logs from Android logcat.

See Forum Post here for further details:

Comment 2 Justin Wojciechowski 2016-12-28 20:29:33 UTC
I just wanted to update this bug report as I found the issue and have a resolution. If you refer to the forum post I posted the issue and answer. Essentially there was a timer firing every 2 seconds that did a lock(obj) on a dumby object, and within that lock doing a garbage collection. When combined with Xamarin 4+ (exact versions listed in forum post) and Android 6, the lockup would occur. Other combinations would not.

Resolution was to remove the lock and garbage collection as they weren't needed. It was some older code that was ported poorly.
Comment 3 James 2016-12-29 17:46:24 UTC
Thanks for the update. It looks like this is old code not liking newer versions of Xamarin. I am going to resolve this one as it appears everything is good.