Bug 59225 - Error on archiving xamarine android
Summary: Error on archiving xamarine android
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Android (show other bugs)
Version: unspecified
Hardware: Other Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-09-05 11:38 UTC by ahmdmk
Modified: 2017-10-06 17:58 UTC (History)
4 users (show)

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


Attachments

Description ahmdmk 2017-09-05 11:38:44 UTC
Mono.Linker.MarkException: Error processing method: 'TNativeView Xamarin.Forms.Platform.Android.ViewRenderer'2::get_Control()' in assembly: 'Xamarin.Forms.Platform.Android.dll' ---> System.ArgumentNullException: Value cannot be null.
Parameter name: instruction
   at Mono.Cecil.Cil.InstructionOffset..ctor(Instruction instruction)
   at Mono.Cecil.Cil.CodeReader.ReadScope(ScopeDebugInformation scope)
   at Mono.Cecil.Cil.CodeReader.ReadScopes(Collection'1 scopes)
   at Mono.Cecil.Cil.CodeReader.ReadScope(ScopeDebugInformation scope)
   at Mono.Cecil.Cil.CodeReader.ReadScopes(Collection'1 scopes)
   at Mono.Cecil.Cil.CodeReader.ReadScope(ScopeDebugInformation scope)
   at Mono.Cecil.Cil.CodeReader.ReadDebugInfo()
   at Mono.Cecil.Cil.CodeReader.ReadMethodBody()
   at Mono.Cecil.Cil.CodeReader.ReadMethodBody(MethodDefinition method)
   at Mono.Cecil.MethodDefinition.<>c.<get_Body>b__41_0(MethodDefinition method, MetadataReader reader)
   at Mono.Cecil.ModuleDefinition.Read[TItem,TRet](TRet& variable, TItem item, Func'3 read)
   at Mono.Cecil.MethodDefinition.get_Body()
   at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
   at Mono.Linker.Steps.MarkStep.ProcessQueue()
   --- End of inner exception stack trace ---
   at Mono.Linker.Steps.MarkStep.ProcessQueue()
   at Mono.Linker.Steps.MarkStep.Process()
   at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
   at Mono.Linker.Pipeline.Process(LinkContext context)
   at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
   at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
   at Xamarin.Android.Tasks.LinkAssemblies.Execute()
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
Comment 1 Jon Douglas [MSFT] 2017-09-05 15:53:25 UTC
Moving this bug to Forms for more visibility. In the past this is typically an issue with an old version of Xamarin.Forms. The Forms team will follow up with you shortly. Thanks for the report!
Comment 2 Paul DiPietro [MSFT] 2017-09-05 16:22:05 UTC
Can we please get more information about what your app is doing that causes the error, as well as a reproduction if possible? This issue may be closed after 30 days without the requested information. Thanks!
Comment 3 ahmdmk 2017-09-05 20:00:12 UTC
Its a small app with a listview control and a contact page with phone call optionand email and facebook link. Debug build is fine, release build is fine but when i archive the android project, it gives the above error.
Comment 4 ahmdmk 2017-09-07 10:25:09 UTC
Its a small app with a listview control and a contact page with phone call optionand email and facebook link. Debug build is fine, release build is fine but when i archive the android project, it gives the above error.
Comment 5 Paul DiPietro [MSFT] 2017-09-07 13:42:07 UTC
Can you please upload a reproduction if you're able to reliably reproduce the issue, if the following does not help:

- Verify that your solution projects (e.g. PCL and platforms) are all running the same version of Forms
- Test using the latest stable or prerelease version of Forms
- Run a full clean and rebuild of the solution as well as manually deleting bin/obj folders within the project directories
Comment 6 ahmdmk 2017-09-08 10:16:34 UTC
I tried the above, but same error. pls let me know how can i upload reproduction.
Comment 7 Paul DiPietro [MSFT] 2017-09-08 13:21:42 UTC
You can create a project as you normally would, where following whatever steps provided reproduce the error. Make sure that the solution is cleaned and the package/bin/obj folders are removed, then you can zip the solution folder and attach it to this report.
Comment 8 ahmdmk 2017-09-08 15:53:38 UTC
Hi,

Based on ur email instructions, created  reproduced error project. as the file is big, i stored in this storage. pls download.
https://www.sendspace.com/file/ctkt7b


thanks and regards
Kunhamad
Comment 9 ahmdmk 2017-09-08 15:56:01 UTC
Hi,

Based on ur email instructions, created  reproduced error project. as the file is big, i stored in this storage. pls download.
https://www.sendspace.com/file/ctkt7b


thanks and regards
Kunhamad
Comment 10 ahmdmk 2017-09-08 16:17:44 UTC
Sorry ignore the last 2 comments and please follow this link to download my project -

https://drive.google.com/file/d/0B96BDsVVSD9dWS12bjRSYlo0ZEE/view?usp=sharing
Comment 11 ahmdmk 2017-09-11 06:52:03 UTC
Pls help solving my problem, i am stuck up in a project
Comment 12 Paul DiPietro [MSFT] 2017-09-11 17:20:10 UTC
I appear able to archive the provided reproduction project on Visual Studio 15.3.3. Can you please provide your environment info from Help -> About Microsoft Visual Studio and verify that everything is up to date?
Comment 13 ahmdmk 2017-09-11 17:30:14 UTC
Microsoft Visual Studio Professional 2017 Preview
Version 15.4.0 Preview 1.0
VisualStudio.15.Preview/15.4.0-pre.1.0+26823.1
Microsoft .NET Framework
Version 4.6.01055

Installed Version: Professional

Visual Basic 2017   00369-60000-00001-AA649
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA649
Microsoft Visual C# 2017

Visual F# 4.1   00369-60000-00001-AA649
Microsoft Visual F# 4.1

Application Insights Tools for Visual Studio Package   8.8.00712.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.30726.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   1.0
Provides languages services for ASP.NET Core Razor.

ASP.NET Template Engine 2017   15.0.30726.0
ASP.NET Template Engine 2017

ASP.NET Web Frameworks and Tools 2017   5.2.50601.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30728.0
Azure App Service Tools v3.0.0

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

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

JavaScript UWP Project System   2.0
JavaScript UWP Project System

Merq   1.1.17-rc (cba4571)
Command Bus, Event Stream and Async Manager for Visual Studio extensions.

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50719.1

Microsoft Continuous Delivery Tools for Visual Studio   0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   4.7.4-pre (c2d89eb)
Support for debugging Mono processes with Visual Studio.

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

SQL Server Data Tools   15.1.61707.200
Microsoft SQL Server Data Tools

TypeScript   2.3.5.0
TypeScript tools for Visual Studio

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Universal Windows Apps   15.0.26823.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

VisualStudio.IoT   1.0
Package with IoT components for Visual Studio

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

WapProjPackage   1.0
WapProj Package Project System

Xamarin   4.7.0.827 (ddd8750)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK   7.5.0.3 (3e66e8e)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   10.14.0.4 (c70e3b5)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
Comment 14 Paul DiPietro [MSFT] 2017-09-11 18:41:24 UTC
This is likely because you're on the preview build if I had to guess. You might want to try using the stable 15.3.3 release.
Comment 15 Paul DiPietro [MSFT] 2017-10-06 17:58:36 UTC
Marking as resolved per the above comment and that it should presumably no longer be an issue.

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