-
Notifications
You must be signed in to change notification settings - Fork 168
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 when modifying linked objects of observed sectioned result #5912
Comments
Thanks for reporting this @sereivoanyong. |
Internal note, here's the test I tried which succeeded:
|
@ironage Hi. Here's the full crash-reproducible code in Swift.
|
It always crashes when updating any accounts linked to observed sectioned transactions. |
@sereivoanyong thanks for that, I am able to reproduce this now. @leemaguire could you take a look at this?
|
SDK and version
SDK : Cocoa
Version: 10.30.0
Observations
I have 2 classes
Transaction
(containsdate: Date
,account: Account!
) andAccount
(containsname: String
).I got a
List<Transaction>
and filter itsdate
in specific month and then section byCalendar.current.startOfDay(for:)
on itsdate
. The app then crashes when I try to update thename
oftransaction.account
.Crash log / stacktrace
.../realm-core/src/realm/object-store/sectioned_results.cpp:86: [realm-core-12.7.0] Assertion failed: it != m_sectioned_results.m_prev_section_index_to_key.end()
0 LuyBuddy 0x00000001044c5e8c _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1 LuyBuddy 0x00000001044c5d2e _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 238
2 LuyBuddy 0x0000000103f17dd5 _ZN5realm35SectionedResultsNotificationHandlerclERKNS_19CollectionChangeSetE + 661
3 LuyBuddy 0x0000000103f17af1 _ZN5realm24CollectionChangeCallback4ImplINS_35SectionedResultsNotificationHandlerEE5afterERKNS_19CollectionChangeSetE + 33
4 LuyBuddy 0x0000000103e1dd76 _ZN5realm24CollectionChangeCallback5afterERKNS_19CollectionChangeSetE + 38
5 LuyBuddy 0x0000000103e1dca2 _ZZN5realm5_impl18CollectionNotifier13after_advanceEvENK3$6clINS_4util17CheckedUniqueLockENS0_20NotificationCallbackEEEDaRT_RT0 + 466
6 LuyBuddy 0x0000000103e11358 _ZN5realm5_impl18CollectionNotifier17for_each_callbackIZNS1_13after_advanceEvE3$6EEvOT + 232
7 LuyBuddy 0x0000000103e11269 _ZN5realm5_impl18CollectionNotifier13after_advanceEv + 25
8 LuyBuddy 0x0000000103e43c6e _ZN5realm5_impl16RealmCoordinator23process_available_asyncERNS_5RealmE + 1054
9 LuyBuddy 0x0000000103fa9fc0 _ZN5realm5Realm6notifyEv + 352
10 LuyBuddy 0x0000000103e8ad60 _ZZN5realm5_impl17WeakRealmNotifier6notifyEvENK3$_0clEv + 64
11 LuyBuddy 0x0000000103e8ad15 _ZN5realm4util14UniqueFunctionIFvvEE17call_regular_voidIZNS_5_impl17WeakRealmNotifier6notifyEvE3$0EEvNSt3__117integral_constantIbLb1EEERT + 21
12 LuyBuddy 0x0000000103e8ac19 _ZN5realm4util14UniqueFunctionIFvvEE12SpecificImplIZNS_5_impl17WeakRealmNotifier6notifyEvE3$_0E4callEv + 25
13 LuyBuddy 0x0000000103c6360a _ZNK5realm4util14UniqueFunctionIFvvEEclEv + 106
14 LuyBuddy 0x00000001040d182b _ZN5realm4util15InvocationQueue10invoke_allEv + 155
15 LuyBuddy 0x00000001040d22b9 _ZZN5realm4util16RunLoopSchedulerC1EP11__CFRunLoopENK3$_0clEPv + 25
16 LuyBuddy 0x00000001040d2295 _ZZN5realm4util16RunLoopSchedulerC1EP11__CFRunLoopEN3$_08__invokeEPv + 21
17 CoreFoundation 0x000000010cb36ebd CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
18 CoreFoundation 0x000000010cb36dfc __CFRunLoopDoSource0 + 157
19 CoreFoundation 0x000000010cb36659 __CFRunLoopDoSources0 + 308
20 CoreFoundation 0x000000010cb30db3 __CFRunLoopRun + 927
21 CoreFoundation 0x000000010cb30637 CFRunLoopRunSpecific + 560
22 GraphicsServices 0x000000011297428a GSEventRunModal + 139
23 UIKitCore 0x00000001215f9425 -[UIApplication _run] + 994
24 UIKitCore 0x00000001215fe301 UIApplicationMain + 123
25 libswiftUIKit.dylib 0x000000010ddfdc02 $s5UIKit17UIApplicationMainys5Int32VAD_SpySpys4Int8VGGSgSSSgAJtF + 98
26 LuyBuddy 0x00000001034d8ce8 $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 104
27 LuyBuddy 0x00000001034d8c6c $s8LuyBuddy11AppDelegateC5$mainyyFZ + 28
28 LuyBuddy 0x00000001034e2748 main + 24
29 dyld 0x00000001090bc2bf start_sim + 10
30 ??? 0x000000011299f52e 0x0 + 4607046958!!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose2022-09-30 14:06:43.413222+0700 LuyBuddy[37105:263587] /Users/sereivoanyong/Library/Developer/Xcode/DerivedData/LuyBuddy-dgzlfwcubyoaydgaoojlhkyizypn/SourcePackages/checkouts/realm-core/src/realm/object-store/sectioned_results.cpp:86: [realm-core-12.7.0] Assertion failed: it != m_sectioned_results.m_prev_section_index_to_key.end()
0 LuyBuddy 0x00000001044c5e8c _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1 LuyBuddy 0x00000001044c5d2e _ZN5realm4util9terminateEPKcS2_lOSt16initializer_listINS0_9PrintableEE + 238
2 LuyBuddy 0x0000000103f17dd5 _ZN5realm35SectionedResultsNotificationHandlerclERKNS_19CollectionChangeSetE + 661
3 LuyBuddy 0x0000000103f17af1 _ZN5realm24CollectionChangeCallback4ImplINS_35SectionedResultsNotificationHandlerEE5afterERKNS_19CollectionChangeSetE + 33
4 LuyBuddy 0x0000000103e1dd76 _ZN5realm24CollectionChangeCallback5afterERKNS_19CollectionChangeSetE + 38
5 LuyBuddy 0x0000000103e1dca2 _ZZN5realm5_impl18CollectionNotifier13after_advanceEvENK3$6clINS_4util17CheckedUniqueLockENS0_20NotificationCallbackEEEDaRT_RT0 + 466
6 LuyBuddy 0x0000000103e11358 _ZN5realm5_impl18CollectionNotifier17for_each_callbackIZNS1_13after_advanceEvE3$6EEvOT + 232
7 LuyBuddy 0x0000000103e11269 _ZN5realm5_impl18CollectionNotifier13after_advanceEv + 25
8 LuyBuddy 0x0000000103e43c6e _ZN5realm5_impl16RealmCoordinator23process_available_asyncERNS_5RealmE + 1054
9 LuyBuddy 0x0000000103fa9fc0 _ZN5realm5Realm6notifyEv + 352
10 LuyBuddy 0x0000000103e8ad60 _ZZN5realm5_impl17WeakRealmNotifier6notifyEvENK3$_0clEv + 64
11 LuyBuddy 0x0000000103e8ad15 _ZN5realm4util14UniqueFunctionIFvvEE17call_regular_voidIZNS_5_impl17WeakRealmNotifier6notifyEvE3$0EEvNSt3__117integral_constantIbLb1EEERT + 21
12 LuyBuddy 0x0000000103e8ac19 _ZN5realm4util14UniqueFunctionIFvvEE12SpecificImplIZNS_5_impl17WeakRealmNotifier6notifyEvE3$_0E4callEv + 25
13 LuyBuddy 0x0000000103c6360a _ZNK5realm4util14UniqueFunctionIFvvEEclEv + 106
14 LuyBuddy 0x00000001040d182b _ZN5realm4util15InvocationQueue10invoke_allEv + 155
15 LuyBuddy 0x00000001040d22b9 _ZZN5realm4util16RunLoopSchedulerC1EP11__CFRunLoopENK3$_0clEPv + 25
16 LuyBuddy 0x00000001040d2295 _ZZN5realm4util16RunLoopSchedulerC1EP11__CFRunLoopEN3$_08__invokeEPv + 21
17 CoreFoundation 0x000000010cb36ebd CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17
18 CoreFoundation 0x000000010cb36dfc __CFRunLoopDoSource0 + 157
19 CoreFoundation 0x000000010cb36659 __CFRunLoopDoSources0 + 308
20 CoreFoundation 0x000000010cb30db3 __CFRunLoopRun + 927
21 CoreFoundation 0x000000010cb30637 CFRunLoopRunSpecific + 560
22 GraphicsServices 0x000000011297428a GSEventRunModal + 139
23 UIKitCore 0x00000001215f9425 -[UIApplication _run] + 994
24 UIKitCore 0x00000001215fe301 UIApplicationMain + 123
25 libswiftUIKit.dylib 0x000000010ddfdc02 $s5UIKit17UIApplicationMainys5Int32VAD_SpySpys4Int8VGGSgSSSgAJtF + 98
26 LuyBuddy 0x00000001034d8ce8 $sSo21UIApplicationDelegateP5UIKitE4mainyyFZ + 104
27 LuyBuddy 0x00000001034d8c6c $s8LuyBuddy11AppDelegateC5$mainyyFZ + 28
28 LuyBuddy 0x00000001034e2748 main + 24
29 dyld 0x00000001090bc2bf start_sim + 10
30 ??? 0x000000011299f52e 0x0 + 4607046958!!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose
Steps & Code to Reproduce
The text was updated successfully, but these errors were encountered: