Black and unusable browser view when using "Close Private Tabs"
Steps to reproduce
- Turn on "Close Private Tabs" in the Settings
- Go to Private Browsing mode and load google.com
- Open up the Tabs view
- In the Tab bar at the top of the screen (Tabs|Private|Synced) click "Tabs".
- Without actually selecting a tab, click "Done".
- The Private Google tab is still open, but the web view has gone completely black. Also none of the buttons in the address bar will work.
See the screen recording for a better understanding. The actual web page used in Private browsing mode doesn't;t matter. Also the behaviour is similar if you have multiple private tabs open. They all become unusable.
Expected behavior
Looking at the Tabs view without actually selecting a tab or creating a new one should leave the browser view in exactly the same state it was before opening the Tabs view (i.e in the above case, the Private Google tab would still be open and usable.)
Actual behavior
The current tab becomes unusable and black
Device & build information
- Device: All I tried, including real iPhones and iPad simulators
- Build version: v102.0 and also main brach (as of bf397bd8e2194794f0ac7862f66e58b1a7d1a9cd)
Notes
Attachments:
https://user-images.githubusercontent.com/2040690/177522221-66499ede-9bc2-4989-b788-99e2fc3404f5.mov
┆Issue is synchronized with this Jira Task
Follow-up.
Once getting in the bad state above (especially with multiple blank private tabs), I've managed to crash the app a couple of times when pressing the '+' (New Tab) button.
Here's what the debugger logged:
2022-07-06 10:54:07.273114+0100 Client[29140:1044445] *** Assertion failure in -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:collectionViewAnimator:], UICollectionView.m:8489
2022-07-06 10:54:07.288722+0100 Client[29140:1044445] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to insert item 2 into section 0, but there are only 2 items in section 0 after the update'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff203feba4 __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff201a1be7 objc_exception_throw + 48
2 Foundation 0x00007fff20753aa2 _userInfoForFileAndLine + 0
3 UIKitCore 0x00007fff246c23cb -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:collectionViewAnimator:] + 8056
4 UIKitCore 0x00007fff246cef2e -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:animator:animationHandler:] + 569
5 UIKitCore 0x00007fff246cec67 -[UICollectionView performBatchUpdates:completion:] + 34
6 Client 0x0000000109d2b334 $s6Client17TabDisplayManagerC24performChainedOperations33_1A65387E8136A8968C6559640AD3A593LLyyF + 1444
7 Client 0x0000000109d2799d $s6Client17TabDisplayManagerC10updateWith33_1A65387E8136A8968C6559640AD3A593LL13animationType9operationyAA0b9AnimationN0O_yycSgtF + 525
8 Client 0x0000000109d29d2b $s6Client17TabDisplayManagerC03tabD0_06didAddB0017placeNextToParentB011isRestoringyAA0bD0C_AA0B0CS2btF + 555
9 Client 0x0000000109d2a457 $s6Client17TabDisplayManagerC03tabD0_06didAddB0017placeNextToParentB011isRestoringyAA0bD0C_AA0B0CS2btFTo + 119
10 Client 0x000000010a041465 $s6Client10TabManagerC09configureB0_7request05afterB011flushToDisk6zombie7isPopupyAA0B0C_10Foundation10URLRequestVSgAKSgS3btFyAA04WeakbC8DelegateCXEfU_ + 277
11 Client 0x000000010a03e4d2 $s6Client22WeakTabManagerDelegateCs5Error_pIggzo_ACsAD_pIegnzo_TR + 18
12 Client 0x000000010a050da4 $s6Client22WeakTabManagerDelegateCs5Error_pIggzo_ACsAD_pIegnzo_TRTA.25 + 20
13 libswiftCore.dylib 0x00007fff307be65d $sSTsE7forEachyyy7ElementQzKXEKF + 413
14 Client 0x000000010a0409ea $s6Client10TabManagerC09configureB0_7request05afterB011flushToDisk6zombie7isPopupyAA0B0C_10Foundation10URLRequestVSgAKSgS3btF + 2698
15 Client 0x000000010a03f7b3 $s6Client10TabManagerC03addB0_13configuration05afterB011flushToDisk6zombie9isPrivateAA0B0C10Foundation10URLRequestVSg_So22WKWebViewConfigurationCSgAKSgS3btF + 691
16 Client 0x000000010a03ef1b $s6Client10TabManagerC03addB0_13configuration05afterB09isPrivateAA0B0C10Foundation10URLRequestVSg_So22WKWebViewConfigurationCSgAISgSbtF + 123
17 Client 0x000000010a12b66e $s6Client21BrowserViewControllerC15openURLInNewTab_9isPrivatey10Foundation3URLVSg_SbtF + 1134
18 Client 0x000000010a12c063 $s6Client21BrowserViewControllerC15openBlankNewTab18focusLocationField9isPrivate9searchForySb_SbSSSgtF + 355
19 Client 0x000000010a144132 $s6Client21BrowserViewControllerC21topTabsDidPressNewTabyySbF + 226
20 Client 0x000000010a14435f $s6Client21BrowserViewControllerCAA15TopTabsDelegateA2aDP03topF14DidPressNewTabyySbFTW + 15
21 Client 0x0000000109be7dab $s6Client21TopTabsViewControllerC12newTabTappedyyF + 331
22 Client 0x0000000109be7dec $s6Client21TopTabsViewControllerC12newTabTappedyyFTo + 28
23 UIKitCore 0x00007fff2506026d -[UIApplication sendAction:to:from:forEvent:] + 83
24 UIKitCore 0x00007fff248f66e1 -[UIControl sendAction:to:forEvent:] + 110
25 UIKitCore 0x00007fff248f6ac3 -[UIControl _sendActionsForEvents:withEvent:] + 332
26 UIKitCore 0x00007fff248f2ffa -[UIButton _sendActionsForEvents:withEvent:] + 148
27 UIKitCore 0x00007fff248f5374 -[UIControl touchesEnded:withEvent:] + 488
28 UIKitCore 0x00007fff250a0c9d -[UIWindow _sendTouchesForEvent:] + 1287
29 UIKitCore 0x00007fff250a2d19 -[UIWindow sendEvent:] + 5289
30 UIKitCore 0x00007fff250795b6 -[UIApplication sendEvent:] + 819
31 UIKit 0x00007fff59ace03b -[UIApplicationAccessibility sendEvent:] + 85
32 UIKitCore 0x00007fff2510f4ef __dispatchPreprocessedEventFromEventQueue + 8683
33 UIKitCore 0x00007fff25111c75 __processEventQueue + 8579
34 UIKitCore 0x00007fff25108427 __eventFetcherSourceCallback + 240
35 CoreFoundation 0x00007fff2036ce15 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
36 CoreFoundation 0x00007fff2036cd0d __CFRunLoopDoSource0 + 180
37 CoreFoundation 0x00007fff2036c1e2 __CFRunLoopDoSources0 + 242
38 CoreFoundation 0x00007fff20366941 __CFRunLoopRun + 875
39 CoreFoundation 0x00007fff203660f3 CFRunLoopRunSpecific + 567
40 GraphicsServices 0x00007fff2c995cd3 GSEventRunModal + 139
41 UIKitCore 0x00007fff25059f42 -[UIApplication _run] + 928
42 UIKitCore 0x00007fff2505eb5e UIApplicationMain + 101
43 Client 0x000000010a0fd853 main + 563
44 dyld 0x000000010bfcdee9 start_sim + 10
45 ??? 0x00000001188a051e 0x0 + 4706665758
)
libc++abi: terminating with uncaught exception of type NSException
dyld4 config: DYLD_ROOT_PATH=/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot DYLD_LIBRARY_PATH=/Users/mgough/Library/Developer/Xcode/DerivedData/Client-darpztmbqjqryzgllmvhztvziqex/Build/Products/Fennec-iphonesimulator:/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/system/introspection DYLD_INSERT_LIBRARIES=/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libBacktraceRecording.dylib:/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/usr/lib/libMainThreadChecker.dylib:/Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib DYLD_FRAMEWORK_PATH=/Users/mgough/Library/Developer/Xcode/DerivedData/Client-darpztmbqjqryzgllmvhztvziqex/Build/Products/Fennec-iphonesimulator:/Users/mgough/Library/Developer/Xcode/DerivedData/Client-darpztmbqjqryzgllmvhztvziqex/Build/Products/Fennec-iphonesimulator/PackageFrameworks
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to insert item 2 into section 0, but there are only 2 items in section 0 after the update'
terminating with uncaught exception of type NSException
CoreSimulator 842.8 - Device: Dev1 iPad mini (6th generation) (8F11A97E-90B8-4F81-BCC1-0376CC556C25) - Runtime: iOS 15.2 (19C51) - DeviceType: iPad mini (6th generation)
➤ Daniela Arcese commented:
Let’s open a new private tab in this case
➤ Catalin Suciu commented:
The selected private tab opens when following the STRs on v104.0 (14834). Verifying as fixed.
This issue has been automatically marked as stale. Has the issue been fixed, or does it still require the community's attention? Please leave any comment to keep this issue opened. It will be closed automatically if no further update occurs in the next 30 days. Thank you for your contributions!