Uploaded image for project: 'Realm Core'
  1. Realm Core
  2. RCORE-1799

[realm-core-13.21.0] Assertion failure while handling backlinks automatically when Realm is open and `HandleBackLinksAutomatically = True`

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None

      SDK and version

      SDK : iOS
      Version: 10.42.4

      Observations

      When a user is opening a realm it crashes with an assertion error.

      Crash log / stacktrace

      /Users/myapp/Library/Developer/Xcode/DerivedData/myapp-actcjfywbohdcferndpcmskchjsv/SourcePackages/checkouts/realm-core/src/realm/array.hpp:111: [realm-core-13.21.0] Assertion failed: ref
      0 myapp 0x00000001053e4e98 ZN5realm4utilL18terminate_internalERNSt3_118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
      1 myapp 0x00000001053e4e78 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 308
      2 myapp 0x00000001053e4d44 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 0
      3 myapp 0x0000000104bb0700 _ZN5realm5Array13init_from_refEm + 92
      4 myapp 0x0000000104be29ac _ZN5realm15ArraySmallBlobs13init_from_memENS_6MemRefE + 104
      5 myapp 0x0000000104bef828 _ZN5realm11ArrayString13init_from_memENS_6MemRefE + 668
      6 myapp 0x0000000104bed9b8 _ZN5realm11ArrayString13init_from_refEm + 80
      7 myapp 0x0000000104bef9a8 _ZN5realm11ArrayString16init_from_parentEv + 60
      8 myapp 0x0000000104c2023c _ZN5realm7Cluster8do_eraseINS_11ArrayStringEEEvmNS_6ColKeyE + 152
      9 myapp 0x0000000104c1f11c _ZZN5realm7Cluster5eraseENS_6ObjKeyERNS_12CascadeStateEENK3$_6clENS_6ColKeyE + 2000
      10 myapp 0x0000000104c0d358 ZNK5realm5Table25for_each_and_every_columnIZNS_7Cluster5eraseENS_6ObjKeyERNS_12CascadeStateEE3$_6EEbT + 136
      11 myapp 0x0000000104c0d114 _ZN5realm7Cluster5eraseENS_6ObjKeyERNS_12CascadeStateE + 420
      12 myapp 0x0000000104c3aa78 _ZZN5realm16ClusterNodeInner5eraseENS_6ObjKeyERNS_12CascadeStateEENK3$_8clEPNS_11ClusterNodeERNS0_9ChildInfoE + 76
      13 myapp 0x0000000104c3a92c ZN5realm16ClusterNodeInner7recurseImZNS0_5eraseENS_6ObjKeyERNS_12CascadeStateEE3$_8EET_RNS0_9ChildInfoET0 + 200
      14 myapp 0x0000000104c30e10 ZN5realm16ClusterNodeInner7recurseImZNS0_5eraseENS_6ObjKeyERNS_12CascadeStateEE3$_8EET_S2_T0 + 212
      15 myapp 0x0000000104c30d30 _ZN5realm16ClusterNodeInner5eraseENS_6ObjKeyERNS_12CascadeStateE + 64
      16 myapp 0x0000000104c34190 _ZN5realm11ClusterTree5eraseENS_6ObjKeyERNS_12CascadeStateE + 248
      17 myapp 0x000000010533bd50 _ZN5realm5Table13remove_objectENS_6ObjKeyE + 348
      18 myapp 0x000000010533b974 _ZN5realm5Table12set_embeddedEbb + 620
      19 myapp 0x000000010533b5a0 _ZN5realm5Table14set_table_typeENS0_4TypeEb + 488
      20 myapp 0x0000000104e80e08 ZZL28apply_post_migration_changesRN5realm5GroupERKNSt3_16vectorINS_12SchemaChangeENS2_9allocatorIS4_EEEERKNS_6SchemaE15DidRereadSchema28HandleBackLinksAutomaticallyEN7ApplierclENS_13schema_change15ChangeTableTypeE + 68
      21 myapp 0x0000000104e80b90 ZNK5realm12SchemaChange5visitIRZL28apply_post_migration_changesRNS_5GroupERKNSt316vectorIS0_NS4_9allocatorIS0_EEEERKNS_6SchemaE15DidRereadSchema28HandleBackLinksAutomaticallyE7ApplierEEDaOT

      • 160
        22 myapp 0x0000000104e7a4c0 ZL28apply_post_migration_changesRN5realm5GroupERKNSt3_16vectorINS_12SchemaChangeENS2_9allocatorIS4_EEEERKNS_6SchemaE15DidRereadSchema28HandleBackLinksAutomatically + 136
        23 myapp 0x0000000104e79e38 ZN5realm11ObjectStore20apply_schema_changesERNS_11TransactionEyRNS_6SchemaEyNS_10SchemaModeERKNSt3_16vectorINS_12SchemaChangeENS6_9allocatorIS8_EEEEbNS6_8functionIFvvEEE + 764
        24 myapp 0x0000000104f4aa18 ZN5realm5Realm13update_schemaENS_6SchemaEyNSt3_18functionIFvNS2_10shared_ptrIS0_EES5_RS1_EEENS3_IFvS5_EEEb + 1456
        25 myapp 0x0000000104b10a7c +[RLMRealm realmWithConfiguration:confinedTo:error:] + 2428
        26 myapp 0x0000000104b1001c +[RLMRealm realmWithConfiguration:queue:error:] + 156
        27 myapp 0x00000001055c7958 $sSo8RLMRealmC13configuration5queueABSo0A13ConfigurationC_So012OS_dispatch_C0CSgtKcfCTO + 128
        28 myapp 0x000000010567f574 $s10RealmSwift0A0V13configuration5queueA2C13ConfigurationV_So012OS_dispatch_D0CSgtKcfC + 192
        29 myapp 0x00000001043a3ce8 $s8myapp11RealmFacadeC11mergeRealms18localConfiguration06remoteG06userId16progressCallback10completiony0B5Swift0B0V0G0V_ANSSSgySi_SitcyAA0B10MergeErrorOSgctFyycfU_yyXEfU_ + 660
        30 myapp 0x00000001043ab964 $s8myapp11RealmFacadeC11mergeRealms18localConfiguration06remoteG06userId16progressCallback10completiony0B5Swift0B0V0G0V_ANSSSgySi_SitcyAA0B10MergeErrorOSgctFyycfU_yyXEfU_TA + 68
        31 libswiftObjectiveC.dylib 0x00000001a2b99af0 $s10ObjectiveC15autoreleasepool8invokingxxyKXE_tKlF + 56
        32 myapp 0x00000001043a3324 $s8myapp11RealmFacadeC11mergeRealms18localConfiguration06remoteG06userId16progressCallback10completiony0B5Swift0B0V0G0V_ANSSSgySi_SitcyAA0B10MergeErrorOSgctFyycfU_ + 432
        33 myapp 0x00000001043a3a48 $s8myapp11RealmFacadeC11mergeRealms18localConfiguration06remoteG06userId16progressCallback10completiony0B5Swift0B0V0G0V_ANSSSgySi_SitcyAA0B10MergeErrorOSgctFyycfU_TA + 188
        34 myapp 0x0000000104083a0c $sIeg_IeyB_TR + 48
        35 libdispatch.dylib 0x000000010b278528 _dispatch_call_block_and_release + 24
        36 libdispatch.dylib 0x000000010b279d50 _dispatch_client_callout + 16
        37 libdispatch.dylib 0x000000010b282014 _dispatch_lane_serial_drain + 924
        38 libdispatch.dylib 0x000000010b282d6c _dispatch_lane_invoke + 424
        39 libdispatch.dylib 0x000000010b290b74 _dispatch_workloop_worker_thread + 1716
        40 libsystem_pthread.dylib 0x00000001b1834878 _pthread_wqthread + 284
        41 libsystem_pthread.dylib 0x00000001b183363c start_wqthread + 8
        !!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose2023-09-29 20:48:56.330207+0200 myapp[7667:123266] /Users/myapp/Library/Developer/Xcode/DerivedData/myapp-actcjfywbohdcferndpcmskchjsv/SourcePackages/checkouts/realm-core/src/realm/array.hpp:111: [realm-core-13.21.0] Assertion failed: ref
        0 myapp 0x00000001053e4e98 ZN5realm4utilL18terminate_internalERNSt3_118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
        1 myapp 0x00000001053e4e78 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 308
        2 myapp 0x00000001053e4d44 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 0
        3 myapp 0x0000000104bb0700 _ZN5realm5Array13init_from_refEm + 92
        4 myapp 0x0000000104be29ac _ZN5realm15ArraySmallBlobs13init_from_memENS_6MemRefE + 104
        5 myapp 0x0000000104bef828 _ZN5realm11ArrayString13init_from_memENS_6MemRefE + 668
        6 myapp 0x0000000104bed9b8 _ZN5realm11ArrayString13init_from_refEm + 80
        7 myapp 0x0000000104bef9a8 _ZN5realm11ArrayString16init_from_parentEv + 60
        8 myapp 0x0000000104c2023c _ZN5realm7Cluster8do_eraseINS_11ArrayStringEEEvmNS_6ColKeyE + 152
        9 myapp 0x0000000104c1f11c _ZZN5realm7Cluster5eraseENS_6ObjKeyERNS_12CascadeStateEENK3$_6clENS_6ColKeyE + 2000
        10 myapp 0x0000000104c0d358 ZNK5realm5Table25for_each_and_every_columnIZNS_7Cluster5eraseENS_6ObjKeyERNS_12CascadeStateEE3$_6EEbT + 136
        11 myapp 0x0000000104c0d114 _ZN5realm7Cluster5eraseENS_6ObjKeyERNS_12CascadeStateE + 420
        12 myapp 0x0000000104c3aa78 _ZZN5realm16ClusterNodeInner5eraseENS_6ObjKeyERNS_12CascadeStateEENK3$_8clEPNS_11ClusterNodeERNS0_9ChildInfoE + 76
        13 myapp 0x0000000104c3a92c ZN5realm16ClusterNodeInner7recurseImZNS0_5eraseENS_6ObjKeyERNS_12CascadeStateEE3$_8EET_RNS0_9ChildInfoET0 + 200
        14 myapp 0x0000000104c30e10 ZN5realm16ClusterNodeInner7recurseImZNS0_5eraseENS_6ObjKeyERNS_12CascadeStateEE3$_8EET_S2_T0 + 212
        15 myapp 0x0000000104c30d30 _ZN5realm16ClusterNodeInner5eraseENS_6ObjKeyERNS_12CascadeStateE + 64
        16 myapp 0x0000000104c34190 _ZN5realm11ClusterTree5eraseENS_6ObjKeyERNS_12CascadeStateE + 248
        17 myapp 0x000000010533bd50 _ZN5realm5Table13remove_objectENS_6ObjKeyE + 348
        18 myapp 0x000000010533b974 _ZN5realm5Table12set_embeddedEbb + 620
        19 myapp 0x000000010533b5a0 _ZN5realm5Table14set_table_typeENS0_4TypeEb + 488
        20 myapp 0x0000000104e80e08 ZZL28apply_post_migration_changesRN5realm5GroupERKNSt3_16vectorINS_12SchemaChangeENS2_9allocatorIS4_EEEERKNS_6SchemaE15DidRereadSchema28HandleBackLinksAutomaticallyEN7ApplierclENS_13schema_change15ChangeTableTypeE + 68
        21 myapp 0x0000000104e80b90 ZNK5realm12SchemaChange5visitIRZL28apply_post_migration_changesRNS_5GroupERKNSt316vectorIS0_NS4_9allocatorIS0_EEEERKNS_6SchemaE15DidRereadSchema28HandleBackLinksAutomaticallyE7ApplierEEDaOT + 160
        22 myapp 0x0000000104e7a4c0 ZL28apply_post_migration_changesRN5realm5GroupERKNSt3_16vectorINS_12SchemaChangeENS2_9allocatorIS4_EEEERKNS_6SchemaE15DidRereadSchema28HandleBackLinksAutomatically + 136
        23 myapp 0x0000000104e79e38 ZN5realm11ObjectStore20apply_schema_changesERNS_11TransactionEyRNS_6SchemaEyNS_10SchemaModeERKNSt3_16vectorINS_12SchemaChangeENS6_9allocatorIS8_EEEEbNS6_8functionIFvvEEE + 764
        24 myapp 0x0000000104f4aa18 ZN5realm5Realm13update_schemaENS_6SchemaEyNSt3_18functionIFvNS2_10shared_ptrIS0_EES5_RS1_EEENS3_IFvS5_EEEb + 1456
        25 myapp 0x0000000104b10a7c +[RLMRealm realmWithConfiguration:confinedTo:error:] + 2428
        26 myapp 0x0000000104b1001c +[RLMRealm realmWithConfiguration:queue:error:] + 156
        27 myapp 0x00000001055c7958 $sSo8RLMRealmC13configuration5queueABSo0A13ConfigurationC_So012OS_dispatch_C0CSgtKcfCTO + 128
        28 myapp 0x000000010567f574 $s10RealmSwift0A0V13configuration5queueA2C13ConfigurationV_So012OS_dispatch_D0CSgtKcfC + 192
        29 myapp 0x00000001043a3ce8 $s8myapp11RealmFacadeC11mergeRealms18localConfiguration06remoteG06userId16progressCallback10completiony0B5Swift0B0V0G0V_ANSSSgySi_SitcyAA0B10MergeErrorOSgctFyycfU_yyXEfU_ + 660
        30 myapp 0x00000001043ab964 $s8myapp11RealmFacadeC11mergeRealms18localConfiguration06remoteG06userId16progressCallback10completiony0B5Swift0B0V0G0V_ANSSSgySi_SitcyAA0B10MergeErrorOSgctFyycfU_yyXEfU_TA + 68
        31 libswiftObjectiveC.dylib 0x00000001a2b99af0 $s10ObjectiveC15autoreleasepool8invokingxxyKXE_tKlF + 56
        32 myapp 0x00000001043a3324 $s8myapp11RealmFacadeC11mergeRealms18localConfiguration06remoteG06userId16progressCallback10completiony0B5Swift0B0V0G0V_ANSSSgySi_SitcyAA0B10MergeErrorOSgctFyycfU_ + 432
        33 myapp 0x00000001043a3a48 $s8myapp11RealmFacadeC11mergeRealms18localConfiguration06remoteG06userId16progressCallback10completiony0B5Swift0B0V0G0V_ANSSSgySi_SitcyAA0B10MergeErrorOSgctFyycfU_TA + 188
        34 myapp 0x0000000104083a0c $sIeg_IeyB_TR + 48
        35 libdispatch.dylib 0x000000010b278528 _dispatch_call_block_and_release + 24
        36 libdispatch.dylib 0x000000010b279d50 _dispatch_client_callout + 16
        37 libdispatch.dylib 0x000000010b282014 _dispatch_lane_serial_drain + 924
        38 libdispatch.dylib 0x000000010b282d6c _dispatch_lane_invoke + 424
        39 libdispatch.dylib 0x000000010b290b74 _dispatch_workloop_worker_thread + 1716
        40 libsystem_pthread.dylib 0x00000001b1834878 _pthread_wqthread + 284
        41 libsystem_pthread.dylib 0x00000001b183363c start_wqthread + 8

      Steps & Code to Reproduce

      I have a sample realm file I can send, if I know where to send it. I am not able to post it publically here.

      The realm file is possible to open using realm studio, but not using the realm swift SDK.

            Assignee:
            nicola.cabiddu@mongodb.com Nicola Cabiddu
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: