Bug 7380 - MonoTouch 6 App Crashes immediately in iOS 5.x Simulators
Summary: MonoTouch 6 App Crashes immediately in iOS 5.x Simulators
Alias: None
Product: iOS
Classification: Xamarin
Component: Tools ()
Version: 6.0.x
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Rolf Bjarne Kvinge [MSFT]
Depends on:
Reported: 2012-09-21 08:33 UTC by cmck
Modified: 2013-06-19 07:12 UTC (History)
6 users (show)

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

Sample Project (5.82 MB, application/zip)
2012-09-21 08:33 UTC, cmck
simlauncher.zip (5.31 MB, application/zip)
2012-09-21 09:54 UTC, Rolf Bjarne Kvinge [MSFT]
Simulator App Crash File (46.94 KB, application/octet-stream)
2012-09-27 04:48 UTC, cmck
Console output during crash (1.58 KB, text/plain)
2012-09-27 04:49 UTC, cmck
Build log (8.34 KB, text/plain)
2012-09-27 08:59 UTC, cmck
Crash Log file (28.93 KB, application/octet-stream)
2012-10-04 07:24 UTC, jan
iOS Simulator 5.1 crash log (28.94 KB, application/octet-stream)
2012-10-04 07:35 UTC, jan

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 cmck 2012-09-21 08:33:40 UTC
Created attachment 2591 [details]
Sample Project

MonoTouch 6 App Crashes immediately in iOS 5.x Simulators

As far as I can see no code in my app is executed at all, breakpoints in Main are not hit and the Application Log from MonoDevelop is: 

Starting iOS simulator 5.1 
Launching application 
Application launched. PID = 286 

Application Terminated 

Note that iOS 5 & 6 devices work fine, as does the iOS 6 Simulator.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-09-21 09:04:29 UTC
This is a known bug I thought was fixed :|
Comment 2 Rolf Bjarne Kvinge [MSFT] 2012-09-21 09:52:18 UTC

*** This bug has been marked as a duplicate of bug 6513 ***
Comment 3 Rolf Bjarne Kvinge [MSFT] 2012-09-21 09:54:59 UTC
Created attachment 2592 [details]

Here is a hotfix until MonoTouch 6.0.1 is released: unzip the contents of the provided zip file into /Developer/MonoTouch/usr/bin.
Comment 4 cmck 2012-09-26 06:33:14 UTC
I've just tried 6.0.1 and the app still won't run in the 5.x simulators. Symptoms are as before, the app exits before any code is executed.
Comment 5 Rolf Bjarne Kvinge [MSFT] 2012-09-26 06:56:27 UTC
Can you try the hotfix in comment #3 to see if it works for you?.
Comment 6 cmck 2012-09-26 13:10:10 UTC
Same results crashes immediately using the hotfix.
Comment 7 Rolf Bjarne Kvinge [MSFT] 2012-09-26 16:45:16 UTC
cmck, is anything printed in the Console app (Applications/Utilities/Console) when the app crashes in the simulator?
Comment 8 cmck 2012-09-27 04:48:39 UTC
Created attachment 2633 [details]
Simulator App Crash File
Comment 9 cmck 2012-09-27 04:49:15 UTC
Created attachment 2634 [details]
Console output during crash
Comment 10 Rolf Bjarne Kvinge [MSFT] 2012-09-27 08:00:01 UTC
Strange, this does not happen with the test project in comment #1 for me (nor have I seen this particular crash before).

1) Which version of Xcode do you have installed?
2) Can you add "-v -v -v" to the additional mtouch arguments, rebuild your project and attach the full build log?
Comment 11 cmck 2012-09-27 08:59:14 UTC
Created attachment 2636 [details]
Build log

 It crashes for me everytime!

1) Xcode 4.5
2) Attached.
Comment 13 cmck 2012-09-28 06:16:46 UTC
Thanks Rolf, 

I tried a few variations:

1. mtouch hotfix & -nofastsim -> Crash
2. motouch hotfix & remove -nofastsim -> Works!
3. no mtouch hotfix & remove -nofastsim -> Works!

Your previous simlauncher scripts are also in place so I'm not sure what exactly fixed it.
Comment 14 Rolf Bjarne Kvinge [MSFT] 2012-09-28 17:56:26 UTC
I believe at least the simlauncher binaries work now (they aren't used if you pass -nofastsim).

I'll put these fixes in the next 6.0 release (probably 6.0.3), if you run into problems again just reopen the bug report.
Comment 15 jan 2012-10-04 05:36:13 UTC

I installed the MonoTouch 6.0.3 beta because it listed that it fixed this problem. After installing my simulator still crashes.
I also copied the simlaunchers but no luck.

Any ideas on what I should do next?

Comment 16 Rolf Bjarne Kvinge [MSFT] 2012-10-04 07:14:17 UTC
Jan, can you attach the crash report that is generated?
Comment 17 jan 2012-10-04 07:24:02 UTC
Created attachment 2683 [details]
Crash Log file
Comment 18 jan 2012-10-04 07:24:36 UTC
Hi Rolf,

as you can see, I've added the crash log. Hope it helps!
Comment 19 Rolf Bjarne Kvinge [MSFT] 2012-10-04 07:28:52 UTC
Jan, have you tried the 5.1 simulator (as opposed to the 5.0 simulator)? do you get the same crash then?
Comment 20 jan 2012-10-04 07:35:20 UTC
Created attachment 2684 [details]
iOS Simulator 5.1 crash log


the iOS 5.1  crashes the same way. I've added the crash log as an attachment.
Comment 21 Rolf Bjarne Kvinge [MSFT] 2012-10-04 17:06:10 UTC
Jan, can you do the following:

1) Make sure you're not using the simlaunchers from comment 3 or mtouch from comment 12 (the easy way to do this is to re-install MonoTouch).
2) Create a new project from a template, try to run it in the 5.1 simulator.
3) Add -nofastsim to the additional mtouch arguments in the project's iPhone Build options page, and try again in the 5.1 simulator.
Comment 22 jan 2012-10-06 05:25:34 UTC

I reinstalled MonoTouch 6.0.2, and created a new project. Here's what I found.

- The clean project runs in both the 5.0 and 5.1 simulator.
- Adding '-nofastsim' crashes the simulator with the following error:

dyld: Symbol not found: ___CFObjCIsCollectable
  Referenced from: /System/Library/Frameworks/Security.framework/Versions/A/Security
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation
 in /System/Library/Frameworks/Security.framework/Versions/A/Security

(I was not able to find a crash report)

- Remove '-nofastsim' again, and everything runs smooth again.

Q: Is there something I can do to make my current (iOS 5) projects run the simulator?

Comment 23 jan 2012-10-06 05:32:09 UTC
Additionally, I installed the MonoTouch 6.0.4 beta. The same application runs fine without '-nofastsim', however, I get a different error when running with '-nofastsim':

dyld: Symbol not found: _OBJC_CLASS_$_NSObject
  Referenced from: /Users/janvdp/Library/Application Support/iPhone Simulator/5.1/Applications/0D202537-5771-483D-ACD4-289E156C0199/quicktest.app/quicktest
  Expected in: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/usr/lib/libobjc.A.dylib
 in /Users/janvdp/Library/Application Support/iPhone Simulator/5.1/Applications/0D202537-5771-483D-ACD4-289E156C0199/quicktest.app/quicktest
Comment 24 Rolf Bjarne Kvinge [MSFT] 2012-10-08 07:08:43 UTC
Can you zip up "/Users/janvdp/Library/Application Support/iPhone
Simulator/5.1/Applications/0D202537-5771-483D-ACD4-289E156C0199/quicktest.app" and attach it /send it to me?
Comment 25 jan 2012-10-08 07:40:13 UTC
Hi Rolf,

The zipped app is in your mail :)
Comment 26 Randy 2012-10-08 15:10:18 UTC
I've been having the same issue with Monotouch 6.0.2 and Xcode 4.5 and simulator 5.1. The app runs properly in the 6.0 simulator but crashes before starting in the 5.1. simulator. Checking the crash log, I'm getting the same error "dyld: Symbol not found: _OBJC_CLASS_$_NSObject" that the original poster is getting.

I've tried the -nofastsim flag and there is no change.

However I found if I go to the 'iphone build' page and change the SDK version from 'default' to '5.1' it runs properly.
Comment 27 Rolf Bjarne Kvinge [MSFT] 2012-10-09 08:11:30 UTC
I finally found out what's wrong (and fixed it).

master: b6d812027423e4925d9d0691764f530fbe5bdc8d
ios6: ce3e3a9f5912a714f114556c70391b0f577c0c0c

The next release with this fix should be 6.0.5.
Comment 28 Martin Krafft 2012-10-18 03:44:33 UTC
Do you have a estimate for when the 6.0.5 version will be released.
I am having this issue on iOS 5.x when importing the Facebook SDK bindings.
Comment 29 Rolf Bjarne Kvinge [MSFT] 2012-10-18 04:27:16 UTC
Martin, we've started the release process for 6.0.5, and if nothing goes wrong it should be out within a week.
Comment 30 Mohit Kheterpal 2013-06-19 07:12:03 UTC
Today we have checked this issue on following builds :

XS 4.0.8
Mono 3.0.11
Xcode 4.4.1

Now we are able to build / run application on device or simulator without any
Hence closing this issue. Changing its status to verified.