Android crash on navigate back from tab 2 without Shell #15687
Labels
area-controls-tabbedpage
TabbedPage
area-navigation
NavigationPage
high
It doesn't work at all, crashes or has a big impact.
platform/android 🤖
s/triaged
Issue has been reviewed
s/try-latest-version
Please try to reproduce the potential issue on the latest public version
s/verified
Verified / Reproducible Issue ready for Engineering Triage
t/bug
Something isn't working
Description
I have created a very simple app with only a
MainPage
and aTabbedPage
with its tabs at the bottom. Navigation is done without aShell
, so theApp
's main page is actually aNavigationPage
. Pushing theTabbedPage
onto the navigation stack automatically creates the navigation bar with a back button at the top (as expected, and to my current knowledge, absolutely impossible to do with aShell
). When navigating from the 2nd tab of theTabbedPage
back to theMainPage
via the back button, the app crashes with aNullReferenceException
.Strangely enough, if the
TabbedPage
only contains 2 tabs, or if the tabs are at the top, the app doesn't crash, and when it contains more than 2 bottom tabs, the crash only happens from the 2nd tab.It happens on Android simulator as well as on an Android device and I only tested .NET 7 and latest .NET 8 preview. Doesn't happen on iOS (simulator or device).
I'd like to know if it's only on my machine (mac), or if it's a general issue.
Thanks
Steps to Reproduce
AppShell
(xaml and xaml.cs)App.xaml.cs
constructor to initialise theNavigationPage
TabbedPage
at the root of the project with 3ContentPage
s, call itMyTabbedPage
(notice the Android specific argument on theTabbedPage
node to make the tabs appear at the bottom)MainPage
to navigate to theTabbedPage
TabbedPage
via the button on theMainPage
Link to public reproduction project repository
https://github.com/sebdesalvador/ThreeTabsCrash
Version with bug
8.0.0-preview.5.8529
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Pixel 5 - API 33
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: