Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash - Assertion failed: it != m_sectioned_results.m_prev_section_index_to_key.end() #8113

Open
alexjameslittle opened this issue Jan 26, 2023 · 3 comments
Labels

Comments

@alexjameslittle
Copy link

How frequently does the bug occur?

Sometimes

Description

We are using the Realm Sectioned api with a change set observer (combine) to drive a UICollectionView. We are getting very frequent crashes with the message Assertion failed: it != m_sectioned_results.m_prev_section_index_to_key.end()

Stacktrace & log output

/Users/alexlittle/Library/Developer/Xcode/DerivedData/gyuvgmorahdzragmsiatbadvlker/SourcePackages/checkouts/realm-core/src/realm/object-store/sectioned_results.cpp:86: [realm-core-12.13.0] Assertion failed: it != m_sectioned_results.m_prev_section_index_to_key.end()
0   Staging                             0x000000010431b2e8 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1   Staging                             0x000000010431b1a4 _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 228
2   Staging                             0x0000000103daa7f4 _ZN5realm35SectionedResultsNotificationHandlerclERKNS_19CollectionChangeSetE + 500
3   Staging                             0x0000000103daa5ac _ZN5realm24CollectionChangeCallback4ImplINS_35SectionedResultsNotificationHandlerEE5afterERKNS_19CollectionChangeSetE + 36
4   Staging                             0x0000000103cb8360 _ZN5realm24CollectionChangeCallback5afterERKNS_19CollectionChangeSetE + 44
5   Staging                             0x0000000103cb82b0 _ZZN5realm5_impl18CollectionNotifier13after_advanceEvENK3$_6clINS_4util17CheckedUniqueLockENS0_20NotificationCallbackEEEDaRT_RT0_ + 320
6   Staging                             0x0000000103cab254 _ZN5realm5_impl18CollectionNotifier17for_each_callbackIZNS1_13after_advanceEvE3$_6EEvOT_ + 196
7   Staging                             0x0000000103cab184 _ZN5realm5_impl18CollectionNotifier13after_advanceEv + 28
8   Staging                             0x0000000103cabb70 _ZN5realm5_impl15NotifierPackage13after_advanceEv + 100
9   Staging                             0x0000000103d0f148 _ZN12_GLOBAL__N_126advance_with_notificationsIZN5realm5_impl11transaction7advanceERKNSt3__110shared_ptrINS1_11TransactionEEEPNS1_14BindingContextEONS2_15NotifierPackageEE3$_1EEvSB_S9_OT_RSC_ + 572
10  Staging                             0x0000000103d0ef00 _ZN5realm5_impl11transaction7advanceERKNSt3__110shared_ptrINS_11TransactionEEEPNS_14BindingContextEONS0_15NotifierPackageE + 60
11  Staging                             0x0000000103cdb570 _ZN5realm5_impl16RealmCoordinator16advance_to_readyERNS_5RealmE + 1184
12  Staging                             0x0000000103e26388 _ZN5realm5Realm6notifyEv + 524
13  Staging                             0x0000000103d26744 _ZZN5realm5_impl17WeakRealmNotifier6notifyEvENK3$_0clEv + 60
14  Staging                             0x0000000103d266fc _ZN5realm4util14UniqueFunctionIFvvEE17call_regular_voidIZNS_5_impl17WeakRealmNotifier6notifyEvE3$_0EEvNSt3__117integral_constantIbLb1EEERT_ + 24
15  Staging                             0x0000000103d265e8 _ZN5realm4util14UniqueFunctionIFvvEE12SpecificImplIZNS_5_impl17WeakRealmNotifier6notifyEvE3$_0E4callEv + 28
16  Staging                             0x0000000103aff334 _ZNK5realm4util14UniqueFunctionIFvvEEclEv + 100
17  Staging                             0x0000000103f50d24 _ZN5realm4util15InvocationQueue10invoke_allEv + 152
18  Staging                             0x0000000103f5183c _ZZN5realm4util16RunLoopSchedulerC1EP11__CFRunLoopENK3$_0clEPv + 28
19  Staging                             0x0000000103f51814 _ZZN5realm4util16RunLoopSchedulerC1EP11__CFRunLoopEN3$_08__invokeEPv + 28
20  CoreFoundation                      0x00000001d129a22c 42C5C917-0447-3995-B50F-DE4D132C2435 + 877100
21  CoreFoundation                      0x00000001d12a6614 42C5C917-0447-3995-B50F-DE4D132C2435 + 927252
22  CoreFoundation                      0x00000001d122a51c 42C5C917-0447-3995-B50F-DE4D132C2435 + 419100
23  CoreFoundation                      0x00000001d123feb8 42C5C917-0447-3995-B50F-DE4D132C2435 + 507576
24  CoreFoundation                      0x00000001d12451e4 CFRunLoopRunSpecific + 612
25  GraphicsServices                    0x000000020a065368 GSEventRunModal + 164
26  UIKitCore                           0x00000001d36f4d88 7B942FA4-CB76-3375-9972-F58C14492FB4 + 3812744
27  UIKitCore                           0x00000001d36f49ec UIApplicationMain + 340
28  SwiftUI                             0x00000001d4cf3ce8 122E646E-6B17-3561-975F-C414C8DAE3D3 + 1944808
29  SwiftUI                             0x00000001d4c50c24 122E646E-6B17-3561-975F-C414C8DAE3D3 + 1276964
30  SwiftUI                             0x00000001d4c39b44 122E646E-6B17-3561-975F-C414C8DAE3D3 + 1182532
31  Staging                             0x00000001023ab1f4 $s7Staging14_iosAppV5$mainyyFZ + 40
32  Staging                             0x00000001023ab3ec main + 12
33  dyld                                0x00000001ef569948 341BBF64-6034-357E-8AA6-E1E4B988E03C + 88392!!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose2023-01-26 16:08:13.329863+0000 Staging[48305:13871468]

Can you reproduce the bug?

Sometimes

Reproduction Steps

No response

Version

10.34.0

What Atlas Services are you using?

Local Database only

Are you using encryption?

No

Platform OS and version(s)

iOS 16.1

Build environment

Xcode version: 14.1
Dependency manager and version: SPM

@leemaguire
Copy link
Contributor

Hi @alexjameslittle could you send us an app that can help us reproduce the issue?

@alexjameslittle
Copy link
Author

alexjameslittle commented Jan 26, 2023

realm/realm-core#5912

Looks like it's the related to this issue reported here. Has the realm-swift been updated with that fix from core?

@ejm01
Copy link
Contributor

ejm01 commented Feb 2, 2023

Yes, 5912 was closed in realm-core 12.10.0. But that should already be in realm-swift 10.34.0, which uses realm-core 12.13.0.

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Feb 2, 2023
@sync-by-unito sync-by-unito bot removed the T-Bug label Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants