Приложение iOS аварийно завершает работу по причине «Представление уже должно быть в окне перед добавлением _UIPassthrouIOS

Программируем под IOS
Ответить
Anonymous
 Приложение iOS аварийно завершает работу по причине «Представление уже должно быть в окне перед добавлением _UIPassthrou

Сообщение Anonymous »

В моем приложении, работающем в симуляторе, произошел случайный сбой при открытии представления в стеке навигации. Запуск под iOS 26 SDK на симуляторе с iOS 26.
Публикация здесь на случай, если у кого-то произойдет то же самое...
Трассировка стека ниже:
*** Assertion failure in -[_UIPassthroughScrollInteraction didMoveToView:], _UIPassthroughScrollInteraction.m:178
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The view should already be in the window before adding a _UIPassthroughScrollInteraction'
*** First throw call stack:
(
0 CoreFoundation 0x00000001804f39e8 __exceptionPreprocess + 172
1 libobjc.A.dylib 0x000000018009c084 objc_exception_throw + 72
2 Foundation 0x00000001810353c0 _userInfoForFileAndLine + 0
3 UIKitCore 0x000000018691c2fc -[_UIPassthroughScrollInteraction didMoveToView:] + 244
4 UIKitCore 0x0000000186847850 _setInteractionView + 60
5 UIKitCore 0x00000001868477ac -[UIView(Dragging) addInteraction:] + 364
6 UIKitCore 0x0000000185779828 -[UISearchBar _didMoveFromWindow:toWindow:] + 308
7 UIKitCore 0x0000000186842bb0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 680
8 UIKitCore 0x0000000186842bb0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 680
9 UIKitCore 0x0000000186842bb0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 680
10 UIKitCore 0x0000000186842bb0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 680
11 UIKitCore 0x0000000186842bb0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 680
12 UIKitCore 0x0000000186842bb0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 680
13 UIKitCore 0x0000000186842bb0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 680
14 UIKitCore 0x0000000186842bb0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 680
15 UIKitCore 0x0000000186842bb0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 680
16 UIKitCore 0x0000000186842bb0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 680
17 UIKitCore 0x0000000186842bb0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 680
18 UIKitCore 0x0000000186842bb0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 680
19 UIKitCore 0x0000000186842bb0 -[UIView(Internal) _didMoveFromWindow:toWindow:] + 680
20 UIKitCore 0x00000001868389bc __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 120
21 CoreAutoLayout 0x00000001e3e34480 -[NSISEngine withBehaviors:performModifications:] + 76
22 UIKitCore 0x00000001868388e8 -[UIView _postMovedFromSuperview:] + 456
23 UIKitCore 0x000000018684540c -[UIView(Internal) _addSubview:positioned:relativeTo:] + 2228
24 UIKitCore 0x0000000185511280 block_destroy_helper.345 + 11688
25 UIKitCore 0x000000018547b0ec block_destroy_helper.41 + 36728
26 UIKitCore 0x0000000185479740 block_destroy_helper.41 + 30156
27 UIKitCore 0x000000018547b664 block_destroy_helper.41 + 38128
28 UIKitCore 0x000000018573b7dc -[UINavigationBar layoutSubviews] + 896
29 UIKitCore 0x00000001854df290 block_destroy_helper.13 + 9004
30 UIKitCore 0x00000001854df5f0 block_destroy_helper.13 + 9868
31 UIKitCore 0x00000001868494bc -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2504
32 UIKitCore 0x000000018573b2fc -[UINavigationBar layoutSublayersOfLayer:] + 188
33 QuartzCore 0x000000018c65eb1c _ZN2CA5Layer15perform_update_EPS0_P7CALayerjPNS_11TransactionE + 348
34 QuartzCore 0x000000018c65e48c _ZN2CA5Layer16update_if_neededEPNS_11TransactionEjj + 536
35 UIKitCore 0x000000018683982c -[UIView(Hierarchy) layoutBelowIfNeeded] + 312
36 UIKitCore 0x00000001857368d0 -[UINavigationBar _redisplayItems] + 176
37 UIKitCore 0x00000001859d72a4 -[UINavigationController _immediatelyApplyViewControllers:transition:animated:operation:] + 1860
38 UIKitCore 0x00000001859d6a30 __94-[UINavigationController _applyViewControllers:transition:animated:operation:rescheduleBlock:]_block_invoke + 92
39 UIKitCore 0x00000001859d6794 -[UINavigationController _applyViewControllers:transition:animated:operation:rescheduleBlock:] + 768
40 UIKitCore 0x00000001859edd48 -[UINavigationController pushViewController:transition:forceImmediate:] + 488
41 UIKitCore 0x00000001859ecfdc -[UINavigationController pushViewController:animated:] + 460
42 SwiftUI 0x00000001d8cc87b4 $s7SwiftUI25UIKitNavigationControllerC08pushViewE0_8animatedySo06UIViewE0C_SbtF + 1144
43 SwiftUI 0x00000001d8cc8bdc $s7SwiftUI25UIKitNavigationControllerC08pushViewE0_8animatedySo06UIViewE0C_SbtFTo + 64
44 SwiftUI 0x00000001d935736c $s7SwiftUI26NavigationStackCoordinatorC6update33_97044434BF355299D05CCAF67303A1CBLL2to4from20navigationController11transaction21transparentBackgroundyAA0C5StateV0D7ContentV_ANSo012UINavigationO0C 45 SwiftUI 0x00000001d9356f90 $s7SwiftUI26NavigationStackCoordinatorC6update33_97044434BF355299D05CCAF67303A1CBLL2to4from20navigationController11transaction21transparentBackgroundyAA0C5StateV0D7ContentV_ANSo012UINavigationO0C 46 SwiftUI 0x00000001d934a1b8 $s7SwiftUI38NavigationHostingControllerCache_UIKitC16_viewControllers33_ACF663F82314B0391F0D11C4BB7C3E07LL11forEntering11isBorrowing7request6insertxSo012UINavigationE0CSg_SbyAC6SourceVzXExSayAA0c 47 SwiftUI 0x00000001d9354cd0 $s7SwiftUI26NavigationStackCoordinatorC6update33_97044434BF355299D05CCAF67303A1CBLL2to4from20navigationController11transaction21transparentBackgroundyAA0C5StateV0D7ContentV_ANSo012UINavigationO0C 48 SwiftUI 0x00000001d9351d74 $s7SwiftUI26NavigationStackCoordinatorC06updateC10Controller_11environment11transaction5seeds21transparentBackground8strategyySo012UINavigationG0C_AA17EnvironmentValuesVAA11TransactionVAA0C5State 49 SwiftUI 0x00000001d9361248 $s7SwiftUI26NavigationStackCoordinatorC06updateC10Controller_11environment11transaction5seeds21transparentBackground8strategyySo012UINavigationG0C_AA17EnvironmentValuesVAA11TransactionVAA0C5State 50 SwiftUICore 0x00000001d9d962c8 $s7SwiftUI6UpdateO15dispatchActionsyyFZ + 1092
51 SwiftUICore 0x00000001d9d95320 $s7SwiftUI6UpdateO3endyyFZ + 124
52 SwiftUICore 0x00000001d9d959b8 $s7SwiftUI6UpdateO19dispatchImmediately6reason_xAA16CustomEventTraceV06ActionH4TypeO6ReasonOSg_xyXEtlFZ + 320
53 SwiftUICore 0x00000001d9ae0874 $s7SwiftUI19ViewGraphHostUpdateV19dispatchImmediatelyyxxyXElFZ + 40
54 UIKitCore 0x00000001852c08c0 block_destroy_helper + 252
55 UIKitCore 0x00000001852c0388 block_destroy_helper.128 + 500
56 UIKitCore 0x0000000185773878 _UIUpdateSequenceRunNext + 120
57 UIKitCore 0x000000018617ec90 schedulerStepScheduledMainSectionContinue + 56
58 UpdateCycle 0x00000002509462b4 _ZN2UC10DriverCore18continueProcessingEv + 80
59 CoreFoundation 0x00000001804114ac __CFMachPortPerform + 164
60 CoreFoundation 0x000000018044dbe0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
61 CoreFoundation 0x000000018044d1f8 __CFRunLoopDoSource1 + 480
62 CoreFoundation 0x000000018044c2c0 __CFRunLoopRun + 2100
63 CoreFoundation 0x0000000180446e24 _CFRunLoopRun
libc++abi: terminating due to uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The view should already be in the window before adding a _UIPassthroughScrollInteraction'
terminating due to uncaught exception of type NSException
CoreSimulator 1048 - Device: iPad (A16) (0FE92EA2-57FA-4A5E-ABD0-DAB4DABC3E02) - Runtime: iOS 26.0 (23A343) - DeviceType: iPad (A16)


Подробнее здесь: https://stackoverflow.com/questions/797 ... before-add
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «IOS»