Bug 7366 - Error when building with Xcode 4.5
Summary: Error when building with Xcode 4.5
Status: RESOLVED FIXED
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: 5.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-09-20 21:26 UTC by darren.oster
Modified: 2012-09-21 16:36 UTC (History)
3 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 darren.oster 2012-09-20 21:26:57 UTC
I have just updated to Xcode 4.5, and now when building an app I get the following (hopefully the relevant info is here...)

MonoTouch version 5.2.13 using framework: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk
error MT0000: Unexpected error - Please fill a bug report at http://bugzilla.xamarin.com
System.Xml.XmlException: Invalid data ---> System.Text.DecoderFallbackException: Exception of type 'System.Text.DecoderFallbackException' was thrown.
  at System.Text.DecoderExceptionFallbackBuffer.Fallback (System.Byte[] bytesUnknown, Int32 index) [0x00000] in <filename unknown>:0 
  at System.Text.UTF8Encoding.Fallback (System.Object provider, System.Text.DecoderFallbackBuffer& buffer, System.Byte[]& bufferArg, System.Byte* bytes, Int64 byteIndex, UInt32 size, System.Char* chars, System.Int32& charIndex) [0x00000] in <filename unknown>:0 
  at System.Text.UTF8Encoding.InternalGetChars (System.Byte* bytes, Int32 byteCount, System.Char* chars, Int32 charCount, System.UInt32& leftOverBits, System.UInt32& leftOverCount, System.Object provider, System.Text.DecoderFallbackBuffer& fallbackBuffer, System.Byte[]& bufferArg, Boolean flush) [0x00000] in <filename unknown>:0 
  at System.Text.UTF8Encoding.InternalGetChars (System.Byte[] bytes, Int32 byteIndex, Int32 byteCount, System.Char[] chars, Int32 charIndex, System.UInt32& leftOverBits, System.UInt32& leftOverCount, System.Object provider, System.Text.DecoderFallbackBuffer& fallbackBuffer, System.Byte[]& bufferArg, Boolean flush) [0x00000] in <filename unknown>:0 
  at System.Text.UTF8Encoding+UTF8Decoder.GetChars (System.Byte[] bytes, Int32 byteIndex, Int32 byteCount, System.Char[] chars, Int32 charIndex) [0x00000] in <filename unknown>:0 
  at System.Xml.NonBlockingStreamReader.ReadBuffer () [0x00000] in <filename unknown>:0 
  at System.Xml.NonBlockingStreamReader.Read (System.Char[] dest_buffer, Int32 index, Int32 count) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlStreamReader.Read (System.Char[] dest_buffer, Int32 index, Int32 count) [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at System.Xml.XmlStreamReader.Read (System.Char[] dest_buffer, Int32 index, Int32 count) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadTextReader (Int32 remained) [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.PeekChar () [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.ReadContent () [0x00000] in <filename unknown>:0 
  at Mono.Xml2.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlTextReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.EntityResolvingXmlReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.DTDValidatingReader.ReadContent () [0x00000] in <filename unknown>:0 
  at Mono.Xml.DTDValidatingReader.Read () [0x00000] in <filename unknown>:0 
  at Mono.Xml.Schema.XsdValidatingReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlValidatingReader.Read () [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.ReadNodeCore (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.ReadNode (System.Xml.XmlReader reader) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.Load (System.Xml.XmlReader xmlReader) [0x00000] in <filename unknown>:0 
  at System.Xml.XmlDocument.Load (System.String filename) [0x00000] in <filename unknown>:0 
  at MTouch.Main2 (System.String[] args) [0x00000] in <filename unknown>:0 
  at MTouch.Main (System.String[] args) [0x00000] in <filename unknown>:0 


Here is my version info:


MonoDevelop 3.0.4.7
Installation UUID: 48dc9cb6-e6e2-4cb6-ac6d-b1ba1e1fda48
Runtime:
	Mono 2.10.9 (tarball)
	GTK 2.24.10
	GTK# (2.12.0.0)
	Package version: 210090011
Mono for Android: Not Installed

Apple Developer Tools:
	 Xcode 4.5 (1839)
	 Build 4G182
Monotouch: 5.2.13
Build information:
	Release ID: 30004007
	Git revision: ea0108260c6a376ecaeffcdb7d03387bd51edda3
	Build date: 2012-09-17 14:09:17+0000
	Xamarin addins: ec43fd5cb223ead4234a9858d1b56eef03dad53a-dirty
Operating System:
	Mac OS X 10.7.5
	Darwin TPRS-MAC-DEVELOPMENT.local 11.4.2 Darwin Kernel Version 11.4.2
	    Thu Aug 23 16:25:48 PDT 2012
	    root:xnu-1699.32.7~1/RELEASE_X86_64 x86_64


Thanks in advance for your help.
Comment 1 darren.oster 2012-09-20 21:52:42 UTC
Fixed - as the first commenter was likely to tell me, I needed to update to MonoTouch 6.

Now I just need to fix all the deprecated calls...
Comment 2 Sebastien Pouliot 2012-09-20 21:59:03 UTC
Xcode 4.5 changed the format of some of it's .plist files from XML to binary.

Both MonoTouch 6.0 and 5.4 are compatible with Xcode 4.5. However the older 5.2.x series is not.

Note that the "obsolete" methods are related to iOS6. IOW they will work when executing on iOS 5.x. In fact most* of them still works on iOS6 (Apple only notify you, and us, that some things will be removed in future version). OTOH building with MonoTouch 5.4 and running on iOS 6 devices gets you in the same situation (but without any warnings).

* View[Did|Will]Appear are never called on iOS6
Comment 3 Sebastien Pouliot 2012-09-21 16:36:49 UTC
typo "Appear" -> "Unload", so

* View[Did|Will]Unload are never called on iOS6

More info:
http://docs.xamarin.com/ios/tutorials/Introduction_to_iOS_6#ViewWillUnload_and_ViewDidUnload_Deprecated