Bug 28981 - MTOUCHTASK: error MT4109: Failed to compile the generated registrar code.
Summary: MTOUCHTASK: error MT4109: Failed to compile the generated registrar code.
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 8.9.x (iOS 8.3)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2015-04-10 11:50 UTC by Donald Inostroza
Modified: 2015-04-13 06:01 UTC (History)
2 users (show)

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

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 Donald Inostroza 2015-04-10 11:50:12 UTC
When I try to compile for iPhone I get the following error (on simulator run with no problems):

MTOUCHTASK: error MT4109: Failed to compile the generated registrar code.

I've tested using Xamarin.iOS 8.8.1, 8.9.3 and 8.10.0.197 (alpha channel) with the same error.
Also I've created a new project and it builds with no problems.

- System information:

Xamarin Studio
Version 5.9 (build 388)
Installation UUID: 67af8fe6-6aad-4731-9085-a9220a864d7a
Runtime:
	Mono 4.0.0 ((detached/21d849b)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 400000121

Apple Developer Tools
Xcode 6.1.1 (6611)
Build 6A2008a

Xamarin.iOS
Version: 8.10.0.197 (Indie Edition)
Hash: 4dac6bf
Branch: master
Build date: 2015-04-01 21:55:11-0400

Xamarin.Android
Version: 5.1.0.100 (Indie Edition)
Android SDK: /Users/administrador/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.3   (API level 10)
		4.0.3 (API level 15)
		4.2   (API level 17)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

Xamarin Android Player
Version: 0.0.25
Location: /Applications/Xamarin Android Player.app

Xamarin.Mac
Not Installed

Build Information
Release ID: 509000388
Git revision: 027c5efa6f92249fd2e614535965159c0a7c0fe6
Build date: 2015-04-01 19:12:53-04
Xamarin addins: a6779639267bbe31df3fd6958be4ecae82665b7e

Operating System
Mac OS X 10.9.5
Darwin COLEGIUM-DES.local 13.4.0 Darwin Kernel Version 13.4.0
    Sun Aug 17 19:50:11 PDT 2014
    root:xnu-2422.115.4~1/RELEASE_X86_64 x86_64


- The LOG:
https://bitbucket.org/snippets/dinostroza_colegium/RRnM
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-04-10 11:52:03 UTC
Could you zip up your project and share it with us so that we can have a look and reproduce this ourselves?
Comment 2 Donald Inostroza 2015-04-10 12:31:08 UTC
No, sorry but I'm limmited by a NDA.
Comment 3 Donald Inostroza 2015-04-10 12:34:41 UTC
if you need some other extra information please let me know. i'm stuck by this bug.
Comment 4 Rolf Bjarne Kvinge [MSFT] 2015-04-10 13:23:25 UTC
Can you zip up and share the directory /Users/administrador/Dropbox/colegium-desarrollo/schoolnetmobile-appx.git/iOS/obj/iPhone/Debug/mtouch-cache  instead? That directory only contains the assemblies and various build artefacts, not any source code.
Comment 6 Donald Inostroza 2015-04-10 15:07:39 UTC
can you see the link? My comment is showed in red :/
Comment 8 Rolf Bjarne Kvinge [MSFT] 2015-04-10 15:25:21 UTC
Yes, I can see your link (I already downloaded the file), the comment shows up in red because I made it private (so that only Xamarin employees can download it).

I'll look at this on Monday (it's late in Europe now).
Comment 9 Donald Inostroza 2015-04-10 15:30:31 UTC
Ok, BTW thanks.
Comment 10 Rolf Bjarne Kvinge [MSFT] 2015-04-13 05:35:30 UTC
The problem is that you're registering properties with an invalid selector name (with spaces).

I've improved our error detection, and this is the result:

> /Users/administrador/Dropbox/colegium-desarrollo/schoolnetmobile-appx.git/iOS/Utils/UIRoundButton.cs(32): error MT4160: Invalid character ' ' (0x20) foud in selector 'Corner radius' for '.SNMobile.iOS.UIRoundButton'.
> /Users/administrador/Dropbox/colegium-desarrollo/schoolnetmobile-appx.git/iOS/Utils/UIRoundButton.cs(33): error MT4160: Invalid character ' ' (0x20) foud in selector 'setCorner radius:' for '.SNMobile.iOS.UIRoundButton'.
> /Users/administrador/Dropbox/colegium-desarrollo/schoolnetmobile-appx.git/iOS/Utils/UIRoundButton.cs(38): error MT4160: Invalid character ' ' (0x20) foud in selector 'Border color' for '.SNMobile.iOS.UIRoundButton'.
> /Users/administrador/Dropbox/colegium-desarrollo/schoolnetmobile-appx.git/iOS/Utils/UIRoundButton.cs(39): error MT4160: Invalid character ' ' (0x20) foud in selector 'setBorder color:' for '.SNMobile.iOS.UIRoundButton'.
> /Users/administrador/Dropbox/colegium-desarrollo/schoolnetmobile-appx.git/iOS/Utils/UIRoundButton.cs(44): error MT4160: Invalid character ' ' (0x20) foud in selector 'Title color' for '.SNMobile.iOS.UIRoundButton'.
> /Users/administrador/Dropbox/colegium-desarrollo/schoolnetmobile-appx.git/iOS/Utils/UIRoundButton.cs(45): error MT4160: Invalid character ' ' (0x20) foud in selector 'setTitle color:' for '.SNMobile.iOS.UIRoundButton'.
> /Users/administrador/Dropbox/colegium-desarrollo/schoolnetmobile-appx.git/iOS/Utils/UIRoundButton.cs(50): error MT4160: Invalid character ' ' (0x20) foud in selector 'Border width' for '.SNMobile.iOS.UIRoundButton'.
> /Users/administrador/Dropbox/colegium-desarrollo/schoolnetmobile-appx.git/iOS/Utils/UIRoundButton.cs(51): error MT4160: Invalid character ' ' (0x20) foud in selector 'setBorder width:' for '.SNMobile.iOS.UIRoundButton'.
Comment 11 Rolf Bjarne Kvinge [MSFT] 2015-04-13 06:01:41 UTC
I've fixed XI to report this error properly.

maccore/master: 4eaeb55ede2915699dc54a7dca9fe648b69b24b1

QA: unit tests were added as well.