Bug 42184 - Failed to compile the generated registrar code. Since last update to xamarin 9.8. Only on device, simulator is working!
Summary: Failed to compile the generated registrar code. Since last update to xamarin ...
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 9.8 (tvOS / C7)
Hardware: Macintosh Windows
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2016-06-27 08:40 UTC by Roland
Modified: 2016-06-28 10:40 UTC (History)
3 users (show)

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

registrar.m (125.48 KB, text/plain)
2016-06-28 07:38 UTC, Roland
GMGridViewCell (5.66 KB, text/plain)
2016-06-28 10:38 UTC, Roland

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:

Description Roland 2016-06-27 08:40:50 UTC
Running des GmPhotPicker.Xamarin on Device results in following build error since the last xamarin 9.8 update. The error only occours on device build. The simualtor build work's.

1>------ Build started: Project: GMImagePicker, Configuration: Debug Any CPU ------
1>  Generated session id: 2f2c3b9623950aa061e5ce912deb0417
1>  Generated build app name: GMImagePicker
1>  Connecting to Mac server
1>  GMImagePicker -> C:\Users\rwalter.mobileDeveloper\Desktop\GMImagePicker.Xamarin-master\src\GMImagePicker\bin\Debug\GMImagePicker.Xamarin.dll
2>------ Build started: Project: GMPhotoPicker.Xamarin, Configuration: Debug iPhone ------
2>  Generated session id: fa9234d6cc30de01cbba30cce59aed0c
2>  Generated build app name: GMPhotoPickerXamarin
2>  Connecting to Mac server
2>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(1011,3): warning : The app icon set "AppIcons" has an unassigned child.
2>  GMPhotoPicker.Xamarin -> C:\Users\rwalter.mobileDeveloper\Desktop\GMImagePicker.Xamarin-master\samples\GMPhotoPicker.Xamarin\bin\iPhone\Debug\GMPhotoPickerXamarin.exe
2>  Detected signing identity:
2>    Code Signing Key: "iPhone Developer: Roland Walter (9XBUHWSADV)" (8D7B8B633B839B8DA79639748128A1DDD9CEF35E)
2>    Provisioning Profile: "iOS Team Provisioning Profile: *" (b324a702-6616-46b8-a308-8e3557ac310f)
2>    Bundle Id: com.roycornelissen.gmphotopicker
2>    App Id: 2332T8U4HF.com.roycornelissen.gmphotopicker
2>  Process exited with code 1, command:
2>  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang  -Wno-receiver-forward-class -gdwarf-2 -I/Library/Frameworks/Xamarin.iOS.framework/Versions/ -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk -Qunused-arguments -miphoneos-version-min=8.0 -arch arm64 -c -o /Users/rolandwalter1/Library/Caches/Xamarin/mtbs/builds/GMPhotoPickerXamarin/fa9234d6cc30de01cbba30cce59aed0c/obj/iPhone/Debug/build-iphone6.2-8.3/mtouch-cache/registrar.arm64.o -x objective-c++ /Users/rolandwalter1/Library/Caches/Xamarin/mtbs/builds/GMPhotoPickerXamarin/fa9234d6cc30de01cbba30cce59aed0c/obj/iPhone/Debug/build-iphone6.2-8.3/mtouch-cache/registrar.m -DDEBUG
2>  /Users/rolandwalter1/Library/Caches/Xamarin/mtbs/builds/GMPhotoPickerXamarin/fa9234d6cc30de01cbba30cce59aed0c/obj/iPhone/Debug/build-iphone6.2-8.3/mtouch-cache/registrar.m:2526:103: error: expected ':'
2>                          rv = ((id (*)(objc_super*, SEL, CGRect)) objc_msgSendSuper) (&super, @selector (initWithFrame:frame), p0);
2>                                                                                                                             ^ 
2>                                                                                                                             : 
2>  1 error generated.
2>C:\Program Files (x86)\MSBuild\Xamarin\iOS\Xamarin.iOS.Common.targets(681,3): error : Failed to compile the generated registrar code. Please file a bug report at http://bugzilla.xamarin.com
3>------ Build started: Project: GMPhotoPicker.Xamarin.UITests, Configuration: Debug Any CPU ------
3>  GMPhotoPicker.Xamarin.UITests -> C:\Users\rwalter.mobileDeveloper\Desktop\GMImagePicker.Xamarin-master\samples\GMPhotoPicker.Xamarin.UITests\bin\Debug\GMPhotoPicker.Xamarin.UITests.dll
========== Build: 2 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Project can be found under: https://github.com/roycornelissen/GMImagePicker.Xamarin
Comment 1 Rolf Bjarne Kvinge [MSFT] 2016-06-27 15:44:40 UTC
Can you attach the complete /Users/rolandwalter1/Library/Caches/Xamarin/mtbs/builds/GMPhotoPickerXamarin/fa9234d6cc30de01cbba30cce59aed0c/obj/iPhone/Debug/build-iphone6.2-8.3/mtouch-cache/registrar.m file?
Comment 2 Marcus Follrud 2016-06-28 01:17:53 UTC
I got the same problem as of yesterday. Here's the function.

	-(id) initWithFrame:(CGRect)p0
		static MonoMethod *managed_method = NULL;
		bool call_super = false;
		id rv = native_to_managed_trampoline_30 (self, _cmd, &managed_method, p0, "CoreGraphics.CGRect, Xamarin.iOS", "GMImagePicker.GMGridViewCell, GMImagePicker.Xamarin", ".ctor", &call_super);
		if (call_super && rv) {
			struct objc_super super = {  rv, [UICollectionViewCell class] };
			rv = ((id (*)(objc_super*, SEL, CGRect)) objc_msgSendSuper) (&super, @selector (initWithFrame:frame), p0);
		return rv;
Comment 3 Marcus Follrud 2016-06-28 02:08:14 UTC
.. Forgot to paste the actual registar.. sorry.
Comment 4 Roland 2016-06-28 07:38:20 UTC
Created attachment 16506 [details]
Comment 5 Rolf Bjarne Kvinge [MSFT] 2016-06-28 10:24:09 UTC
Can you show the code for your GMImagePicker.GMGridViewCell class as well?
Comment 6 Roland 2016-06-28 10:38:44 UTC
Created attachment 16507 [details]
Comment 7 Rolf Bjarne Kvinge [MSFT] 2016-06-28 10:40:27 UTC
The problem is here:

>    [Export("initWithFrame:frame")]
>    public GMGridViewCell (CGRect frame) : base(frame)

The selector is wrong, it should be:

>    [Export("initWithFrame:")] 

That will fix your build error.