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 22543 [details]
App with reproduction
Using an iPad:
Navigation page containing a master detail page
Detail page has a button to navigate to a new page
Open the master page
Close it, and whilst it is still closing tap the button to open the new page
The app will freeze, and when you next tap on it you get a crash:
Foundation.MonoTouchException: Objective-C exception thrown. Name: NSInvalidArgumentException Reason: -[UIPopoverController _presentPopoverBySlidingIn:fromEdge:ofView:animated:stateOnly:notifyDelegate:]: Popovers cannot be presented from a view which does not have a window.
This looks like it is the same as https://bugzilla.xamarin.com/show_bug.cgi?id=53225
This only happens on iPads, not on iPhones. This is using the latest stable with Forms 188.8.131.52.
Attached is an app that reproduces the issue. It's not easy to do as you have to time it just right. The trick is to slide the master page in and out hopping your finger off and tapping the click me button. You'll see the second page (blue) with the master over it slightly, then the next tap will crash.
Installed Xamarin version:
Visual Studio Enterprise 2017 for Mac
Version 7.0.1 (build 24)
Installation UUID: ef1cd3a3-74fa-4386-aec6-6ed4bd753405
Mono 184.108.40.206 (2017-02/5077205) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Package version: 500010001
Runtime: Not installed
SDK: Not installed
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.0.1/lib/mono/msbuild/15.0/bin/Sdks
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler
Version: 220.127.116.11 (Visual Studio Enterprise)
Android SDK: /Users/jim.bennett/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
6.0 (API level 23)
7.1 (API level 25)
SDK Tools Version: 26.0.2
SDK Platform Tools Version: 25.0.5
SDK Build Tools Version: 23.0.2
Java SDK: /usr
java version "1.8.0_102"
Java(TM) SE Runtime Environment (build 1.8.0_102-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode)
Android Designer EPL code available here:
Apple Developer Tools
Xcode 8.3.2 (12175)
Version: 18.104.22.168 (Visual Studio Enterprise)
Version: 10.10.0.36 (Visual Studio Enterprise)
Build date: 2017-05-22 16:30:53-0400
Build date: Fri, 21 Apr 2017 17:57:12 GMT
Release ID: 700010024
Git revision: 7ab1ca2ced6f584e56b7a0d4d321d00775cd95c9
Build date: 2017-05-19 05:44:51-04
Xamarin addins: 08d17158f3365beee5e60f67999e607cce4b3f93
Build lane: monodevelop-lion-d15-2
Mac OS X 10.12.5
Darwin 16.6.0 Darwin Kernel Version 16.6.0
Fri Apr 14 16:21:16 PDT 2017
Enabled user installed addins
NuGet Package Management Extensions 0.12.2
Redth's Addins 1.0.6
Straight8's SpecFlow Intergration 22.214.171.124
Created attachment 22544 [details]
Video showing reproduction
I'm able to reproduce this using the app provided. As described, I swipe off the edge to get the master panel while attempting to also tap the Click Me button. Same crash report.
I'm not sure how far you're into development, and I'm also not sure if this was working for you in previous versions of XF. However, pushing a MasterDetailPage onto a NavigationPage is not a recommended design pattern according to Apple.
Please see https://developer.apple.com/documentation/uikit/uisplitviewcontroller where they have the following:
You cannot push a split view controller onto a navigation stack. Although it is possible to install a split view controller as a child in some other container view controllers, doing is not recommended in most cases. Split view controllers are normally installed at the root of your app’s window. For tips and guidance about ways to implement your interface, see iOS Human Interface Guidelines."
What this is saying is MasterDetailPage must be the root of your application. Since iOS does not support your scenario, I'm not sure how much Xamarin should dig into their codebase to fix your issue. This is of course assuming the issue has to do with your design choice but not some other root cause. I know you've mentioned it works on iPhone, so maybe there is something to be fixed for iPad, but in the long run, I recommended that you change your design pattern.
As a workaround, you can try pushing the MasterDetailPage as a modal and see what happens.
I created a PR to issue a warning to console:
This warning is currently shown for both phone and tablet.
We now send a Debug message with the information about the issue and best pratices.