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

Assertion failed: header.m_top_ref[1] == 0 with (header.m_top_ref[1], get_file_path_for_assertions())

      when I open a realm db file, it's crashed.

      I use Realm Studio open this file, it display blank.

      I don't know what happened, how can I catch this error or fix it?

      Here's the crash log:

      2020-10-12 17:50:01.010771+0800 WisdomChat[57368:329645] /Users/realm/workspace/realm_realm-core_release_5.23.8/src/realm/alloc_slab.cpp:990: [realm-core-5.23.8] Assertion failed: header.m_top_ref[1] == 0 with (header.m_top_ref[1], get_file_path_for_assertions()) =  [8672, "/Users/junhuashao/Library/Developer/CoreSimulator/Devices/3CB07EBE-ACED-49B4-BE1F-3CB7F09AD3CA/data/Containers/Data/Application/363240FF-AADF-4D5E-9D9E-86146C67E648/Documents/.RealmDB/ggtest003_EA.realm"]
      0   WisdomChat                          0x000000010d68afac _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
      1   WisdomChat                          0x000000010d68b4d2 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 466
      2   WisdomChat                          0x000000010d46a020 _ZN5realm4util24encryption_write_barrierINS_9SlabAlloc6HeaderEEEvRNS0_4File3MapIT_EEmm + 0
      3   WisdomChat                          0x000000010d46936a _ZN5realm9SlabAlloc11attach_fileERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERNS0_6ConfigE + 4490
      4   WisdomChat                          0x000000010d5403ee _ZN5realm11SharedGroup7do_openERKNSt3__112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEbbNS_18SharedGroupOptionsE + 3870
      5   WisdomChat                          0x000000010d1a5789 _ZN5realm11SharedGroup4openERNS_11ReplicationENS_18SharedGroupOptionsE + 377
      6   WisdomChat                          0x000000010d1a5400 _ZN5realm11SharedGroupC2ERNS_11ReplicationENS_18SharedGroupOptionsE + 608
      7   WisdomChat                          0x000000010d1a50bd _ZN5realm11SharedGroupC1ERNS_11ReplicationENS_18SharedGroupOptionsE + 29
      8   WisdomChat                          0x000000010d18f1f1 _ZNSt3__1L11make_uniqueIN5realm11SharedGroupEJRNS1_11ReplicationERNS1_18SharedGroupOptionsEEEENS_11__unique_ifIT_E15__unique_singleEDpOT0_ + 177
      9   WisdomChat                          0x000000010d18e218 _ZN5realm5Realm16open_with_configERKNS0_6ConfigERNSt3__110unique_ptrINS_11ReplicationENS4_14default_deleteIS6_EEEERNS5_INS_11SharedGroupENS7_ISB_EEEERNS5_INS_5GroupENS7_ISF_EEEEPS0_ + 1640
      10  WisdomChat                          0x000000010d18d68c _ZN5realm5RealmC2ENS0_6ConfigENSt3__110shared_ptrINS_5_impl16RealmCoordinatorEEE + 524
      11  WisdomChat                          0x000000010d19b7d5 _ZZN5realm5Realm17make_shared_realmENS0_6ConfigENSt3__110shared_ptrINS_5_impl16RealmCoordinatorEEEEN19make_shared_enablerC2ES1_S6_ + 149
      12  WisdomChat                          0x000000010d19b6b5 _ZZN5realm5Realm17make_shared_realmENS0_6ConfigENSt3__110shared_ptrINS_5_impl16RealmCoordinatorEEEEN19make_shared_enablerC1ES1_S6_ + 21
      13  WisdomChat                          0x000000010d19b53a _ZNSt3__122__compressed_pair_elemIZN5realm5Realm17make_shared_realmENS2_6ConfigENS_10shared_ptrINS1_5_impl16RealmCoordinatorEEEE19make_shared_enablerLi1ELb0EEC2IJOS3_OS7_EJLm0ELm1EEEENS_21piecewise_construct_tENS_5tupleIJDpT_EEENS_15__tuple_indicesIJXspT0_EEEE + 186
      14  WisdomChat                          0x000000010d19b418 _ZNSt3__117__compressed_pairINS_9allocatorIZN5realm5Realm17make_shared_realmENS3_6ConfigENS_10shared_ptrINS2_5_impl16RealmCoordinatorEEEE19make_shared_enablerEES9_EC2IJRSA_EJOS4_OS8_EEENS_21piecewise_construct_tENS_5tupleIJDpT_EEENSH_IJDpT0_EEE + 120
      15  WisdomChat                          0x000000010d19afdd _ZNSt3__117__compressed_pairINS_9allocatorIZN5realm5Realm17make_shared_realmENS3_6ConfigENS_10shared_ptrINS2_5_impl16RealmCoordinatorEEEE19make_shared_enablerEES9_EC1IJRSA_EJOS4_OS8_EEENS_21piecewise_construct_tENS_5tupleIJDpT_EEENSH_IJDpT0_EEE + 45
      16  WisdomChat                          0x000000010d19aeaa _ZNSt3__120__shared_ptr_emplaceIZN5realm5Realm17make_shared_realmENS2_6ConfigENS_10shared_ptrINS1_5_impl16RealmCoordinatorEEEE19make_shared_enablerNS_9allocatorIS8_EEEC2IJS3_S7_EEESA_DpOT_ + 138
      17  WisdomChat                          0x000000010d19aad5 _ZNSt3__120__shared_ptr_emplaceIZN5realm5Realm17make_shared_realmENS2_6ConfigENS_10shared_ptrINS1_5_impl16RealmCoordinatorEEEE19make_shared_enablerNS_9allocatorIS8_EEEC1IJS3_S7_EEESA_DpOT_ + 37
      18  WisdomChat                          0x000000010d19a885 _ZNSt3__1L11make_sharedIZN5realm5Realm17make_shared_realmENS2_6ConfigENS_10shared_ptrINS1_5_impl16RealmCoordinatorEEEE19make_shared_enablerJS3_S7_EEENS_9enable_ifIXntsr8is_arrayIT_EE5valueENS4_ISA_EEE4typeEDpOT0_ + 229
      19  WisdomChat                          0x000000010d193033 _ZN5realm5Realm17make_shared_realmENS0_6ConfigENSt3__110shared_ptrINS_5_impl16RealmCoordinatorEEE + 67
      20  WisdomChat                          0x000000010cedd624 _ZN5realm5_impl16RealmCoordinator12do_get_realmENS_5Realm6ConfigERNSt3__110shared_ptrIS2_EERNS4_11unique_lockINS4_5mutexEEEb + 436
      21  WisdomChat                          0x000000010cedd300 _ZN5realm5_impl16RealmCoordinator9get_realmENS_5Realm6ConfigE + 432
      22  WisdomChat                          0x000000010d1907a8 _ZN5realm5Realm16get_shared_realmENS0_6ConfigE + 184
      23  WisdomChat                          0x000000010d0c1159 +[RLMRealm realmWithConfiguration:error:] + 1609
      24  WisdomChat                          0x000000010c8c18fe -[BFRealmDB buildRealm:] + 78
      25  WisdomChat                          0x000000010c8c186b -[BFRealmDB initWithConfiguration:] + 139
      26  WisdomChat                          0x000000010c99bfa1 +[EAKDB dbByName:] + 353
      27  WisdomChat                          0x000000010c99cdc5 +[EAKManager getDB] + 117
      28  WisdomChat                          0x000000010c99a260 +[EAKAnalysisRecord(Database) saveEventRecord:triggerId:params:] + 224
      29  WisdomChat                          0x000000010c99e771 __40-[EAKManager analyzeSingleEvent:params:]_block_invoke + 145
      30  libdispatch.dylib                   0x0000000114c4f8ac _dispatch_call_block_and_release + 12
      31  libdispatch.dylib                   0x0000000114c50a88 _dispatch_client_callout + 8
      32  libdispatch.dylib                   0x0000000114c614af _dispatch_lane_concurrent_drain + 1231
      33  libdispatch.dylib                   0x0000000114c580e4 _dispatch_lane_invoke + 628
      34  libdispatch.dylib                   0x0000000114c52d28 _dispatch_queue_override_invoke + 554
      35  libdispatch.dylib                   0x0000000114c625b6 _dispatch_root_queue_drain + 351
      36  libdispatch.dylib                   0x0000000114c62f1b _dispatch_worker_thread2 + 135
      37  libsystem_pthread.dylib             0x00007fff5dcd89f7 _pthread_wqthread + 220
      38  libsystem_pthread.dylib             0x00007fff5dcd7b77 start_wqthread + 15!!! IMPORTANT: Please send this log and info about Realm SDK version and other relevant reproduction info to help@realm.io.
      CoreSimulator 732.17 - Device: iPhone 11 Pro Max (3CB07EBE-ACED-49B4-BE1F-3CB7F09AD3CA) - Runtime: iOS 14.0 (18A372) - DeviceType: iPhone 11 Pro Max
      

            Assignee:
            jorgen.edelbo@mongodb.com Jørgen Edelbo
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: