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.
I have recently updated to Lion, and am running monotouch v 5.2.11
I have just noticed that if you subscribe to the DidDismiss or the WillDismiss events then present the view using PresentViewController or PresentModalViewController we get an exception.
If animated = true the error happens on show, if false the the error is on dismiss.
This has only come up in a recent build. the code i am running has not changed for a good while.
The Exception is:
Message : Exception of type 'System.Exception' was thrown.
at MonoTouch.QuickLook.QLPreviewController+_QLPreviewControllerDelegate.FrameForPreviewItem (MonoTouch.QuickLook.QLPreviewItem item, MonoTouch.UIKit.UIView view) [0x00019] in /Developer/MonoTouch/Source/monotouch/src/QuickLook/QLPreviewController.g.cs:264
at (wrapper managed-to-native) MonoTouch.ObjCRuntime.Messaging:void_objc_msgSendSuper_IntPtr_bool_IntPtr (intptr,intptr,intptr,bool,intptr)
at MonoTouch.UIKit.UIViewController.PresentViewController (MonoTouch.UIKit.UIViewController viewControllerToPresent, Boolean animated, MonoTouch.Foundation.NSAction completionHandler) [0x00064] in /Developer/MonoTouch/Source/monotouch/src/UIKit/UIViewController.g.cs:481
at PreviewerTest.PreviewerTestViewController.ShowPreviewer () [0x0002f] in /Users/philipjames/Projects/PreviewerTest/PreviewerTest/PreviewerTestViewController.cs:71
This exception means that there is no handler for the FrameForPreviewItem event. Do you have such a handler in your code? Maybe you can provide a test case we can try out?
Created attachment 1784 [details]
Solution showing Previewer Issue
This is a simplified version, but is basically what i call in my project to create this issue
The exception message has been improved now, in the next beta release (5.3.4) we'll now say: "No event handler has been added to the FrameForPreviewItem event.""
This has now been fixed (monotouch master 0e24930ad4d), an event handler will not be required for this event starting with MonoTouch 5.3.4.
In the meantime you can add an event handler like this as a workaround:
preview.FrameForPreviewItem += (QLPreviewItem sender, UIView view) => RectangleF.Empty;
*** Bug 4906 has been marked as a duplicate of this bug. ***