Post

Replies

Boosts

Views

Activity

Reply to Vertical tab bar doesn't appear when tab bar controller is added to view controller while iPhone Duo is unfolded
We see a related case on iPhone Duo with Xcode 27.2 and the iOS 27.2 simulator. A container view controller sizes a child UITabBarController with Auto Layout constraints. If the Duo opens while a full-screen modal covers the container, the side bar is empty after the modal closes. At viewIsAppearing, the child still has the folded frame, so this looks like the same root cause as FB25261013. A flexible autoresizing mask on the child view avoids it. I filed FB25719774 with a small sample project. But that workaround caused a second issue on iOS 17.5: after rotation, a compositional layout in the child kept the old size classes. I filed it as FB25719805. So we now use the autoresizing mask only while the container is off the window. The two demo projects are on transfer.it, a free file sharing service from MEGA DuoSideBarDemo.zip] for FB25719774: https://transfer.it/t/jd07S2pjxb6A ContainerRotationDemo.zip for FB25719805: https://transfer.it/t/ktyMSvxTGDAK
Topic: UI Frameworks SubTopic: UIKit Tags:
3d
Reply to _dispatch_assert_queue_fail under iOS 16.4.1. Don't understand the error.
I got a similar _dispatch_assert_queue_fail crash but the stack trace looks a bit different. I couldn't find the root cause since the stack trace does not show anything related to our code. Do you have any idea? Interestingly, this crash happens only in iOS 18+. Note: I attached the full stack crash.txt trace -[UIImageView _mainQ_beginLoadingIfApplicable] _dispatch_assert_queue_fail Crashed: com.apple.SwiftUI.AsyncRenderer EXC_BREAKPOINT 0x000000019c21e3b4 Crashed: com.apple.SwiftUI.AsyncRenderer 0 libdispatch.dylib 0x63b4 _dispatch_assert_queue_fail + 120 1 libdispatch.dylib 0x633c _dispatch_assert_queue_fail + 194 2 UIKitCore 0xb80c4 -[UIImageView _mainQ_beginLoadingIfApplicable] + 76 3 UIKitCore 0xb7fb4 -[UIImageView setHidden:] + 68 4 UIKitCore 0xb7d70 -[UIButtonLegacyVisualProvider _updateImageView] + 372 5 UIKitCore 0xe8830 -[UIButtonLegacyVisualProvider baselineOffsetsAtSize:] + 196 6 UIKitCore 0xe8748 -[UIButton _baselineOffsetsAtSize:] + 52 7 SwiftUI 0x29a48 PlatformViewLayoutEngine.explicitAlignment(_:at:) + 124 8 SwiftUI 0x299c0 protocol witness for LayoutEngine.explicitAlignment(_:at:) in conformance PlatformViewLayoutEngine<A> + 16 9 SwiftUICore 0x136f4 LayoutEngineBox.explicitAlignment(_:at:) + 120 10 SwiftUICore 0x135a4 LayoutProxy.explicitAlignment(_:at:) + 244 11 SwiftUICore 0x129d4 UnaryLayoutEngine.explicitAlignment(_:at:) + 208 12 SwiftUICore 0x13718 protocol witness for LayoutEngine.explicitAlignment(_:at:) in conformance UnaryLayoutEngine<A> + 16 13 SwiftUICore 0x136f4 LayoutEngineBox.explicitAlignment(_:at:) + 120 14 SwiftUICore 0x12130 StackLayout.UnmanagedImplementation.explicitAlignment(_:at:) + 348 15 SwiftUICore 0x307b8 StackLayout.explicitAlignment(_:in:proposal:) + 136 ... 57 SwiftUICore 0x1b5000 ViewGraph.updateOutputsAsync(at:) + 560 58 SwiftUICore 0x1b45d4 ViewRendererHost.renderAsync(interval:targetTimestamp:) + 524 59 SwiftUI 0x69d40 UIHostingViewBase.displayLinkTimer(timestamp:targetTimestamp:isAsyncThread:) + 256 60 SwiftUI 0x691d8 DisplayLink.displayLinkTimer(_:) + 280 61 SwiftUI 0x69094 @objc DisplayLink.displayLinkTimer(_:) + 60 62 QuartzCore 0xec1a4 CA::Display::DisplayLinkItem::dispatch_(CA::SignPost::Interval<(CA::SignPost::CAEventCode)835322056>&) + 48 63 QuartzCore 0xebb78 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 884 64 QuartzCore 0xc3b58 display_timer_callback(__CFMachPort*, void*, long, void*) + 456 65 CoreFoundation 0x79b68 __CFMachPortPerform + 176 66 CoreFoundation 0x79aa4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60 67 CoreFoundation 0x799c4 __CFRunLoopDoSource1 + 524 68 CoreFoundation 0x762ac __CFRunLoopRun + 2248 69 CoreFoundation 0xc8274 CFRunLoopRunSpecific + 588 70 Foundation 0x29b48 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 71 Foundation 0x25d10 -[NSRunLoop(NSRunLoop) run] + 64 72 SwiftUI 0x375f60 specialized static DisplayLink.asyncThread(arg:) + 792 73 SwiftUI 0x375c30 @objc static DisplayLink.asyncThread(arg:) + 72 74 Foundation 0x115a54 __NSThread__start__ + 724 75 libsystem_pthread.dylib 0x17d0 _pthread_start + 136 76 libsystem_pthread.dylib 0x1480 thread_start + 8
Topic: UI Frameworks SubTopic: UIKit Tags:
Dec ’24
Reply to Strange crash when using .values from @Published publisher
I'd like to make my question more clear I know adding receive(on: DispatchQueue.main) or subscribe(on: DispatchQueue.main would fix this. I know $0 which is the @Published is accessed in background (map function in this case). What I don't understand are: Why the map run on background, not on main? Why there is discrepancy in iOS 18 and iOS 17 and below. And interestingly, I observe that the map function run on background only the first time, perhaps the subscription is done in background?
Topic: Programming Languages SubTopic: Swift Tags:
Dec ’24
Reply to Vertical tab bar doesn't appear when tab bar controller is added to view controller while iPhone Duo is unfolded
We see a related case on iPhone Duo with Xcode 27.2 and the iOS 27.2 simulator. A container view controller sizes a child UITabBarController with Auto Layout constraints. If the Duo opens while a full-screen modal covers the container, the side bar is empty after the modal closes. At viewIsAppearing, the child still has the folded frame, so this looks like the same root cause as FB25261013. A flexible autoresizing mask on the child view avoids it. I filed FB25719774 with a small sample project. But that workaround caused a second issue on iOS 17.5: after rotation, a compositional layout in the child kept the old size classes. I filed it as FB25719805. So we now use the autoresizing mask only while the container is off the window. The two demo projects are on transfer.it, a free file sharing service from MEGA DuoSideBarDemo.zip] for FB25719774: https://transfer.it/t/jd07S2pjxb6A ContainerRotationDemo.zip for FB25719805: https://transfer.it/t/ktyMSvxTGDAK
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
3d
Reply to _dispatch_assert_queue_fail under iOS 16.4.1. Don't understand the error.
I got a similar _dispatch_assert_queue_fail crash but the stack trace looks a bit different. I couldn't find the root cause since the stack trace does not show anything related to our code. Do you have any idea? Interestingly, this crash happens only in iOS 18+. Note: I attached the full stack crash.txt trace -[UIImageView _mainQ_beginLoadingIfApplicable] _dispatch_assert_queue_fail Crashed: com.apple.SwiftUI.AsyncRenderer EXC_BREAKPOINT 0x000000019c21e3b4 Crashed: com.apple.SwiftUI.AsyncRenderer 0 libdispatch.dylib 0x63b4 _dispatch_assert_queue_fail + 120 1 libdispatch.dylib 0x633c _dispatch_assert_queue_fail + 194 2 UIKitCore 0xb80c4 -[UIImageView _mainQ_beginLoadingIfApplicable] + 76 3 UIKitCore 0xb7fb4 -[UIImageView setHidden:] + 68 4 UIKitCore 0xb7d70 -[UIButtonLegacyVisualProvider _updateImageView] + 372 5 UIKitCore 0xe8830 -[UIButtonLegacyVisualProvider baselineOffsetsAtSize:] + 196 6 UIKitCore 0xe8748 -[UIButton _baselineOffsetsAtSize:] + 52 7 SwiftUI 0x29a48 PlatformViewLayoutEngine.explicitAlignment(_:at:) + 124 8 SwiftUI 0x299c0 protocol witness for LayoutEngine.explicitAlignment(_:at:) in conformance PlatformViewLayoutEngine<A> + 16 9 SwiftUICore 0x136f4 LayoutEngineBox.explicitAlignment(_:at:) + 120 10 SwiftUICore 0x135a4 LayoutProxy.explicitAlignment(_:at:) + 244 11 SwiftUICore 0x129d4 UnaryLayoutEngine.explicitAlignment(_:at:) + 208 12 SwiftUICore 0x13718 protocol witness for LayoutEngine.explicitAlignment(_:at:) in conformance UnaryLayoutEngine<A> + 16 13 SwiftUICore 0x136f4 LayoutEngineBox.explicitAlignment(_:at:) + 120 14 SwiftUICore 0x12130 StackLayout.UnmanagedImplementation.explicitAlignment(_:at:) + 348 15 SwiftUICore 0x307b8 StackLayout.explicitAlignment(_:in:proposal:) + 136 ... 57 SwiftUICore 0x1b5000 ViewGraph.updateOutputsAsync(at:) + 560 58 SwiftUICore 0x1b45d4 ViewRendererHost.renderAsync(interval:targetTimestamp:) + 524 59 SwiftUI 0x69d40 UIHostingViewBase.displayLinkTimer(timestamp:targetTimestamp:isAsyncThread:) + 256 60 SwiftUI 0x691d8 DisplayLink.displayLinkTimer(_:) + 280 61 SwiftUI 0x69094 @objc DisplayLink.displayLinkTimer(_:) + 60 62 QuartzCore 0xec1a4 CA::Display::DisplayLinkItem::dispatch_(CA::SignPost::Interval<(CA::SignPost::CAEventCode)835322056>&) + 48 63 QuartzCore 0xebb78 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 884 64 QuartzCore 0xc3b58 display_timer_callback(__CFMachPort*, void*, long, void*) + 456 65 CoreFoundation 0x79b68 __CFMachPortPerform + 176 66 CoreFoundation 0x79aa4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 60 67 CoreFoundation 0x799c4 __CFRunLoopDoSource1 + 524 68 CoreFoundation 0x762ac __CFRunLoopRun + 2248 69 CoreFoundation 0xc8274 CFRunLoopRunSpecific + 588 70 Foundation 0x29b48 -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 212 71 Foundation 0x25d10 -[NSRunLoop(NSRunLoop) run] + 64 72 SwiftUI 0x375f60 specialized static DisplayLink.asyncThread(arg:) + 792 73 SwiftUI 0x375c30 @objc static DisplayLink.asyncThread(arg:) + 72 74 Foundation 0x115a54 __NSThread__start__ + 724 75 libsystem_pthread.dylib 0x17d0 _pthread_start + 136 76 libsystem_pthread.dylib 0x1480 thread_start + 8
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Dec ’24
Reply to Strange crash when using .values from @Published publisher
I'd like to make my question more clear I know adding receive(on: DispatchQueue.main) or subscribe(on: DispatchQueue.main would fix this. I know $0 which is the @Published is accessed in background (map function in this case). What I don't understand are: Why the map run on background, not on main? Why there is discrepancy in iOS 18 and iOS 17 and below. And interestingly, I observe that the map function run on background only the first time, perhaps the subscription is done in background?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Dec ’24