Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 1375 [details]
simple test app with three tabs and view controllers
OS X 10.7.3
iOS 5.0 SDK
After upgrading to latest XCode and MT, when launching my app in the simulator it renders correctly, but trying to click on any UI element causes a crash.
I created a simple test project (attached) that displays the same behavior. Clicking on the tab bar after launch causes a crash.
at (wrapper managed-to-native) MonoTouch.UIKit.UIApplication.UIApplicationMain (int,string,intptr,intptr) <0xffffffff>
at MonoTouch.UIKit.UIApplication.Main (string,string,string) <0x000b7>
at TestApp.Application.Main (string) <0x00017>
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object (object,intptr,intptr,intptr) <0xffffffff>
0 TestApp 0x000908ec mono_handle_native_sigsegv + 284
1 TestApp 0x00005c88 mono_sigsegv_signal_handler + 248
2 libsystem_c.dylib 0x9763159b _sigtramp + 43
3 ??? 0xffffffff 0x0 + 4294967295
4 CoreFoundation 0x011ae032 -[__NSArrayM getObjects:range:] + 626
5 CoreFoundation 0x01158f14 __NSArrayChunkIterate + 308
6 CoreFoundation 0x01124665 __NSArrayEnumerate + 997
7 CoreFoundation 0x01124056 -[NSArray enumerateObjectsWithOptions:usingBlock:] + 102
8 UIKit 0x021c4c43 -[UIView(Geometry) hitTest:withEvent:] + 646
9 UIKit 0x024f4fbf -[UIStatusBarWindow hitTest:withEvent:] + 78
10 UIKit 0x021bf42d +[UIWindow _hitTestToPoint:pathIndex:forEvent:] + 378
11 UIKit 0x02191253 _UIApplicationHandleEvent + 1966
12 GraphicsServices 0x0478afa9 PurpleEventCallback + 1274
13 CoreFoundation 0x011951c5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
14 CoreFoundation 0x010fa022 __CFRunLoopDoSource1 + 146
15 CoreFoundation 0x010f890a __CFRunLoopRun + 2218
16 CoreFoundation 0x010f7db4 CFRunLoopRunSpecific + 212
17 CoreFoundation 0x010f7ccb CFRunLoopRunInMode + 123
18 GraphicsServices 0x04789879 GSEventRunModal + 207
19 GraphicsServices 0x0478993e GSEventRun + 114
20 UIKit 0x02190a9b UIApplicationMain + 1175
21 ??? 0x09ff6774 0x0 + 167733108
22 ??? 0x09ff5958 0x0 + 167729496
23 ??? 0x09ff57f0 0x0 + 167729136
24 ??? 0x09ff587f 0x0 + 167729279
25 TestApp 0x00009ff2 mono_jit_runtime_invoke + 722
26 TestApp 0x00169eee mono_runtime_invoke + 126
27 TestApp 0x0016dfd4 mono_runtime_exec_main + 420
28 TestApp 0x001733f5 mono_runtime_run_main + 725
29 TestApp 0x000671f5 mono_jit_exec + 149
30 TestApp 0x002116c9 main + 2825
31 TestApp 0x00003045 start + 53
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries
used by your application.
It works for me but my environment is a bit different (someone else will be trying this with an environment closer to yours).
In the meantime could you attach the full build log (add a few "-v" to the "additional mtouch arguments) used to build your application and the "Application Output" content before the crash too ? Thanks
Created attachment 1376 [details]
Build output attached.
The only application output is the stack trace.
weird, don't you see (in light grey, not black) something like:
Starting iOS simulator 5.0
Application launched. PID = 68927
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/monotouch.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.Core.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.dll [External]
Loaded assembly: /Users/poupou/Downloads/testapp/TestApp/bin/iPhoneSimulator/Debug/TestApp.exe
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/Mono.Security.dll [External]
Loaded assembly: /Developer/MonoTouch/usr/lib/mono/2.1/System.Xml.dll [External]
Nope. I vaguely recall it used to do that, but I'm not seeing it now.
Hey all, I have checked this bug on:
OS X 10.7.3
iOS 5.0 SDK
(exact same environment, as far as these variables are concerned)
I ran the test case in the simulator and on an iPad2 in both Debug and Release.
I found I could switch the tab selector around with no issues each time.
Wish I could have found the issue for ya, but we'll have to do more sleuthing.
I installed the MT and Mono updates BEFORE I installed the new XCode. Could that have any impact?
Jason, I don't see how... but re-installing should not hurt either (it won't even be "on-top" if it since they are now located in totally different locations).
It's also strange that it does not look like the original report you gave on the mailing-list. Something went wrong somewhere... I hope we'll pinpoint it quickly.
What's the best approach to reinstall? It tried downloading the MT installer from my purchases page, but it didn't appear to do anything (presumably it already detected the install).
Reinstalling MT and Mono SDK didn't have any impact.
I have seen this before.
The fix is to make the iPhone simulator default to the iOS 5 SDK.
The only way I have found to change the simulator version is to wait for the simulator crash and then a dialog is shown that offers you to pick a different SDK:
And then pick the 5.0 version.
I do not know how to do this programmatically, other than waiting for the crash.
Weird... it is indeed launching the simulator v4.3.2, even though I specified 5.0 in MD. If I switch it with the Hardware --> Version menu to 5.0 and relaunch, it seems to work.
Now that I've done that, if I kill the simulator and run again, it comes up in 5.0
Thanks, Miguel, Sebastien & company...
Now, if I could only figure out how to programmatically set the SDK to 5.0, we would be all set.
Reopening after changing the subject of the bug.
This is strange. I can reproduce this bug by running an app in the simulator from MonoDevelop, and then in the simulator menu choose Hardware -> Version -> 4.3.2 (8H7). The app will be killed. Run the app again (without exiting the simulator) and now it crashes when you touch anything.
The strange part is that the 4.3.2 (8H7) menu entry does not show up if I run the exact same mtouch command as MonoDevelop does from a terminal.
This should be fixed now (md-addins: e9ac70a).
The fix will probably be in the next MonoDevelop update. In the meantime there is a workaround in comment #13.
*** Bug 3425 has been marked as a duplicate of this bug. ***