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 at REALM_DEFINE_TERMINATE_VERSIONED(REALM_VERSION_SUFFIX_CONCAT) #7021

Closed
N1GGO opened this issue Oct 2, 2023 · 5 comments
Closed

Comments

@N1GGO
Copy link

N1GGO commented Oct 2, 2023

SDK and version

SDK : SPM
Version: 10.43.0

Observations

  • How frequent do the crash occur?
    everytime after AppStart

Crash log / stacktrace

Assertion failed: new_size % (1ULL << m_page_shift) == 0

I use the following code:

let data = "ENCRYPTIONKEY".data(using: String.Encoding.utf8, allowLossyConversion: false)
let config = Realm.Configuration(encryptionKey: data)
let defaultPath = config.fileURL!.path
let path = Bundle.main.path(forResource: Config.realmName, ofType: "realm")!
realm = try Realm(configuration: config) --> this line crashes

@modgsan
Copy link

modgsan commented Oct 3, 2023

I have the same error.
var config = Configuration.local([
.....
], path:dbPath,
encryptionKey:encryptionKey
);
print("=============${config.path}=========");
return Realm(config);

it will crash when I run to iOS device, but android and iOS simulator are ok

encrypted_file_mapping.cpp:1028: [realm-core-13.17.2] Assertion failed: new_size % (1ULL << m_page_shift) == 0
0 realm_dart 0x0000000105d4afe8 _ZN5realm4utilL18terminate_internalERNSt3__118basic_stringstreamIcNS1_11char_traitsIcEENS1_9allocatorIcEEEE + 28
1 realm_dart 0x0000000105d4af30 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 400
2 realm_dart 0x0000000105d4ada0 _ZN5realm4util19terminate_with_infoEPKcS2_lS2_OSt16initializer_listINS0_9PrintableEE + 0

[realm-core-13.17.2] Assertion failed: new_size % (1ULL << m_page_shift) == 0

@aaru
Copy link

aaru commented Oct 28, 2023

more details on this error is captured here - #7322

@aaru
Copy link

aaru commented Oct 28, 2023

This error started from 13.17.0 (realm-core), downgrading to 13.15.1 resolved my issue.

@amondnet
Copy link

/Users/runner/work/realm-dart/realm-dart/src/realm-core/src/realm/util/encrypted_file_mapping.cpp:1028: [realm-core-13.24.0] Assertion failed: new_size % (1ULL << m_page_shift) == 0
<backtrace not supported on this platform>
!!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose2024-01-11 18:32:26.934833+0900 Runner[7905:2699530] /Users/runner/work/realm-dart/realm-dart/src/realm-core/src/realm/util/encrypted_file_mapping.cpp:1028: [realm-core-13.24.0] Assertion failed: new_size % (1ULL << m_page_shift) == 0
<backtrace not supported on this platform>
!!! IMPORTANT: Please report this at https://github.com/realm/realm-core/issues/new/choose
* thread realm/realm-swift#10, name = 'io.flutter.1.ui', stop reason = signal SIGABRT
    frame #0: 0x00000001bb367bbc libsystem_kernel.dylib`__pthread_kill + 8
libsystem_kernel.dylib`:
->  0x1bb367bbc <+8>:  b.lo   0x1bb367bd8               ; <+36>
    0x1bb367bc0 <+12>: stp    x29, x30, [sp, #-0x10]!
    0x1bb367bc4 <+16>: mov    x29, sp
    0x1bb367bc8 <+20>: bl     0x1bb36360c               ; cerror_nocancel
Target 0: (Runner) stopped.

@nicola-cab
Copy link
Member

Closing this because it is a dup of #7322 .. @finnschiermer apparently we have multiple instance of the same problem.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants