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

Realm crashes during deleteRealmIfMigrationNeeded: true migration #7611

Open
ppave opened this issue Apr 23, 2024 · 3 comments
Open

Realm crashes during deleteRealmIfMigrationNeeded: true migration #7611

ppave opened this issue Apr 23, 2024 · 3 comments

Comments

@ppave
Copy link

ppave commented Apr 23, 2024

How frequently does the bug occur?

5-10 crashes for every 5k users.

Description

Recently I've updated the Realm Swift SDK from 10.7.2 to 10.43.1 and started to see the following crashes that have not seen before. These crashes happen when the app starts and seems like when migration happens.

The following settings are used for migration:

let config = Realm.Configuration(
          fileURL: path,
          schemaVersion: version, // hardcoded value across all schema versions
          migrationBlock: { migration, oldSchemaVersion in 
          },
          deleteRealmIfMigrationNeeded: true
      )
Realm.Configuration.defaultConfiguration = config

Any ideas how to fix/bypass these crashes?
Thanks.

Stacktrace & log output

Crashed: com.apple.main-thread
0  libsystem_kernel.dylib         0x7198 __pthread_kill + 8
1  libsystem_pthread.dylib        0xd5f8 pthread_kill + 208
2  libsystem_c.dylib              0x1c4b8 abort + 124
3  Application                    0x1460744 realm::util::terminate(char const*, char const*, long, std::initializer_list<realm::util::Printable>&&) + 148 (terminate.cpp:148)
4  Application                    0x1460984 realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) + 143 (terminate.cpp:143)
5  Application                    0x1460864 realm::util::terminate_with_info(char const*, char const*, long, char const*, std::initializer_list<realm::util::Printable>&&) + 156 (terminate.cpp:156)
6  Application                    0x1460758 realm::util::terminate_with_info(char const*, char const*, long, char const*, std::initializer_list<realm::util::Printable>&&) + 155 (terminate.cpp:155)
7  Application                   0x11d3980 realm::DB::VersionManager::cleanup_versions(unsigned long long&, std::__1::map<unsigned long long, realm::VersionInfo, std::__1::less<unsigned long long>, std::__1::allocator<std::__1::pair<unsigned long long const, realm::VersionInfo>>>&, bool&) + 81 (initializer_list:81)
8  Application                    0x11d308c realm::DB::low_level_commit(unsigned long long, realm::Transaction&, bool) + 1135 (__tree:1135)
9  Application                    0x11d2f7c realm::DB::do_commit(realm::Transaction&, bool) + 473 (replication.hpp:473)
10 Application                    0x1433588 realm::Transaction::commit_and_continue_as_read(bool) + 264 (transaction.cpp:264)
11 Application                    0x127f2d4 realm::_impl::RealmCoordinator::commit_write(realm::Realm&, bool) + 1423 (vector:1423)
12 Application                    0x12c0c28 realm::Realm::commit_transaction() + 1080 (shared_realm.cpp:1080)
13 Application                    0x10901e0 -[RLMRealm commitWriteTransactionWithoutNotifying:error:] + 648 (RLMRealm.mm:648)
14 Application                    0x1131ba4 Realm.commitWrite(withoutNotifying:) + 332 (Realm.swift:332)
15 Application                    0x1131ac0 Realm.write<A>(withoutNotifying:_:) + 270 (Realm.swift:270)

Can you reproduce the bug?

No

Reproduction Steps

No response

Version

10.43.1

What Atlas Services are you using?

-- select --

Are you using encryption?

No

Platform OS and version(s)

different versions of iOS

Build environment

Xcode version: 15
Dependency manager and version: SPM

This comment was marked as outdated.

@nirinchev nirinchev transferred this issue from realm/realm-swift Apr 23, 2024
@nirinchev
Copy link
Member

Moved this from Realm-Swift as this seems to be a crash somewhere in Core.

Copy link

sync-by-unito bot commented Apr 23, 2024

➤ PM Bot commented:

Jira ticket: RCORE-2093

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants