3
votes

UPDATE - This indeed fails only in release builds, but only when the LLVM compiler option is used. Creating a self-contained test case for Xamarin that I'll post as the answer.

I have a project which uses the ServiceStack.Common.Monotouch.dll, ServiceStack.Interfaces.Monotouch.dll, and ServiceStack.Text.Monotouch.dll. I can build this project in Simulator/Release & Debug, and iPhone/Debug, but when I build in iPhone/Release, I get the following error:

...
MONO_PATH=/Users/pseabury/Projects/IMDSS_iOS/IMDSSMobile_iOS/bin/iPhone/Release/IMDSSMobile_iOS.app /Developer/MonoTouch/usr/bin/arm-darwin-mono --llvm --aot=mtriple=armv7-darwin,full,static,asmonly,nodebug,llvm-path=/Developer/MonoTouch/LLVM/bin/,outfile=/var/folders/mt/b7h3_pgs3lxgpvpm2h1_2ppc0000gn/T/tmp39b8b8c7.tmp/System.Data.dll.7.s "/Users/pseabury/Projects/IMDSS_iOS/IMDSSMobile_iOS/bin/iPhone/Release/IMDSSMobile_iOS.app/System.Data.dll"
AOT Compilation exited with code 134, command:
MONO_PATH=/Users/pseabury/Projects/IMDSS_iOS/IMDSSMobile_iOS/bin/iPhone/Release/IMDSSMobile_iOS.app /Developer/MonoTouch/usr/bin/arm-darwin-mono --llvm --aot=mtriple=armv7-darwin,full,static,asmonly,nodebug,llvm-path=/Developer/MonoTouch/LLVM/bin/,outfile=/var/folders/mt/b7h3_pgs3lxgpvpm2h1_2ppc0000gn/T/tmp39b8b8c7.tmp/ServiceStack.Text.MonoTouch.dll.7.s "/Users/pseabury/Projects/IMDSS_iOS/IMDSSMobile_iOS/bin/iPhone/Release/IMDSSMobile_iOS.app/ServiceStack.Text.MonoTouch.dll"
Mono Ahead of Time compiler - compiling assembly /Users/pseabury/Projects/IMDSS_iOS/IMDSSMobile_iOS/bin/iPhone/Release/IMDSSMobile_iOS.app/ServiceStack.Text.MonoTouch.dll
* Assertion at ../../../../../mono/mono/mini/mini-llvm.c:4535, condition `LLVMTypeOf (values [sreg1]) == LLVMTypeOf (values [phi->dreg])' not met
...
mtouch exited with code 1

If necessary I can put together an example project, but all you should need is the latest ServiceStack dlls or sources for Monotouch and a sample/contrived DTO for a ServiceClient in order to reproduce this.

1

1 Answers