Crash after opening a new tab and switching to private browsing

VERIFIED FIXED

Status

()

P2
normal
Rank:
1
VERIFIED FIXED
2 years ago
2 years ago

People

(Reporter: SimonB, Assigned: fluffyemily)

Tracking

unspecified
Other
iOS

Firefox Tracking Flags

(fxios-v6.0 verified, fxios6.0+)

Details

(Whiteboard: [MobileAS])

Attachments

(1 attachment)

(Reporter)

Description

2 years ago
Build: 5.0(8) Nightly
Device: iPad Air 2 (9.3.2)

Steps to reproduce:
1. Launch Firefox
2. Quickly tap on the Private Browosing button
3. Quickly tap on the New Tab button
4. Repeat steps 2 and 3

Actual results:
- The application will crash.

Please see similar issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1270767
(Reporter)

Comment 1

2 years ago
Please note that the issue is reproducible following the steps from the description by tapping on the Private Browsing button and the New Tab button from tabs bar.
SimonB: By tabs bar, do you mean the top tabs bar, the tabs tray, or the menu popup?
(Reporter)

Comment 3

2 years ago
Hello, by tabs bar I am referring to the top tabs bar.
status-fxios-v5.0: affected → ---
status-fxios-v6.0: --- → affected
tracking-fxios: ? → 6.0+
Rank: 1
Priority: -- → P2

Updated

2 years ago
Whiteboard: [MobileAS]
(Assignee)

Updated

2 years ago
Assignee: nobody → etoop
(Assignee)

Comment 4

2 years ago
I don't seem to be able to click the 2 buttons fast enough on simulator to replicate this and I don't have my iPad at the office today to test on device. Will retest on Friday 22 September when I have access to a suitable device
(Assignee)

Comment 5

2 years ago
What a helpful error message (for once, not being facetious)

2016-09-23 14:17:24.924165 Client[310:25885] The behavior of the UICollectionViewFlowLayout is not defined because:
2016-09-23 14:17:24.924754 Client[310:25885] the item height must be less than the height of the UICollectionView minus the section insets top and bottom values, minus the content insets top and bottom values.
2016-09-23 14:17:24.925237 Client[310:25885] The relevant UICollectionViewFlowLayout instance is <Client.TopTabsViewLayout: 0x127e14cd0>, and it is attached to <UICollectionView: 0x128840000; frame = (-10 0; 666 40); gestureRecognizers = <NSArray: 0x1742460f0>; layer = <CALayer: 0x1740392e0>; contentOffset: {0, 0}; contentSize: {2242, 40}> collection view layout: <Client.TopTabsViewLayout: 0x127e14cd0>.
2016-09-23 14:17:24.925684 Client[310:25885] Make a symbolic breakpoint at UICollectionViewFlowLayoutBreakForInvalidSizes to catch this in the debugger.
2016-09-23 14:17:24.938649 Client[310:25885] *** Assertion failure in -[UICollectionViewData indexPathForItemAtGlobalIndex:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit/UIKit-3599.6/UICollectionViewData.m:652
(Assignee)

Updated

2 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 6

2 years ago
http://stackoverflow.com/a/15454898

"The problem is this: it appears that the indexPath of a supplementary view MUST correspond to the indexPath of an extant cell in the collection. If the supplementary view's index path has no corresponding ordinary cell, the application will crash. I believe that the collection view attempts to retrieve information for a supplementary view's cell for some reason during the update procedure. It crashes when it cannot find one."
(Assignee)

Comment 7

2 years ago
The action that causes this is not the rapid tapping of the New Tab after the toggle private data button, but the tapping of Toggle Private Data rapidly after New Tab, causing the new tab to be added in the wrong collection as the privacy status has changed since the new tab was requested. If you wait a second or so between new tab and toggle privacy mode then the crash does not occur.
(Assignee)

Comment 8

2 years ago
Created attachment 8794229 [details] [review]
Pull request
Attachment #8794229 - Flags: review?(fpatel)

Updated

2 years ago
Attachment #8794229 - Flags: review?(fpatel) → review+
Thanks for fixing this Emily!

master a8d043fc193283fab43a490ae4f9b5fe13c6b83f
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
Resolution: --- → FIXED
(Reporter)

Comment 10

2 years ago
Verifying as fix on Master 1bc8bb71f. 

The toggle private data button is disabled after opening a New Tab.
Status: RESOLVED → VERIFIED
status-fxios-v6.0: affected → verified
You need to log in before you can comment on or make changes to this bug.