This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 37019 - Exception while loading assemblies: Xamarin.Android.XamarinAndroidException: error XA0009
Summary: Exception while loading assemblies: Xamarin.Android.XamarinAndroidException: ...
Status: VERIFIED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: unspecified
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: 6.1 (C7)
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2015-12-15 14:37 UTC by Thomas Van den Bossche
Modified: 2016-10-31 14:31 UTC (History)
6 users (show)

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


Attachments
$HOME/Library/Logs/XamarinStudio-5.0/Ide.log (267.11 KB, text/plain)
2015-12-15 14:38 UTC, Thomas Van den Bossche
Details

Description Thomas Van den Bossche 2015-12-15 14:37:02 UTC
I can't consistenly reproduce this but it can occurs several times a day, mostly after deploying a couple of times to a device via Xamarin Studio.

The compilation stops with this error:
"/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Exception while loading assemblies: Xamarin.Android.XamarinAndroidException: error XA0009: Error while loading assembly: /Library/Frameworks/Mono.framework/External/xbuild-frameworks/MonoAndroid/v6.0/Mono.Android.dll ---> System.NullReferenceException: Object reference not set to an instance of an object
  at Xamarin.Android.Tuner.DirectoryAssemblyResolver.ReadAssembly (System.String file) <0x5ffa428 + 0x00127> in <filename unknown>:0 
  at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Load (System.String fileName) <0x5ffa2b0 + 0x00097> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Xamarin.Android.Diagnostic.Error (Int32 code, System.Exception innerException, System.String message, System.Object[] args) <0x7be1e10 + 0x0004f> in <filename unknown>:0 
  at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Load (System.String fileName) <0x5ffa2b0 + 0x00107> in <filename unknown>:0 
  at Xamarin.Android.Tasks.ResolveAssemblies.Execute () <0x62e1180 + 0x003c7> in <filename unknown>:0  (MH.MobileApps.PaperApp.Android)"

As attachment I've added the log from /Library/Logs/XamarinStudio-5.0

Details about the setup:
Xamarin Studio
Version 5.10.1 (build 6)
Installation UUID: c8d9d174-a2c8-4101-870c-d07ece81c653
Runtime:
	Mono 4.2.1 (explicit/6dd2d0d)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402010102

Xamarin.Profiler
Version: 0.24.0.0
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Apple Developer Tools
Xcode 7.2 (9548)
Build 7C68

Xamarin.iOS
Version: 9.4.0.0 (Business Edition)
Hash: 7322991
Branch: master
Build date: 2015-12-08 16:20:29-0500

Xamarin.Android
Version: 6.0.0.34 (Business Edition)
Android SDK: /Users/thomasvdb/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.0

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Xamarin Android Player
Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

Xamarin.Mac
Version: 2.4.0.109 (Starter Edition)

Build Information
Release ID: 510010006
Git revision: 0b60eecdb531933734519c13257d16a780274aab
Build date: 2015-12-04 20:28:20-05
Xamarin addins: 9876fd7c9837977178411ec7375b4352c0a0d6af
Build lane: monodevelop-lion-cycle6-baseline

Operating System
Mac OS X 10.10.5
Darwin 14.5.0 Darwin Kernel Version 14.5.0
    Tue Sep  1 21:23:09 PDT 2015
    root:xnu-2782.50.1~1/RELEASE_X86_64 x86_64
Comment 1 Thomas Van den Bossche 2015-12-15 14:38:09 UTC
Created attachment 14298 [details]
$HOME/Library/Logs/XamarinStudio-5.0/Ide.log
Comment 2 Jonathan Pryor 2015-12-17 16:59:48 UTC
Fixed in monodroid/d7042af8.
Comment 3 Thomas Van den Bossche 2015-12-17 18:04:58 UTC
Will this get fixed in a next Xamarin update?
Comment 4 Abhishek 2016-05-18 15:17:05 UTC
I have checked this issue with latest C7 build:
xamarin.android-6.1.0-56_eabab320c9920b69fe55678a471887674bda7300. Now I am successfully able to deploy the application. Here is the screencast:
http://www.screencast.com/t/7M47mlIPJ1BK

Hence closing this issue. Please feel free to reopen this issue if issue occur again.

Thanks!
Comment 5 Claudio Redi 2016-09-28 20:47:56 UTC
This still happens to me after a couple of compilations run

These are my env details

Xamarin Studio Community
Version 6.1.1 (build 15)
Installation UUID: 008d64d0-19a0-4009-b988-2e1c8160b6de
Runtime:
	Mono 4.6.1 (mono-4.6.0-branch-c8sr0/abb06f1) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 406010003

NuGet
Version: 3.4.3.0

Xamarin.Profiler
Not Installed

Xamarin.Android
Version: 7.0.1.2 (Xamarin Studio Community)
Android SDK: /Users/claudioredi/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		6.0   (API level 23)
		7.0   (API level 24)

SDK Tools Version: 25.2.2
SDK Platform Tools Version: 24.0.3
SDK Build Tools Version: 23.0.1

Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Xamarin Android Player
Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

Apple Developer Tools
Xcode 8.0 (11246)
Build 8A218a

Xamarin.iOS
Version: 10.0.1.8 (Xamarin Studio Community)
Hash: 3983064
Branch: cycle8-sr0-xi
Build date: 2016-09-23 15:34:54-0400

Xamarin.Mac
Version: 2.10.0.103 (Xamarin Studio Community)

Build Information
Release ID: 601010015
Git revision: fa52f02641726146e2589ed86ec4097fbe101888
Build date: 2016-09-22 08:03:02-04
Xamarin addins: 75d65712af93d54dc39ae4c42b21dfa574859fd6
Build lane: monodevelop-lion-cycle8-sr0

Operating System
Mac OS X 10.12.0
Darwin Claudios-MacBook-Pro.local 16.0.0 Darwin Kernel Version 16.0.0
    Mon Aug 29 17:56:20 PDT 2016
    root:xnu-3789.1.32~3/RELEASE_X86_64 x86_64
Comment 6 Jim Borden 2016-09-29 02:14:52 UTC
Same for me, same details as the above poster
Comment 7 Adam Melkus 2016-10-31 07:30:57 UTC
I am also getting this error, it forces me to restart Xamarin Studio several times a day.

Xamarin Studio 6.1.1 (build 17)
Comment 8 Claudio Redi 2016-10-31 14:31:46 UTC
This is the most annoying problem of all since I have to restart Xamarin Studio no less than 30 times a day. I hope you're able to recreate it so we can solve it ASAP :)

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