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

Realm crashes my app (it worked before)

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None

      SDK and version

      SDK : ? (Cocoa, Java, etc)
      Version: ?
      XCode 15.3

      Observations

      • How frequent do the crash occur?
      • Does it happen in production or during dev/test?
      • Can the crash be reproduced by you?
      • Can you provide instructions for how we can reproduce it?

      The crash occur every time I go in my app in the part where Realm is needed.
      It hapens in test (I migrated the project to a new M3 chip computer)

      Crash log / stacktrace

      <!-- The full stack trace. -->
      One Month subscription not valid
      One Year subscription not valid
      Drone Theory Locked
      App launched first time
      Optional(file:///Users/XXXXXX/Library/Developer/CoreSimulator/Devices/09732132-EB09-4347-A768-B9BD4B3BD218/data/Containers/Data/Application/8DB767D0-69F9-41DE-AD37-2C1894C358F2/Documents/default.realm)
      file:///Users/XXXXXX/Library/Developer/CoreSimulator/Devices/09732132-EB09-4347-A768-B9BD4B3BD218/data/Containers/Data/Application/8DB767D0-69F9-41DE-AD37-2C1894C358F2/Documents/
      /Users/XXXXXX/Library/Developer/Xcode/DerivedData/DroneApp-athxujldxmwwvqecqojsddtdpqhw/SourcePackages/checkouts/realm-core/src/realm/util/encrypted_file_mapping.cpp:1028: [realm-core-14.5.2] Assertion failed: new_size % (1ULL << m_page_shift) == 0
      0 RealmSwift 0x0000000107fd59f4 ZN5realm4utilL18terminate_internalERNSt3_118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
      1 RealmSwift 0x0000000107fd59d4 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 308
      2 RealmSwift 0x0000000107fd58a0 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 0
      3 RealmSwift 0x0000000107f85c60 _ZN5realm4util20EncryptedFileMapping9extend_toEmm + 120
      4 RealmSwift 0x0000000107f9d370 _ZN5realm4util24extend_encrypted_mappingEPNS0_20EncryptedFileMappingEPvmmm + 192
      5 RealmSwift 0x0000000107f9a84c _ZN5realm4util4File7MapBase13try_extend_toEm + 324
      6 RealmSwift 0x0000000107732b80 _ZN5realm4util4File3MapIcE13try_extend_toEm + 40
      7 RealmSwift 0x0000000107730cfc _ZN5realm9SlabAlloc18update_reader_viewEm + 1384
      8 RealmSwift 0x000000010772f824 ZN5realm9SlabAlloc11attach_fileERKNSt3_112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERNS0_6ConfigEPNS_4util13WriteObserverE + 2904
      9 RealmSwift 0x00000001078487f4 ZN5realm2DB4openERKNSt3_112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_9DBOptionsE + 436
      10 RealmSwift 0x0000000107854818 ZN5realm2DB6createERKNSt3_112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_9DBOptionsE + 80
      11 RealmSwift 0x0000000107a4963c _ZN5realm5_impl16RealmCoordinator7open_dbEv + 1456
      12 RealmSwift 0x0000000107a4a858 ZN5realm5_impl16RealmCoordinator12do_get_realmEONS_11RealmConfigERNSt3_110shared_ptrINS_5RealmEEENS4_8optionalINS_9VersionIDEEERNS_4util17CheckedUniqueLockEb + 84
      13 RealmSwift 0x0000000107a4a724 ZN5realm5_impl16RealmCoordinator9get_realmENS_11RealmConfigENSt3_18optionalINS_9VersionIDEEE + 760
      14 RealmSwift 0x0000000107b00f5c _ZN5realm5Realm16get_shared_realmENS_11RealmConfigE + 144
      15 RealmSwift 0x000000010823ef58 +[RLMRealm realmWithConfiguration:confinedTo:error:] + 940
      16 RealmSwift 0x000000010823eac8 +[RLMRealm realmWithConfiguration:queue:error:] + 156
      17 RealmSwift 0x000000010750037c $sSo8RLMRealmC13configuration5queueABSo0A13ConfigurationC_So012OS_dispatch_C0CSgtKcfCTO + 144
      18 RealmSwift 0x00000001075b904c $s10RealmSwift0A0V13configuration5queueA2C13ConfigurationV_So012OS_dispatch_D0CSgtKcfC + 192
      19 DroneApp 0x0000000100b1b780 $s8DroneApp12RealmServiceC010setupLocalC09encryptedySb_tFyyXEfU_ + 2588
      20 DroneApp 0x0000000100b1f0ac $s8DroneApp12RealmServiceC010setupLocalC09encryptedySb_tFyyXEfU_TA + 32
      21 libswiftObjectiveC.dylib 0x00000001c5040c18 $s10ObjectiveC15autoreleasepool8invokingxxyKXE_tKlF + 56
      22 DroneApp 0x0000000100b1ad34 $s8DroneApp12RealmServiceC010setupLocalC09encryptedySb_tF + 136
      23 DroneApp 0x0000000100cecc00 $s8DroneApp0B8DelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtF + 464
      24 DroneApp 0x0000000100ced314 $s8DroneApp0B8DelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtFTo + 196
      25 UIKitCore 0x00000001853e4a40 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 312
      26 UIKitCore 0x00000001853e5ea0 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 2788
      27 UIKitCore 0x00000001853ea9e8 -[UIApplication _runWithMainScene:transitionContext:completion:] + 856
      28 UIKitCore 0x0000000184a8a8ec -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 148
      29 UIKitCore 0x00000001853e7ccc -[UIApplication _compellApplicationLaunchToCompleteUnconditionally] + 44
      30 UIKitCore 0x00000001853e801c -[UIApplication _run] + 832
      31 UIKitCore 0x00000001853ebcc8 UIApplicationMain + 124
      32 DroneApp 0x0000000100ced7bc main + 64
      33 dyld 0x0000000102605544 start_sim + 20
      34 ??? 0x0000000101ff60e0 0x0 + 4328480992
      35 ??? 0xd027800000000000 0x0 + 14999097821469081600
      !!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose
      /Users/XXXXXX/Library/Developer/Xcode/DerivedData/DroneApp-athxujldxmwwvqecqojsddtdpqhw/SourcePackages/checkouts/realm-core/src/realm/util/encrypted_file_mapping.cpp:1028: [realm-core-14.5.2] Assertion failed: new_size % (1ULL << m_page_shift) == 0
      0 RealmSwift 0x0000000107fd59f4 ZN5realm4utilL18terminate_internalERNSt3_118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
      1 RealmSwift 0x0000000107fd59d4 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 308
      2 RealmSwift 0x0000000107fd58a0 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 0
      3 RealmSwift 0x0000000107f85c60 _ZN5realm4util20EncryptedFileMapping9extend_toEmm + 120
      4 RealmSwift 0x0000000107f9d370 _ZN5realm4util24extend_encrypted_mappingEPNS0_20EncryptedFileMappingEPvmmm + 192
      5 RealmSwift 0x0000000107f9a84c _ZN5realm4util4File7MapBase13try_extend_toEm + 324
      6 RealmSwift 0x0000000107732b80 _ZN5realm4util4File3MapIcE13try_extend_toEm + 40
      7 RealmSwift 0x0000000107730cfc _ZN5realm9SlabAlloc18update_reader_viewEm + 1384
      8 RealmSwift 0x000000010772f824 ZN5realm9SlabAlloc11attach_fileERKNSt3_112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERNS0_6ConfigEPNS_4util13WriteObserverE + 2904
      9 RealmSwift 0x00000001078487f4 ZN5realm2DB4openERKNSt3_112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_9DBOptionsE + 436
      10 RealmSwift 0x0000000107854818 ZN5realm2DB6createERKNSt3_112basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEERKNS_9DBOptionsE + 80
      11 RealmSwift 0x0000000107a4963c _ZN5realm5_impl16RealmCoordinator7open_dbEv + 1456
      12 RealmSwift 0x0000000107a4a858 ZN5realm5_impl16RealmCoordinator12do_get_realmEONS_11RealmConfigERNSt3_110shared_ptrINS_5RealmEEENS4_8optionalINS_9VersionIDEEERNS_4util17CheckedUniqueLockEb + 84
      13 RealmSwift 0x0000000107a4a724 ZN5realm5_impl16RealmCoordinator9get_realmENS_11RealmConfigENSt3_18optionalINS_9VersionIDEEE + 760
      14 RealmSwift 0x0000000107b00f5c _ZN5realm5Realm16get_shared_realmENS_11RealmConfigE + 144
      15 RealmSwift 0x000000010823ef58 +[RLMRealm realmWithConfiguration:confinedTo:error:] + 940
      16 RealmSwift 0x000000010823eac8 +[RLMRealm realmWithConfiguration:queue:error:] + 156
      17 RealmSwift 0x000000010750037c $sSo8RLMRealmC13configuration5queueABSo0A13ConfigurationC_So012OS_dispatch_C0CSgtKcfCTO + 144
      18 RealmSwift 0x00000001075b904c $s10RealmSwift0A0V13configuration5queueA2C13ConfigurationV_So012OS_dispatch_D0CSgtKcfC + 192
      19 DroneApp 0x0000000100b1b780 $s8DroneApp12RealmServiceC010setupLocalC09encryptedySb_tFyyXEfU_ + 2588
      20 DroneApp 0x0000000100b1f0ac $s8DroneApp12RealmServiceC010setupLocalC09encryptedySb_tFyyXEfU_TA + 32
      21 libswiftObjectiveC.dylib 0x00000001c5040c18 $s10ObjectiveC15autoreleasepool8invokingxxyKXE_tKlF + 56
      22 DroneApp 0x0000000100b1ad34 $s8DroneApp12RealmServiceC010setupLocalC09encryptedySb_tF + 136
      23 DroneApp 0x0000000100cecc00 $s8DroneApp0B8DelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtF + 464
      24 DroneApp 0x0000000100ced314 $s8DroneApp0B8DelegateC11application_29didFinishLaunchingWithOptionsSbSo13UIApplicationC_SDySo0j6LaunchI3KeyaypGSgtFTo + 196
      25 UIKitCore 0x00000001853e4a40 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 312
      26 UIKitCore 0x00000001853e5ea0 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 2788
      27 UIKitCore 0x00000001853ea9e8 -[UIApplication _runWithMainScene:transitionContext:completion:] + 856
      28 UIKitCore 0x0000000184a8a8ec -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 148
      29 UIKitCore 0x00000001853e7ccc -[UIApplication _compellApplicationLaunchToCompleteUnconditionally] + 44
      30 UIKitCore 0x00000001853e801c -[UIApplication _run] + 832
      31 UIKitCore 0x00000001853ebcc8 UIApplicationMain + 124
      32 DroneApp 0x0000000100ced7bc main + 64
      33 dyld 0x0000000102605544 start_sim + 20
      34 ??? 0x0000000101ff60e0 0x0 + 4328480992
      35 ??? 0xd027800000000000 0x0 + 14999097821469081600
      !!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose

      Steps & Code to Reproduce

      <!-- What steps/operations resulted in the crash? Please show any relevant code or steps that WE can
      <!-- use to reproduce it. Even better is a full sample project that can reproduce the crash. -->
      <!-- Code and files can be shared privately at help@realm.io if needed. -->

      Opening in my app the part where Realm is needed.

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: