Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust view hierarchy after view transition #1612

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

SystemKeeper
Copy link
Collaborator

There are multiple reports of crashes since iOS 17.0 that happen in the SplitViewController but outside of our code. After trying to reproduce the issue, I was able the generate the following crash:

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Layout requested for visible navigation bar, <UINavigationBar: 0x10760d190; frame = (0 53.6667; 393 44); autoresize = W; tintColor = UIExtendedSRGBColorSpace 1 1 1 1; layer = <CALayer: 0x302fde760>> delegate=0x108820c00, when the top item belongs to a different navigation bar. topItem = <UINavigationItem: 0x10752ee90> style=navigator standardAppearance=0x300ba3420 scrollEdgeAppearance=0x300ba1620 compactAppearance=0x300ba1200, navigation bar = <UINavigationBar: 0x1076044a0; frame = (0 -97.6667; 393 44); hidden = YES; autoresize = W; tintColor = UIExtendedSRGBColorSpace 1 1 1 1; layer = <CALayer: 0x302fd5200>> delegate=0x108837e00 standardAppearance=0x300bfe760, possibly from a client attempt to nest wrapped navigation controllers.'

Steps to reproduce were:

  • Start in portrait orientation
  • Tap a conversation to join
  • Rotate the device

Best reproducible was while starting from debugger, because of the slight delay at the start of the app. It only happens when switch to the ChatViewController happens while transitioning to landscape mode. In this case the navigationBar wrongfully references the placeholderView. After trying to return to the conversation list, the app crashes, because the placeholderView is referenced another time. Before iOS 17 the app would not crash, but we have seen cases, where the navigationBar was not correctly displayed, so it might be the same root cause.

Signed-off-by: Marcel Müller <marcel-mueller@gmx.de>
@Ivansss Ivansss merged commit 6305c09 into master Apr 5, 2024
10 checks passed
@Ivansss Ivansss deleted the fix-view-hierachy-after-transition branch April 5, 2024 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants