xamarin / xamarin-macios

.NET for iOS, Mac Catalyst, macOS, and tvOS provide open-source bindings of the Apple SDKs for use with .NET managed languages such as C#
Other
2.47k stars 513 forks source link

objcgen on windows throws exception in VerifyMono() #4438

Closed jkrebsbach closed 6 years ago

jkrebsbach commented 6 years ago

Steps to Reproduce

  1. Download and extract https://github.com/mono/Embeddinator-4000/tree/master/objcgen to C:\temp
  2. Compile WeatheriOS project
  3. Execute: C:\temp\Weather\WeatheriOS>..\packages\Embeddinator-4000.0.4.0\tools\objcgen.exe bin\debug\weatherios.dll --target=framework --platform=iOS --outdir=iosoutput - c --debug

Expected Behavior

WeatheriOS.framework is generated

Actual Behavior

C:\temp\Weather\WeatheriOS>..\packages\Embeddinator-4000.0.4.0\tools\objcgen.exe bin\debug\weatherios.dll --target=framework --platform=iOS --outdir=iosoutput - c --debug Parsing assemblies... Parsed 'bin\debug\weatherios.dll' Processing assemblies... 2 types found Generating binding code... Generated: iosoutput\bindings.h Generated: iosoutput\bindings-private.h Generated: iosoutput\bindings.m Generated: iosoutput\bindings.xml Generated: iosoutput\embeddinator.h Generated: iosoutput\glib.h Generated: iosoutput\mono_embeddinator.h Generated: iosoutput\mono-support.h Generated: iosoutput\objc-support.h Generated: iosoutput\glib.c Generated: iosoutput\mono_embeddinator.c Generated: iosoutput\objc-support.m Generated: iosoutput\Make.config Compiling binding code... EM0000: Unexpected error - Please fill a bug report at https://github.com/mono/E mbeddinator-4000/issues System.NullReferenceException: Object reference not set to an instance of an obj ect. at Embeddinator.ObjC.SystemCheck.VerifyMono() at Embeddinator.ObjC.Embedder.VerifyDependencies() at Embeddinator.ObjC.Embedder.Compile() at Embeddinator.ObjC.Driver.Main2(String[] args) at Embeddinator.ObjC.Driver.Main(String[] args) Debug Log: Processing: 1 assemblies Processing Assembly: WeatheriOS Processing Type: XAMWeatherFetcher TypeMapper Register: System.Void .ctor(System.String,System.String) initWithCity :state: TypeMapper Register: System.String get_City() getCity TypeMapper Register: System.String get_State() getState TypeMapper Register: XAMWeatherResult GetWeather() getWeather TypeMapper Register: XAMWeatherFetcher City city TypeMapper Register: XAMWeatherFetcher State state Processing Type: XAMWeatherResult TypeMapper Register: System.Void .ctor(System.String,System.String,System.String ,System.String) initWithTemp:text:city:state: TypeMapper Register: System.String get_City() getCity TypeMapper Register: System.String get_State() getState TypeMapper Register: System.String get_Temp() getTemp TypeMapper Register: System.String get_Text() getText TypeMapper Register: XAMWeatherResult City city TypeMapper Register: XAMWeatherResult State state TypeMapper Register: XAMWeatherResult Temp temp TypeMapper Register: XAMWeatherResult Text text Begin Generator Generating Assembly: WeatheriOS Generating Type: XAMWeatherFetcher Generating Property: city Generating Method Impl: System.String get_City() Generating Property: state Generating Method Impl: System.String get_State() Generating Method: XAMWeatherResult GetWeather() Generating Method Impl: XAMWeatherResult GetWeather() Generating Type: XAMWeatherResult Generating Property: city Generating Method Impl: System.String get_City() Generating Property: state Generating Method Impl: System.String get_State() Generating Property: temp Generating Method Impl: System.String get_Temp() Generating Property: text Generating Method Impl: System.String get_Text()

Environment

Microsoft Visual Studio Enterprise 2017 
Version 15.7.5
VisualStudio.15.Release/15.7.5+27703.2042
Microsoft .NET Framework
Version 4.7.02558

Installed Version: Enterprise

Visual C++ 2017   00369-60000-00001-AA949
Microsoft Visual C++ 2017

Application Insights Tools for Visual Studio Package   8.12.10405.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017   15.0.40625.0
ASP.NET and Web Tools 2017

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

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

Azure App Service Tools v3.0.0   15.0.40608.0
Azure App Service Tools v3.0.0

C# Tools   2.8.3-beta6-63029-08. Commit Hash: e9a3a6c0ba5b1fde8b1fff964bdfb3fb768ee2eb
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

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

JetBrains ReSharper Ultimate 2018.1.2    Build 112.0.20180530.113618
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2018 JetBrains, Inc.

JustMock   2018.2.511.5
Telerik JustMock Extension.

Merq   1.1.19-rc (a4ffc1b)
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.10420.2

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 C++ Wizards   1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package   1.0
Microsoft Visual Studio VC Package

Mono Debugging for Visual Studio   4.10.5-pre (ab58725)
Support for debugging Mono processes with Visual Studio.

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

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

ResourcePackage Extension   1.0
ResourcePackage Visual Studio Extension Detailed Info

SQL Server Data Tools   15.1.61804.210
Microsoft SQL Server Data Tools

SQL Server Reporting Services   14.0.1016.246
Microsoft SQL Server Reporting Services Designers 
Version 14.0.1016.246

Telerik Reporting Tools   3.44.0.12
Complete .NET Reporting Solution for Web, Mobile and Desktop Applications. For more information please visit http://www.telerik.com/reporting. 

Telerik WPF VSExtensions   2017.3.1017.0
Progress® Telerik® UI for WPF Visual Studio extensions

Test Adapter for Boost.Test   1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test.  The use terms and Third Party Notices are available in the extension installation directory.

Test Adapter for Google Test   1.0
Enables Visual Studio's testing tools with unit tests written for Google Test.  The use terms and Third Party Notices are available in the extension installation directory.

TypeScript Tools   15.7.20419.2003
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   2.8.3-beta6-63029-08. Commit Hash: e9a3a6c0ba5b1fde8b1fff964bdfb3fb768ee2eb
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.1 for F# 4.1   15.7.0.0.  Commit Hash: 173513e369ffb7a1c4d5dccf83696d9aac2ab2d0.
Microsoft Visual F# Tools 10.1 for F# 4.1

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 CMake   1.0
Visual Studio Tools for CMake

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Windows Machine Learning Generator Extension   1.0
Windows Machine Learning Visual Studio Extension Detailed Info

Xamarin   4.10.10.2 (35a01d8dc)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   4.12.1 (f3257e429)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin.Android SDK   8.3.3.2 (HEAD/dffc59120)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK   11.12.0.4 (64fece5)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

My current version of mono from %PATH% -

C:\temp\Weather\WeatheriOS>mono -V Mono JIT compiler version 5.12.0 (Visual Studio built mono) Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-proj ect.com TLS: normal SIGSEGV: normal Notification: Thread + polling Architecture: x86 Disabled: none Misc: softdebug Interpreter: yes LLVM: supported, not enabled. GC: sgen (concurrent by default)

Build Logs

Example Project (If Possible)

mandel-macaque commented 6 years ago

Hello, this repo is for the Xamarin.[iOS|Mac] bindings. I'll move the bug to the correct repo to be followed there.

mandel-macaque commented 6 years ago

This issue was moved to mono/Embeddinator-4000#683