Bug 34378 - /xsl-home/kleverlogic/FlashValet/Mobile/iPhone/Valet/MTOUCH: Error MT0000: Unexpected error - Please file a bug report at http://bugzilla.xamarin.com (MT0000) (KleverLogic.FlashValet.iPhone.Valet)
Summary: /xsl-home/kleverlogic/FlashValet/Mobile/iPhone/Valet/MTOUCH: Error MT0000: Un...
Alias: None
Product: iOS
Classification: Xamarin
Component: Xamarin.iOS.dll ()
Version: XI 9.0 (iOS9)
Hardware: Macintosh Mac OS
: --- enhancement
Target Milestone: (C7)
Assignee: Rolf Bjarne Kvinge [MSFT]
Depends on:
Reported: 2015-09-29 00:41 UTC by Dean Cleaver
Modified: 2016-06-03 13:54 UTC (History)
3 users (show)

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

Build log (155.29 KB, text/rtf)
2015-09-29 00:43 UTC, Dean Cleaver

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 Dean Cleaver 2015-09-29 00:41:57 UTC
Build log attached. Way too big for in here.
Comment 1 Dean Cleaver 2015-09-29 00:43:16 UTC
Created attachment 13116 [details]
Build log
Comment 2 Rolf Bjarne Kvinge [MSFT] 2015-09-29 03:41:32 UTC
Can you zip up the directory /xsl-home/kleverlogic/FlashValet/Mobile/iPhone/Valet/obj/iPhone/AdHoc/mtouch-cache and share it with us (you'll have to use a file-sharing service like Dropbox, because it will be over the bugzilla attachment limit)?
Comment 4 Rolf Bjarne Kvinge [MSFT] 2015-09-29 11:15:02 UTC
Are you still uploading that file? It'll only download 4.2mb before giving an error.
Comment 6 Dean Cleaver 2015-09-29 14:33:38 UTC
Is there anything I can try? We are desperate to try to get an iOS 9 fix out, and this just happened last night.

Only changes I am aware of was a change to a 3rd party binding project.
Comment 7 Dean Cleaver 2015-09-29 14:40:47 UTC
Ok - I just rolled back the 3rd party DLL and it's now compiling. I will rebuild that 3rd party binding project and try again. I believe I only copied the DLL to the assemblies folder in SVN, but there's an MDB there too - could this be caused by a mismatch between the MDB and the DLL?
Comment 8 Dean Cleaver 2015-09-29 14:45:25 UTC
Nope - even updating the MDB to a newer version it fails to compile - but it does seem to be something with the binding project. I will zip that project and post a link to download it so you can take a look.
Comment 10 Dean Cleaver 2015-09-29 15:00:23 UTC
The only change to that project was changing this:

		// -(RDResult)msr_EnableMSR;
		[Export ("msr_EnableMSR")]
		//[Verify (MethodToProperty)]
		RDResult Msr_EnableMSR { get; }

		// -(RDResult)msr_CancelMSR;
		[Export ("msr_CancelMSR")]
		//[Verify (MethodToProperty)]
		RDResult Msr_CancelMSR { get; }

to this:

		// -(RDResult)msr_EnableMSR;
		[Export ("msr_EnableMSR")]
		//[Verify (MethodToProperty)]
		RDResult Msr_EnableMSR ();

		// -(RDResult)msr_CancelMSR;
		[Export ("msr_CancelMSR")]
		//[Verify (MethodToProperty)]
		RDResult Msr_CancelMSR ();

Objective-Sharpie seems to like making parameterless methods into properties - I don't. But making the above change and recompiling the library causes the full project compile to fail. Restoring to an older version of the library compiled in early June means the project will compile.
Comment 11 Rolf Bjarne Kvinge [MSFT] 2015-09-30 03:38:31 UTC
The problem is the NSMutableData field in the RDResult structure, we don't support structures that contain objects.

Defining it like this should work:

    public struct RDResult {
         public RDStatus status;
         IntPtr data;

        public NSMutableData Data {
            get { return (NSMutableData) Runtime.GetNSObject (data); }
Comment 12 Dean Cleaver 2015-09-30 04:45:16 UTC
Thanks Rolf. With a few tweaks, that seems to have fixed it.
Comment 13 Rolf Bjarne Kvinge [MSFT] 2015-09-30 06:54:59 UTC
OK, thanks for confirming, I'll try and make a better error message.
Comment 14 Dean Cleaver 2015-09-30 11:43:52 UTC
Should the binding project have failed to compile in this case?
Comment 15 Rolf Bjarne Kvinge [MSFT] 2015-09-30 11:46:02 UTC
No, the executable project should fail to compile, it will say something like this in a future version:

> error MT4161: The registrar found an unsupported structure 'IDTech.RDResult': All fields in a structure must also be structures (field 'data' with type 'Foundation.NSMutableData' is not a structure).
Comment 16 Rolf Bjarne Kvinge [MSFT] 2015-10-01 04:31:32 UTC
Fixed (to report a better error).

QA: unit tests were added.

maccore/master: 13aaeb718e0d166367fc23818d3c282a69e16bca
Comment 17 Rajneesh Kumar 2016-06-03 13:54:36 UTC
I have checked this issue with the attached test case provided in comment 9. I observed that I am successfully able to build the attached sample without any error. Also Dean provide the confirmation that "it seems to have fixed it".

So as of now I am closing this issue. If anyone face this issue again so feel free to reopen it OR file a seperate issue.

Environemnt Info: https://gist.github.com/Rajneesh360Logica/cf6e24749b6ef5dc0c69c96dabe99a54