Bug 32796 - Binding error - BTOUCH: Error BI0000: Unexpected error
Summary: Binding error - BTOUCH: Error BI0000: Unexpected error
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: unspecified
Hardware: Macintosh Mac OS
: Normal normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-08-05 10:35 UTC by f.ortner
Modified: 2015-08-12 06:34 UTC (History)
3 users (show)

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


Attachments
Binding project (1.29 MB, application/zip)
2015-08-05 11:52 UTC, f.ortner
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 FIXED

Description f.ortner 2015-08-05 10:35:08 UTC
When trying to compile a native bindings project with ArcGIS SDK, I get the following error:



Build started 05.08.2015 13:56:38.

Project "/Users/macbook/Bindings/Iseo.Esri.ObjCBinding/Iseo.Esri.ObjCBinding.csproj" (Build target(s)):
Target _CreateGeneratedSourcesDir:
Created directory "obj/Debug/ios/"

Target _CollectBundleResources:
CollectBundleResources Task
BundleResources:
OptimizePNGs: False
ProjectDir: /Users/macbook/Bindings/Iseo.Esri.ObjCBinding
ResourcePrefix: Resources

Target _CreateEmbeddedResources:
CreateEmbeddedResources Task
BundleResources:
Prefix: monotouch

Target PrepareForBuild:
Configuration: Debug Platform: AnyCPU

Target GenerateSatelliteAssemblies:
No input files were specified for target GenerateSatelliteAssemblies, skipping.

Target _GenerateBindings:
BTouchEmitDebugInformation: false
BTouch Task
BTouchToolPath: /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/
BTouchToolExe: btouch-native
AdditionalLibPaths:
AllowUnsafeBlocks: True
ApiDefinitions:
ApiDefinition.cs
BaseLibDll: /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll
CompilerPath:
CoreSources:
StructsAndEnums.cs
DefineConstants: MOBILE;IOS;DEBUG;
EmitDebugInformation: False
GeneratedSourcesDir: obj/Debug/ios/
GeneratedSourcesFileList: obj/Debug/ios//sources.list
Namespace:
NativeLibraries:
NoStdLib: False
OutputAssembly:
References:
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Core.dll
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll
Resources:
Sources:
Tool /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/btouch-native execution started with arguments: /v /baselib:/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll /unsafe /d:"MOBILE;IOS;DEBUG" ApiDefinition.cs /s:StructsAndEnums.cs -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Core.dll -r /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll /tmpdir:obj/Debug/ios/ /sourceonly:obj/Debug/ios//sources.list
/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/bin/smcs -debug -unsafe -target:library -nowarn:436 -out:'obj/Debug/ios/temp.dll' -r:/Library/Frameworks/Xamarin.iOS.framework/Versions/8.10.3.2/lib/btouch/btouch-native.exe -r:'/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.dll' -r:'/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll' -r:'/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/System.Core.dll' -r:'/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/mscorlib.dll' -unsafe -r:'/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/lib/mono/Xamarin.iOS/Xamarin.iOS.dll' -define:MOBILE;IOS;DEBUG 'ApiDefinition.cs' 'StructsAndEnums.cs'

BTOUCH: error BI0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com
System.NullReferenceException: Object reference not set to an instance of an object
at Generator.GetGetterExportAttribute (System.Reflection.PropertyInfo pinfo) [0x0002c] in /Users/builder/data/lanes/1962/8b265d64/source/maccore/src/generator.cs:2247
at Generator.GenerateProtocolTypes (System.Type type, System.String class_visibility, System.String TypeName, System.String protocol_name, Foundation.ProtocolAttribute protocolAttribute) [0x00405] in /Users/builder/data/lanes/1962/8b265d64/source/maccore/src/generator.cs:4943
at Generator.Generate (System.Type type) [0x002a5] in /Users/builder/data/lanes/1962/8b265d64/source/maccore/src/generator.cs:5131
at Generator.Go () [0x00b97] in /Users/builder/data/lanes/1962/8b265d64/source/maccore/src/generator.cs:2504
at BindingTouch.Main2 (System.String[] args) [0x00ccd] in /Users/builder/data/lanes/1962/8b265d64/source/maccore/src/btouch.cs:405
at BindingTouch.Main (System.String[] args) [0x0001d] in /Users/builder/data/lanes/1962/8b265d64/source/maccore/src/btouch.cs:89
WARNING: The runtime version supported by this application is unavailable.
Using default runtime: v4.0.30319
Task "BTouch" execution -- FAILED
Done building target "_GenerateBindings" in project "/Users/macbook/Bindings/Iseo.Esri.ObjCBinding/Iseo.Esri.ObjCBinding.csproj".-- FAILED

Done building project "/Users/macbook/Bindings/Iseo.Esri.ObjCBinding/Iseo.Esri.ObjCBinding.csproj".-- FAILED

Build FAILED.
Errors:

/Users/macbook/Bindings/Iseo.Esri.ObjCBinding/Iseo.Esri.ObjCBinding.csproj (Build) ->
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/iOS/Xamarin.iOS.ObjCBinding.CSharp.targets (_GenerateBindings target) ->

BTOUCH: error BI0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:02.8843620

--------------------- Fertig ---------------------

Build: 1 Fehler, 0 Warnungen

--------------------------------------------------

As you see, no errors or warnings before btouch want (but can´t) to create the dll.

Is there a suggestion to find the error?
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-08-05 11:27:56 UTC
Can you attach your binding project so we can reproduce this ourselves?
Comment 2 f.ortner 2015-08-05 11:52:08 UTC
Created attachment 12367 [details]
Binding project
Comment 3 Rolf Bjarne Kvinge [MSFT] 2015-08-10 04:24:57 UTC
The problem is the following binding code:

>	[Wrap ("WeakDelegate"), Abstract]
>	AGSPopupsContainerDelegate Delegate { get; set; }

in the binding for AGSPopupsContainer, particularly [Protocol] on the interface + [Wrap][Abstract] on an interface member

I suggest you remove the WeakDelegate member, and bind Delegate like this instead:

>	// @required @property (assign, nonatomic) id<AGSPopupsContainerDelegate> delegate;
>	[Abstract]
>	[NullAllowed, Export ("delegate", ArgumentSemantic.Assign)]
>	IAGSPopupsContainerDelegate Delegate { get; set; }

you'll also have to add this somewhere (just the interface like this, nothing else):

>	interface IAGSPopupsContainerDelegate {}
Comment 4 Rolf Bjarne Kvinge [MSFT] 2015-08-12 06:34:18 UTC
This was fixed with the fix for bug #30766, we no longer add [Wrap] members to the generated protocol interface.