Layering Bug in PageControl with MapView

Dear Fuse-Team :slight_smile:

Sadly (or gladly ^^) I found a bug with a nested navigation via PageControl and a MapView on a subpage :frowning:

To demonstrate the bug, I created a little test app :slight_smile:

I only colored one site red (the first one), to which I will navigate again at the end resulting in the bug, displaying a Map from a different subpage ontop of the red one…

To follow the navigation process, just keep clicking on the text-buttons you see :wink:


Code unoproj:

{
"RootNamespace":"",
  "Android": {
   "Geo": {
        "ApiKey": "---YOUR_KEY_HERE---"
    }
},
  "Packages": [
    "Fuse",
    "Fuse.Maps",
    "FuseJS"
  ],
  "Includes": [
    "*.ux"
  ]
}

Code ux:

<App>
    <PageControl ux:Name="MainNavigation" Active="Page1" Interaction="None">
        <NavigationMotion GotoType="SmoothSnap" GotoDuration="0.08" />

        <Page ux:Name="Page1" Background="#F00">
            <Text Value="Page 1" Alignment="Center">
                <Clicked>
                    <Set MainNavigation.Active="Page2" />
                </Clicked>
            </Text>
        </Page>

        <Page ux:Name="Page2" >
            <PageControl ux:Name="SubNavigation" Active="subpage2" Interaction="None">
                <NavigationMotion GotoType="SmoothSnap" GotoDuration="0.08" />

                <Page ux:Name="subpage1">
                    <Text Value="Sub-Page 1" Alignment="Center">
                        <Clicked>
                            <Set SubNavigation.Active="subpage1" />
                        </Clicked>
                    </Text>
                </Page>

                <Page ux:Name="subpage2" >
                    <DockPanel>
                        <Fuse.iOS.StatusBarConfig Style="Dark" />
                        <StatusBarBackground Dock="Top"/>

                        <NativeViewHost>
                            <MapView ux:Name="panel2" Margin="0,0,0,0" Height="100%" Latitude="50.9303675" Longitude="6.950763000000052" Zoom="12" ShowMyLocationButton="true" > 
                            </MapView>
                        </NativeViewHost>

                        <Panel Dock="Bottom" Height="47">
                            <Text Value="Sub Page 2" Alignment="Center">
                                <Clicked>
                                    <Set SubNavigation.Active="subpage3" />
                                </Clicked>
                            </Text>
                        </Panel>
                    </DockPanel>
                </Page>

                <Page ux:Name="subpage3">
                    <Text Value="Sub Page 3" Alignment="Center">
                        <Clicked>
                            <Set MainNavigation.Active="Page3" />
                        </Clicked>
                    </Text>
                </Page>

            </PageControl>
        </Page>

        <Page ux:Name="Page3">
            <Text Value="Page 3" Alignment="Center">
                <Clicked>
                    <Set MainNavigation.Active="Page1" />
                </Clicked>
            </Text>
        </Page>

    </PageControl>
</App>


Specs:

  • Fuse_ver: 0.23.0 build 7041
  • OS: OSX 10.11.6

Xcode-Output after clicking the first Text-button (app keeps running - No further logs on any other buttonpresses):

2016-08-11 04:05:53.462 MapViewBug[1706:848618] Unable to simultaneously satisfy constraints.
    Probably at least one of the constraints in the following list is one you don't want. 
    Try this: 
        (1) look at each constraint and try to figure out which you don't expect; 
        (2) find the code that added the unwanted constraint or constraints and fix it. 
    (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
(
    "<NSAutoresizingMaskLayoutConstraint:0x4627c2b0 h=-&- v=-&- MKMapView:0x462c2ec0.height == UIView:0x462c2db0.height>",
    "<NSLayoutConstraint:0x462c8210 UILayoutGuide:0x462c8100'Edge Insets'.top == MKMapView:0x462c2ec0.top + 20>",
    "<NSLayoutConstraint:0x462c83c0 UILayoutGuide:0x462c8100'Edge Insets'.bottom == MKMapView:0x462c2ec0.bottom>",
    "<NSLayoutConstraint:0x41eebf50 'UIView-Encapsulated-Layout-Height' V:[UIView:0x462c2db0(0)]>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x462c83c0 UILayoutGuide:0x462c8100'Edge Insets'.bottom == MKMapView:0x462c2ec0.bottom>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.


I hope that I put everything you need together, if not please tell me :slight_smile:

Sorry for the long post :stuck_out_tongue:

Gratefully

Blade


EDIT: Here is the visual proof :wink:

I have this exact same result in XCode when using MapView within a PageControl.

Hello mrcl3an2008 !

Thank you for telling me, im not the only one ^^

Do you think I missed anything in my report? Since Im still a noob, I wanna make sure I did everything properly.

Cheers

Blade

Hey guys, cool to see people coming up with smaller test cases to illustrate bugs.

Adding a link for reference, since this one has been covered in another forum thread, here: https://www.fusetools.com/community/forums/permalink/dc51f1fd-1a77-4d3e-9f93-d739bdbe1ef5

All that said, Fuse team has been specifically notified about this issue in both of the forum threads, and I assume they’ll notify us here when they get to it, priorities permitting.

Just to be sure, I’ve linked our internal issue for the other thread to this one as well.

OMG Jake Taylor himself answered to my noob-post :slight_smile:

Im feeling honored!! Thank you very much <3

:smiley: