Bug 6025 - Monotouch crashes when compiling a project. NSInvalidArgumentException
Summary: Monotouch crashes when compiling a project. NSInvalidArgumentException
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: iOS add-in ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Jeffrey Stedfast
Depends on:
Reported: 2012-07-06 23:32 UTC by Dermot
Modified: 2012-09-15 21:46 UTC (History)
1 user (show)

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

Crash log (74.08 KB, text/rtf)
2012-07-06 23:32 UTC, Dermot
Build output of app with same libraries that doesnt crash (18.80 KB, text/rtf)
2012-07-07 00:25 UTC, Dermot
Screenshot of build output just before crash (467.21 KB, image/png)
2012-07-07 00:26 UTC, Dermot

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 Dermot 2012-07-06 23:32:15 UTC
Created attachment 2165 [details]
Crash log

I am using a custom binding of the Bump API (v3).
This as worked fine for months. Today I attempted to add the monotouch binding of AdMob. I encountered a conflict (Duplicate symbol error)
It is described here: https://groups.google.com/forum/?fromgroups#!topic/bump-api/WZPAstG-OGM

I implemented the workaround described in that thread:

As a temporary workaround before either Google and/or Bumptech releases a fix for this you can run the following in the terminal for the bump api:

        $ cd API_build
        $ mv libBumpAPI.a libBumpAPI.bak
        $ perl -n -p -e 's/MD5/MX5/g' < libBumpAPI.bak > libBumpAPI.a

This allowed me to get Bump and AdMob working in the same test project, however when I move this modified version of the Bump binding to my main project, Monodevelop crashes during compilation (Crash output attached)

Im not really sure where to start looking for the solution to this.
Comment 1 Dermot 2012-07-07 00:24:44 UTC
Note: I've noticed in the build output that it crashes on "Updating Application Manifest". It occurs when building for the device or the simulator.

I have attached two files. One is a PNG screengrab of the build output just before it crashes (I've tried several times but cant copy it to the clipboard) in my Main Project. The other is a text file of the build output in the test app that seems to build fine. It contains the same libraries.

The only main difference I can see between the two build configurations is:

This works:
Compiling to native code
/Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" -v --nomanifest --nosign -dev "/Users/Dermot/Projects/AsyncSocketTest/AsyncSocketTest/bin/iPhone/Debug/AsyncSocketTest.app" -r "/Users/Dermot/Projects/AsyncSocketTest/Common/bin/Debug/Common.dll" -r "/Users/Dermot/Projects/AsyncSocketTest/Network/bin/Debug/Network.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" -r "/Users/Dermot/Projects/AsyncSocketTest/GoogleAdMobAds.dll" -r "/Users/Dermot/Projects/Bump3Binding/Bump3Binding/bin/Release/Bump3Binding.dll" -r "/Users/Dermot/Projects/Apollo/Apollo/Facebook.dll" -r "/Users/Dermot/Projects/Apollo/Apollo/FlurryAnalytics.dll" -r "/Users/Dermot/Projects/Apollo/Apollo/NewtonsoftJsonMonoTouch.dll" -r "/Users/Dermot/Projects/Apollo/Apollo/TestFlight.dll" -debug -profiling -sdk "5.1" -targetver "3.1" --armv7 "/Users/Dermot/Projects/AsyncSocketTest/AsyncSocketTest/bin/iPhone/Debug/AsyncSocketTest.exe"

This doesnt:

Compiling to native code
/Developer/MonoTouch/usr/bin/mtouch -sdkroot "/Applications/Xcode.app/Contents/Developer" -v --nomanifest --nosign -dev "/Users/Dermot/Projects/Apollo/Apollo/bin/iPhone/Debug/GroovePond.app" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Data.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/System.Runtime.Serialization.dll" -r "/Users/Dermot/Projects/Apollo/Apollo/Facebook.dll" -r "/Users/Dermot/Projects/Apollo/Apollo/NewtonsoftJsonMonoTouch.dll" -r "/Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll" -r "/Users/Dermot/Projects/Apollo/Apollo/FlurryAnalytics.dll" -r "/Users/Dermot/Projects/Apollo/Apollo/TestFlight.dll" -r "/Users/Dermot/Projects/Apollo/Apollo/GoogleAdMobAds.dll" -r "/Users/Dermot/Projects/Bump3Binding/Bump3Binding/bin/Release/Bump3Binding.dll" -debug -profiling -linksdkonly -sdk "5.1" -targetver "4.3" --armv7 "--nomanifest" "/Users/Dermot/Projects/Apollo/Apollo/bin/iPhone/Debug/GroovePond.exe"

Im not sure if the above output is of any use, or if it causes the problem in any way.
Comment 2 Dermot 2012-07-07 00:25:21 UTC
Created attachment 2166 [details]
Build output of app with same libraries that doesnt crash
Comment 3 Dermot 2012-07-07 00:26:04 UTC
Created attachment 2167 [details]
Screenshot of build output just before crash

Unable to get a text copy
Comment 4 Dermot 2012-07-07 00:33:13 UTC
I have removed the references to the AdMob dll binding, removed the modified (as described above via workaround) bump binding and re-added a reference to the original working bump binding.

The crash of monodevelop still occurs, even though everything has been changed back to the way it was. Something seems to have been modified in my project settings and not changed back.
Comment 5 Dermot 2012-07-07 01:58:50 UTC
Ok, I got around the problem by re-creating my project and re-adding all my files and configurations (My project was overdue a cleanup/refactor anyway :-) ) I hope the info I provided can assist in fixing this problem, but as of now it is working for me.
Comment 6 Dermot 2012-09-15 21:46:00 UTC
This hasn't happened in months. I assume it has been fixed in a recent release of MonoDevelop