Bug 6235 - Calling overriden UIViewController.PresentViewController from objc crashes
Summary: Calling overriden UIViewController.PresentViewController from objc crashes
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 5.2
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: 7.2.0 (iOS 7.1)
Assignee: Rolf Bjarne Kvinge [MSFT]
Depends on:
Reported: 2012-07-23 08:05 UTC by Michal
Modified: 2014-02-27 00:43 UTC (History)
6 users (show)

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

Sample app. (9.87 KB, application/zip)
2012-07-23 08:05 UTC, Michal

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 Michal 2012-07-23 08:05:40 UTC
Created attachment 2244 [details]
Sample app.

Application crashes when some objc code needs to call PresentViewController method which is overriden in C# code. Please see attached sample app.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2012-07-23 08:58:03 UTC
This is because we currently do not support conversion from ObjC blocks to C# delegates, only the reverse.

This is also related to bug #4781.
Comment 2 Michal 2012-07-25 07:45:19 UTC
Oh, ok. I made a workaround by creating custom view controller in objc and binding it to monotouch.

Comment 5 PJ 2013-11-19 16:45:00 UTC
This bug was targeted for a past milestone, moving to the next non-hotfix active milestone.
Comment 6 Sebastien Pouliot 2014-02-25 15:48:30 UTC
This was fixed around XI 7 IIRC. The sample app works fine now.
Comment 7 narayanp 2014-02-27 00:43:31 UTC
I have checked this issue with following builds

All Mac
X.S 4.2.3(build 59)
Mono 3.2.7

I am successfully able to run the attached sample on device. no crash happens.