Bug 39514 - [Forms] Forms Android apps crash when deployed to API 15 ICS in Debug config
Summary: [Forms] Forms Android apps crash when deployed to API 15 ICS in Debug config
Status: RESOLVED NORESPONSE
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.1.0
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: E.Z. Hart [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2016-03-10 14:02 UTC by Al Clark [MSFT]
Modified: 2017-06-20 10:31 UTC (History)
10 users (show)

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


Attachments
AVD properties (17.36 KB, image/png)
2016-03-11 15:47 UTC, Al Clark [MSFT]
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 NORESPONSE

Description Al Clark [MSFT] 2016-03-10 14:02:03 UTC
--- Overview ---

Forms apps crash on device when deployed to Android API 15.  Native Xamarin.Android apps run perfectly fine.  Only tested on Google AVD emulator - unable to source a physical device.

I have tested on latest Forms release 2.1.0.6526.  Customer tested on Forms 1.5.1.6471 and 2.0.0.6482.

Not much useful information (if any at all) is included in the stack trace.


--- Steps to Reproduce ---

1. Create a Cross-Platform Forms app for at least Android.
2. Open Google AVD running API 15.
3. Run project.


--- Expected Result ---

App should load and run as expected.


--- Actual Result ---

The app runs and immediately crashes.
Using Arm emulator the IDE displays "Unable to connect to Debugger"
Using x86 emulator the logcat produces stack trace (below).


--- Other Information ---

Customer's version:

Microsoft Visual Studio Professional 2015
Version 14.0.24720.00 Update 1
Microsoft .NET Framework
Version 4.6.01038

Installed Version: Professional

Visual Basic 2015   00322-50050-87985-AA118
Microsoft Visual Basic 2015

Visual C# 2015   00322-50050-87985-AA118
Microsoft Visual C# 2015

Visual C++ 2015   00322-50050-87985-AA118
Microsoft Visual C++ 2015

Windows Phone SDK 8.0 - ENU   00322-50050-87985-AA118
Windows Phone SDK 8.0 - ENU

ASP.NET and Web Tools 2015.1 (Beta8)   14.1.11106.0
ASP.NET and Web Tools 2015.1 (Beta8)

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.30624.0
For additional information, visit http://www.asp.net/

Common Azure Tools   1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JetBrains ReSharper Ultimate 10.0.2   Build 104.0.20151218.120627
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2016 JetBrains, Inc.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

NuGet Package Manager   3.3.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

SQL Server Data Tools   14.0.50730.0
Microsoft SQL Server Data Tools

TypeScript   1.7.6.0
TypeScript for Microsoft Visual Studio

VisualHG   1.1.7
Mercurial source contol provider.

Xamarin   4.0.1.96 (dcea9c1)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android   6.0.1.10 (e98e962)
Visual Studio plugin to enable development for Xamarin.Android.

Xamarin.iOS   9.4.1.24 (47eb74b)
Visual Studio extension to enable development for Xamarin.iOS.


Customer's stack trace:

E/mono-rt ( 1753): Attempting native Android stacktrace:
E/mono-rt ( 1753): 
E/mono-rt ( 1753): 	Could not unwind with `libunwind.so`: Cannot load library: load_library[1091]: Library '/data/data/App2.Droid/lib/libunwind.so' not found
E/mono-rt ( 1753): 	Could not unwind with `libcorkscrew.so`: Cannot load library: load_library[1091]: Library '/data/data/App2.Droid/lib/libcorkscrew.so' not found
E/mono-rt ( 1753): 
E/mono-rt ( 1753): 	No options left to get a native stacktrace :-(
E/mono-rt ( 1753): 
E/mono-rt ( 1753): =================================================================
E/mono-rt ( 1753): Got a SIGSEGV while executing native code. This usually indicates
E/mono-rt ( 1753): a fatal error in the mono runtime or one of the native libraries 
E/mono-rt ( 1753): used by your application.
E/mono-rt ( 1753): =================================================================
E/mono-rt ( 1753): 
F/libc    ( 1753): Fatal signal 11 (SIGSEGV) at 0x00000000 (code=128)
Comment 4 Al Clark [MSFT] 2016-03-11 15:47:04 UTC
Created attachment 15376 [details]
AVD properties

The customer has since shared the following information (along with attached screencap):

I'm having the issues on a x86 emulator. I attached a screenshot of the
AVD configuration.
I also tried it on a ARM emulator and the apps seems to start. But I'm
having different issues on the ARM emulator. I.e. the app hangs (no
crash) when navigating back to a previous screen.

In our own app the crash seems to happen on a call to the Raygun4Net
library. I debugged this library and it seems the app crashes when
ThreadPool.QueueUserWorkItem(state => { }); is called.

I managed to reproduce this with the following minimal MainActivity:
public class MainActivity : FormsApplicationActivity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);

// App crashes here
ThreadPool.QueueUserWorkItem(state => {});

Forms.Init(this, bundle);
LoadApplication(new App());
}
}

I only tried it with a FormsApplicationActivity, so maybe this isn't
related to Forms.
Comment 8 Chris King 2017-06-19 17:22:39 UTC
Assigned to you as you were last to request additional info.
Comment 9 Rui Marinho 2017-06-20 10:31:56 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!