Post

Replies

Boosts

Views

Created

Crash on removal of QLPreviewController and _EXRemoteViewController
I have a controller that displays a pdf using UIDocumentInteractionController as the presented view. When users open it up, it shows fine. User gets the app backgrounded and session timed out. After timed out, when the app is brought to foreground, I bring our loginVC by removing the old VC used to show the UIDocumentInteractionController. All the crashes are happening at this point. I am not able to reproduce it, but our alert systems show we have crashes happening. The code that shows the pdf is straight forward documentViewController = UIDocumentInteractionController() documentViewController?.delegate = self documentViewController?.url = url documentViewController?.presentPreview(animated: true) and we reset it to nil in delegate documentInteractionControllerDidEndPreview Based on the crash trace, it seems like the crash happens when our login VC replaces it and only when pdf was displayed. The reason of stressing ONLY because when we have other viewcontroller present and they are removed in a similar way, we do not see any issue. So we always replace first and then add a new one childViewController.willMove(toParent: nil) childViewController.viewIfLoaded?.removeFromSuperview() childViewController.removeFromParent() addChild(childViewController) view.addSubview(childViewController.view) childViewController.view.frame = view.bounds childViewController.didMove(toParent: self) Raised a ticket with Apple, but I haven't heard back, and it's been a month. Posting here in case anyone experiences the same and has any solutions. I saw some related posts, and solution was to remove the pdf the moment the app goes to the background, but I am trying to find some alternate solution if possible.
Topic: UI Frameworks SubTopic: UIKit
0
0
201
Mar ’25
Crash on _UIButtonBarItemLayout _updateItemView
With iOS 26.1 and beta 26.2, there is a crash seen for _UIButtonBarItemLayout update. Has anyone experienced this crash or has any information on this Thread 0 name: Thread 0 Crashed: 0 libobjc.A.dylib 0x000000019daa144c objc_retain + 16 1 UIKitCore 0x00000001a680b184 -[_UIButtonBarItemLayout _updateItemView] + 360 2 UIKitCore 0x00000001a6d5ddcc -[_UIButtonBarItemLayout minimumLayoutWidthGivenMinimumSpaceWidth:] + 28 3 UIKitCore 0x00000001a6d5eeec -[_UIButtonBarItemGroupLayout recalculateLayoutWidthsGivenItemSpaceWidth:] + 304 4 UIKitCore 0x00000001a6d4ca28 -[_UIButtonBar _widthInfoForLayout:] + 188 5 UIKitCore 0x00000001a68093b4 -[_UIButtonBar _layoutBar] + 108 6 UIKitCore 0x00000001a6809328 __42-[_UIButtonBarStackView updateConstraints]_block_invoke + 44 7 UIKitCore 0x00000001a7dbea8c +[UIView(Animation) performWithoutAnimation:] + 76 8 UIKitCore 0x00000001a68092d0 -[_UIButtonBarStackView updateConstraints] + 112 9 UIKitCore 0x00000001a64707e8 -[UIView(AdditionalLayoutSupport) _previousFittingSizeInfo] + 784 10 UIKitCore 0x00000001a6470508 -[UIView(AdditionalLayoutSupport) _previousFittingSizeInfo] + 48
Topic: UI Frameworks SubTopic: UIKit
3
2
151
Nov ’25