Bug 58784 - Null reference exception prevent building IPA file
Summary: Null reference exception prevent building IPA file
Status: RESOLVED DUPLICATE of bug 58789
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: XI 10.12 (d15-3)
Hardware: PC Windows
: --- normal
Target Milestone: Future Cycle (TBD)
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-08-15 18:34 UTC by chrisheil2007
Modified: 2017-08-15 19:53 UTC (History)
6 users (show)

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


Attachments
Build output with diagnostic logging (4.50 MB, text/plain)
2017-08-15 19:42 UTC, chrisheil2007
Details
System info (4.75 KB, text/plain)
2017-08-15 19:49 UTC, chrisheil2007
Details
Build output with -v -v -v -v params (4.47 MB, text/plain)
2017-08-15 19:52 UTC, chrisheil2007
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 DUPLICATE of bug 58789

Description chrisheil2007 2017-08-15 18:34:16 UTC
When I build, rebuild, or debug with the Ad-Hoc profile the build breaks with the below error message. This only started occurring after an update to the latest version from the previous version. This happens on both VS2015 and 2017

C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(748,4): error : Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
2>  System.NullReferenceException: Object reference not set to an instance of an object
2>    at MonoTouch.Tuner.Linker.Process (MonoTouch.Tuner.LinkerOptions options, MonoTouch.Tuner.MonoTouchLinkContext& context, System.Collections.Generic.List`1[Mono.Cecil.AssemblyDefinition]& assemblies) [0x00145] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Tuning.cs:94 
2>    at Xamarin.Bundler.Target.LinkAssemblies (System.Collections.Generic.List`1[Mono.Cecil.AssemblyDefinition]& assemblies, System.String output_dir, System.Collections.Generic.IEnumerable`1[T] sharedCodeTargets) [0x0029a] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Target.cs:491 
2>    at Xamarin.Bundler.Target.ManagedLink () [0x005c5] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Target.cs:614 
2>    at Xamarin.Bundler.Target.ProcessAssemblies () [0x000bb] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Target.cs:800 
2>    at Xamarin.Bundler.Application.ProcessAssemblies () [0x0002f] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Application.cs:1396 
2>    at Xamarin.Bundler.Application.BuildManaged () [0x00001] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Application.cs:827 
2>    at Xamarin.Bundler.Application+<>c.<BuildAll>b__134_1 (Xamarin.Bundler.Application v) [0x00000] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Application.cs:775 
2>    at System.Collections.Generic.List`1[T].ForEach (System.Action`1[T] action) [0x00024] in <c9f8153c41de4f8cbafd0e32f9bf6b28>:0 
2>    at Xamarin.Bundler.Application.BuildAll () [0x00050] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/Application.cs:775 
2>    at Xamarin.Bundler.Driver.Main2 (System.String[] args) [0x00481] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/mtouch.cs:1420 
2>    at Xamarin.Bundler.Driver.Main (System.String[] args) [0x0000f] in /Users/builder/data/lanes/4991/4a279c9a/source/xamarin-macios/tools/mtouch/mtouch.cs:945
Comment 1 Alex Soto [MSFT] 2017-08-15 19:20:59 UTC
Hello!

Please include your full build logs, all your version information and the most important thing a test case (to reproduce).

To get full build logs just set the log verbosity to diagnostic at the following locations:
- On Visual Studio for Mac: Preferences > Projects > Build
- On Visual Studio for Windows: Tools > Options > Projects and Solutions > Build and Run

On Visual Studio Windows you also want to add `-v -v -v -v` to the mtouch additional arguments by right-clicking the project in the solution explorer and selecting `Properties`.
Note: this is done automatically on Visual Studio for Mac when the log verbosity is set to diagnostic.

The easiest way to get exact version information:
- On Visual Studio for Mac: "Visual Studio" menu, "About Visual Studio" item, "Show Details" button.
- On Visual Studio for Windows: "Help menu", "About Microsoft Visual Studio" item.
Then copy/paste the version information (you can use the "Copy Information"
Comment 2 Brendan Zagaeski (Xamarin Team, assistant) 2017-08-15 19:42:15 UTC
## Cross-referencing note for the Xamarin team

This appears to match the stack trace of Bug 58777, so both reports might be about the same underlying issue.  Bug 58777 is similarly waiting on additional log information and/or a test case.
Comment 3 chrisheil2007 2017-08-15 19:42:33 UTC
Created attachment 24204 [details]
Build output with diagnostic logging
Comment 4 chrisheil2007 2017-08-15 19:49:12 UTC
Created attachment 24205 [details]
System info
Comment 5 chrisheil2007 2017-08-15 19:52:52 UTC
Created attachment 24206 [details]
Build output with -v -v -v -v params

I apologize, i was working through the list and did not see the mtouch arguments part when i first submitted the output. Here it is again, this time with that info
Comment 6 Sebastien Pouliot 2017-08-15 19:53:56 UTC
Thanks for the report and extra information!

*** This bug has been marked as a duplicate of bug 58789 ***