Bug 47562 - v7.1.0.2 The "LinkAssemblies" task failed unexpectedly / crash in release mode
Summary: v7.1.0.2 The "LinkAssemblies" task failed unexpectedly / crash in release mode
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: Linker ()
Version: 7.1 (C9)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Radek Doulik
URL:
Depends on:
Blocks:
 
Reported: 2016-11-21 10:41 UTC by softlion
Modified: 2016-11-22 10:59 UTC (History)
2 users (show)

Tags:
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:
Status:
RESOLVED FIXED

Description softlion 2016-11-21 10:41:48 UTC
Hi,
linker crashes when compiling an app for Android in Release mode.
Works fine in debug mode.

Linking set to SDK only. Same problem when set to "None".
Multidex enabled or disabled same pb.
Arch: v7a

Xamarin Android v7.1.0.2


3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018: The "LinkAssemblies" task failed unexpectedly.
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018: System.ArgumentNullException: Value cannot be null.
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018: Parameter name: variable
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Cecil.Cil.VariableIndex..ctor(VariableDefinition variable)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Cecil.Cil.CodeReader.ReadScope(ScopeDebugInformation scope)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Cecil.Cil.CodeReader.ReadScopes(Collection`1 scopes)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Cecil.Cil.CodeReader.ReadScope(ScopeDebugInformation scope)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Cecil.Cil.CodeReader.ReadDebugInfo()
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Cecil.Cil.CodeReader.ReadMethodBody()
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Cecil.Cil.CodeReader.ReadMethodBody(MethodDefinition method)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Cecil.MetadataReader.ReadMethodBody(MethodDefinition method)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Cecil.MethodDefinition.<get_Body>m__1(MethodDefinition method, MetadataReader reader)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TRet& variable, TItem item, Func`3 read)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Cecil.MethodDefinition.get_Body()
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.ProcessQueue()
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.Process()
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Mono.Linker.Pipeline.Process(LinkContext context)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Xamarin.Android.Tasks.LinkAssemblies.Execute()
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
3>C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1582,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
Comment 1 softlion 2016-11-22 10:58:53 UTC
Fixed by activating Multidex and replacing the content of Android-sdk/tools/proguard folder with the latest version from sourceforge.net