Bug 45212 - Android app crashes on start when runs on x86
Summary: Android app crashes on start when runs on x86
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 7.0 (C8)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
: 49667 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-10-08 11:32 UTC by Nikolai Doronin
Modified: 2017-08-15 15:32 UTC (History)
10 users (show)

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


Attachments
The sample project and logs from Xamarin 4.2.0.703 (affected) and Xamarin 4.1.2.18 (not affected). (38.57 KB, application/x-zip-compressed)
2016-10-08 11:32 UTC, Nikolai Doronin
Details

Description Nikolai Doronin 2016-10-08 11:32:56 UTC
Created attachment 17944 [details]
The sample project and logs from Xamarin 4.2.0.703 (affected) and Xamarin 4.1.2.18 (not affected).

I've faced with a strange problem with the latest stable Xamarin for Windows: all my apps crash on start everytime (and I'm getting "Could not connect to debugger" message). I suppose it might regard to Bug 36514 and Bug 36179.
There is no difference if "Shared runtime" turned on or off.
I've attached a sample project (created from a template in Xamarin Studio), build logs, and device logs.

My environment:
- AMD Phenom 8650
- Windows 8.1 (Build 9600)
- Xamarin Studio 6.1.1 (build 15)
- Xamarin 4.2.0.703
- Xamarin.Android 7.0.1.3

I rolled back to Xamarin 4.1.2.18 (Xamarin.Android 6.1.2.21) and the problem is gone, so it looks like regression in Xamarin.
Crash appears only on Genymotion emulator. The application works on a ARMv7 device without any problem.
Comment 1 Luca 2016-10-19 07:02:51 UTC
I have the same problem with Phenom X4 processor.

Here there is a discussion in xamarin forums:

https://forums.xamarin.com/discussion/79075/aot-module-mscorlib-dll-so-not-found-dlopen-failed

and the solution we have found is the same: downgrade to last version of cycle 7.
Comment 2 Dmitry 2016-10-29 09:04:57 UTC
I also have the same problem with my AMD proc both on Win8.1 Pro and Win10 Pro. I tried to debug my apps on VS Android Emulator (4/5) and on Genymotion (4/5/6), but they always crashed with log 'mscorlib.dll.so not found'... My apps runs without problems on real devices with ARM procs.
Downgrade to Cycle 7 solved this problem.
Comment 3 Ammar Mheir 2016-11-09 23:23:04 UTC
Setting this to confirmed as I was able to replicate:

##Overview

The application is able to install successfully on the Android emulator but will instantly stop when application attempts to start debugging. Will get the same error as Bug owner "Could not connect to the debugger." Current workaround was to downgrade to the latest stable release of Xamarin Cycle 7.


##Troubleshooting steps attempted

1) Made sure "Migrate to a physical computer with a different processor version" is checked in Hyper-V emulator settings.
2). Tried turning off "Fast Deployment" and/or "Shared Runtime"
2) Re-installed/Updated VS Emulator for Android to the latest release
3) Updated Android SDK Tools and Platform-tools to the latest release and left Android SDK Build-tools version 23.0.3 installed.
4) Created new Android project from template setting target SDK to Marshmallow 6.0 and minimum SDK to KitKat 4.4


##Version & Hardware Information

Processor: AMD Athlon II 245
OS: Windows 10 Anniversary 64-bit

Microsoft Visual Studio Enterprise 2015
Version 14.0.25431.01 Update 3
Microsoft .NET Framework
Version 4.6.01586

Xamarin   4.2.0.719 (15694b9)
Xamarin.Android   7.0.1.6 (5a02b03)
Xamarin.iOS   10.2.0.4 (b638977)

##Additional information

Acquired are some snapshots of the error messages related to this error in both Debug and Release Mode: http://imgur.com/a/IuhNf 
Although error in release mode is different, it may or may not be related to this issue. Release mode resulted in the same error even though linker was turned off. However errors in both build modes has been resolved when downgrading to Cycle 7.
Comment 4 Dmitry 2016-12-26 18:53:17 UTC
Any news about solving this problem or terms?
Comment 5 Luca 2017-01-09 11:11:57 UTC
Any news?!?
Comment 6 Marcel 2017-02-09 13:45:09 UTC
Any news about this?

I thought 'this is microsoft, this is relialable', but seems like this is not true.
Comment 7 Jon Douglas [MSFT] 2017-07-05 18:50:47 UTC
*** Bug 49667 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.