App hangs on navigation bar rendering cycle

We are currently having an issue with our app hanging for some (not all) of our iOS 26.x users. The hang lasts long enough for the system to kill the app after a while.

As of now we are unable to reproduce the issue on our own test devices, yet users dealing with the issue can produce it consistently.

Looking at the stack traces we managed to retrieve, the hangup seems to occur in the layout rendering cycle of the navigation bar in the UINavigationController. The hangup doesn't happen at the exact same stack trace every time. But it always seems to be in the rendering cycle.

Since the issue not reproducable in our own test environment it's hard to properly debug.

The only adjustments to the navigationbar/navigationitem in our code is setting the title and a few bar buttons:

self.navigationItem.title = NSLocalizedString("main_list_title", comment: "")
        
let cancelItem = UIBarButtonItem(barButtonSystemItem: .stop, target: self, action: #selector(cancelListSelection))
        let addPostItem = UIBarButtonItem(image: UIImage(named: "AddButton"), style: .plain, target: self, action: #selector(addItemTapped))
let extraMenuItem = UIBarButtonItem(image: UIImage(named: "ExtraButton"), style: .plain, target: self, action: #selector(extraItemTapped))
        
self.navigationItem.setLeftBarButton(cancelItem, animated: true)
       self.navigationItem.setRightBarButtonItems([addPostItem, extraMenuItem], animated: true)
        
let previousButton = UIBarButtonItem(image: UIImage(named: "LeftArrow"), style: .plain, target: self, action: #selector(openPrevious))
let nextButton = UIBarButtonItem(image: UIImage(named: "RightButton"), style: .plain, target: self, action: #selector(openNext))
        
self.setToolbarItems([previousButton, nextButton], animated: true)

And for one or two controllers the title is replaced by a UISegmentControl:

let segControl = UISegmentedControl(items: ["1", "2", "3"]);
segControl.selectedSegmentIndex = 0
segControl.addTarget(self, action: #selector(segmentValueChanged), for: .valueChanged)
self.navigationItem.titleView = segControl

Is anyone familiar with hangs at these particular stack traces and their cause?

Thanks for the interesting post and the stack trace files. I was wondering that if is a hang you can actually provide the hang files from the sysdiagnose so we can see where is it hanging?

On the stack traces you provided, there is a layout loop occurring entirely within UIKit? If so the system will eventually killing the app and you’ll get a hang tile because the main thread is stuck in this cycle and becomes unresponsive.

In the stack trace 2 there is a xamarin_UIApplicationMain` Are you using the 3rd party tool?

You should check with the support resources provided by the 3rd party to get assistance with their software.

Unless another developer in the forums has experience with the third-party and can provide assistance.

Albert  WWDR

App hangs on navigation bar rendering cycle
 
 
Q