realm-core icon indicating copy to clipboard operation
realm-core copied to clipboard

encryption related crash on ios device

Open amondnet opened this issue 1 year ago • 2 comments

SDK and version

SDK: flutter Version: 1.6.1

Observations

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

Crash log / stacktrace

/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 #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.#### Steps & Code to Reproduce

It didn't crash until last week. Since I updated the realm bundled yesterday, it crashes only on ios device. android, ios simulator does not have the problem.

  1. if we are not using encryption, there is no problem.
  2. file size is 48603136 byte

amondnet avatar Jan 12 '24 06:01 amondnet

https://github.com/realm/realm-core/issues/7080

amondnet avatar Jan 15 '24 07:01 amondnet

Hi @amondnet. We will release fix in next version. We have a few more things to wrap up first, but it should be soon.

nielsenko avatar Jan 15 '24 08:01 nielsenko

this is a dup of https://github.com/realm/realm-core/issues/7322

nicola-cab avatar Mar 13 '24 12:03 nicola-cab