brave / brave-browser

Brave browser for Android, iOS, Linux, macOS, Windows.
https://brave.com
Mozilla Public License 2.0
17.63k stars 2.3k forks source link

Crash when you open address bar and press the settings next to the search engine options #39136

Closed anthonypkeane closed 2 months ago

anthonypkeane commented 3 months ago

Description

Open address bar and press the settings next to the search engine options

More here: https://bravesoftware.slack.com/archives/C06UXF3KJ/p1718737857022649

Steps to reproduce

  1. Tap address bar and tap search icon (settings) above it
  2. Enable Recent Searches
  3. Crash

Actual result

Crash

https://github.com/brave/brave-browser/assets/6643505/7ecfb730-f48e-469b-bc30-43528be329fb

Expected result

NA

Reproduces how often

Easily reproduced

Brave version

NA

Device/iOS version

NA

Affected browser versions

Reproducibility

kylehickinson commented 3 months ago
stack trace: ``` *** Assertion failure in -[_UIDiffableDataSourceState itemIdentifiersInSectionWithIdentifier:], _UIDiffableDataSourceHelpers.m:299 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Section identifier was not found. You can verify the section exists by calling the indexOfSectionIdentifier API (which has O(1) performance)' *** First throw call stack: ( 0 CoreFoundation 0x00000001804ae138 __exceptionPreprocess + 172 1 libobjc.A.dylib 0x0000000180087db4 objc_exception_throw + 56 2 Foundation 0x0000000180d2dfd8 _userInfoForFileAndLine + 0 3 UIKitCore 0x000000018587ec08 -[_UIDiffableDataSourceState itemIdentifiersInSectionWithIdentifier:] + 332 4 UIKitCore 0x000000018488c8e0 __swift_destroy_boxed_opaque_existential_1Tm + 11860 5 Client 0x00000001028b2da8 $s5Brave23FavoritesViewControllerC10controller_20didChangeContentWithySo016NSFetchedResultsD0CySo20NSFetchRequestResult_pG_So28NSDiffableDataSourceSnapshotCtF + 1400 6 Client 0x00000001028b3730 $s5Brave23FavoritesViewControllerC10controller_20didChangeContentWithySo016NSFetchedResultsD0CySo20NSFetchRequestResult_pG_So28NSDiffableDataSourceSnapshotCtFTo + 68 7 CoreData 0x00000001864e2a84 -[NSFetchedResultsController _conditionallyDispatchSnapshotToDelegate:updatesInfo:] + 588 8 CoreData 0x00000001864e0004 -[NSFetchedResultsController performFetch:] + 268 9 Client 0x00000001028a85d4 $s5Brave23FavoritesViewControllerC20updateUIWithSnapshot33_21CCC4184BFBC5566AC70293392BFA4CLLyyF + 400 10 Client 0x00000001028b23d4 $s5Brave23FavoritesViewControllerC20preferencesDidChange3forySS_tF + 60 11 Client 0x00000001028b241c $s5Brave23FavoritesViewControllerC20preferencesDidChange3forySS_tFTo + 60 12 Client 0x000000010320ae40 $s11PreferencesAAC6OptionC5valuexvWyAA0A8Observer_pXEfU_ + 132 13 Client 0x000000010321203c $s11PreferencesAAC6OptionC5valuexvWyAA0A8Observer_pXEfU_TA + 28 14 libswiftCore.dylib 0x000000019304b148 $sSTsE7forEachyyy7ElementQzKXEKF + 440 15 Client 0x000000010320ad70 $s11PreferencesAAC6OptionC5valuexvW + 732 16 Client 0x000000010320b28c $s11PreferencesAAC6OptionC5valuexvs + 400 17 Client 0x0000000102bd5524 $s5Brave13SearchEnginesC24shouldShowRecentSearchesSbvs + 120 18 Client 0x0000000102f0f77c $s5Brave33SearchSettingsTableViewControllerC23didToggleRecentSearchesyySo8UISwitchCF + 104 19 Client 0x0000000102f0f7f4 $s5Brave33SearchSettingsTableViewControllerC23didToggleRecentSearchesyySo8UISwitchCFTo + 52 20 UIKitCore 0x00000001853ecf04 -[UIApplication sendAction:to:from:forEvent:] + 96 21 UIKitCore 0x0000000184cfab38 -[UIControl sendAction:to:forEvent:] + 108 22 UIKitCore 0x0000000184cfae7c -[UIControl _sendActionsForEvents:withEvent:] + 268 23 UIKitCore 0x0000000184d2d81c -[UISwitchModernVisualElement sendStateChangeActions] + 56 24 UIKitCore 0x0000000184d2d038 -[UISwitchMVEGestureTrackingSession _sendStateChangeActionsIfNecessary] + 60 25 UIKitCore 0x0000000184d2df94 __88-[UISwitchModernVisualElement _handleLongPressWithGestureLocationInBounds:gestureState:]_block_invoke + 56 26 UIKitCore 0x00000001858aee48 -[_UIAfterCACommitBlock run] + 64 27 UIKitCore 0x00000001858af258 -[_UIAfterCACommitQueue flush] + 160 28 UIKitCore 0x00000001853f4600 _runAfterCACommitDeferredBlocks + 492 29 UIKitCore 0x00000001853e68dc _cleanUpAfterCAFlushAndRunDeferredBlocks + 96 30 UIKitCore 0x000000018540feb8 _afterCACommitHandler + 60 31 CoreFoundation 0x000000018040de34 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 32 32 CoreFoundation 0x0000000180408838 __CFRunLoopDoObservers + 528 33 CoreFoundation 0x0000000180408cf0 __CFRunLoopRun + 968 34 CoreFoundation 0x0000000180408514 CFRunLoopRunSpecific + 572 35 GraphicsServices 0x000000018ef06ae4 GSEventRunModal + 160 36 UIKitCore 0x00000001853e8040 -[UIApplication _run] + 868 37 UIKitCore 0x00000001853ebcc8 UIApplicationMain + 124 38 UIKitCore 0x000000018488c1cc __swift_destroy_boxed_opaque_existential_1Tm + 10048 39 Client 0x000000010265e9c0 $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 120 40 Client 0x000000010265e938 $s6Client11AppDelegateC5$mainyyFZ + 44 41 Client 0x000000010265f724 main + 28 42 dyld 0x0000000109e3d544 start_sim + 20 43 ??? 0x0000000109eee0e0 0x0 + 4461617376 44 ??? 0xb400000000000000 0x0 + 12970366926827028480 ) libc++abi: terminating due to uncaught exception of type NSException ```
hffvld commented 2 weeks ago

Verified on iPhone 14 using version(s):

Device/OS: iPhone 14 / iOS 17.7
Brave build: 1.70 (117)
BraveCore: 1.70.117 (129.0.6668.59)

STEPS:

  1. Follow the STR/TP from https://github.com/brave/brave-browser/issues/39136#issue-2360533988
  2. Verify

ACTUAL RESULTS:


https://github.com/user-attachments/assets/45bc38a9-f360-424d-875e-10895f80896f