You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, Realm crashes during startup, and the reason for the crash is that the database tables in another.realm file haven't been upgraded.
Error Reason
m_reason const std::string "Migration is required due to the following errors:\n- Property 'DBGroupInfo.nick_name' has been added.\n- Property 'DBGroupMember.nick_name' has been added.
However, in reality, the database migrations for both of these tables(DBGroupInfo.realm, DBGroupMemeber.realm) do have separate migrationBlocks defined to add the new fields.
So I don't understand why, when opening Conversation.realm, it checks the migration fields of other Realm files.
This error only started occurring after Xcode 16.2; it was working normally in previous versions.
Build an app containing multiple Realm databases using Xcode 14.2, realm-swfit:10.13
Install a new version of the app over the existing one, which includes Realm field updates migrated via migrationBlock.
Open the app using Xcode 16.2. The app crashes immediately (force closes). realm-swift:10.43.0
Version
10.43.0
What Atlas Services are you using?
Local Database only
Are you using encryption?
Yes
Platform OS and version(s)
iOS 18.3.1
Build environment
Xcode version: 16.2
Dependency manager and version: realm-swift:10.43.0
The text was updated successfully, but these errors were encountered:
Initially, the stack trace for this problem was confusing. Later, I found an issue that addressed the stack trace problem: realm/realm-core#7998. This indicated that when the exception was being thrown/propagated to Objective-C, another exception occurred, leading to a crash when what() was called. In short, an exception occurred during exception handling.
By continuously rolling back versions to find out what was triggering the exception, I eventually discovered the impact of the database migration.
So, if you encounter the issue where it crashes inside what(), you can try upgrading Realm to 10.54.3. Actual testing confirms that the crash does not occur with this version, but functional abnormalities remain.
How frequently does the bug occur?
Always
Description
I am currently encountering a rather strange issue.
When I open a Realm file, for example,
Conversation.realm
, which only containsConversationModel
. I am using the following code:Swift
However, Realm crashes during startup, and the reason for the crash is that the database tables in another
.realm
file haven't been upgraded.Error Reason
However, in reality, the database migrations for both of these tables(DBGroupInfo.realm, DBGroupMemeber.realm) do have separate
migrationBlock
s defined to add the new fields.So I don't understand why, when opening
Conversation.realm
, it checks the migration fields of other Realm files.This error only started occurring after Xcode 16.2; it was working normally in previous versions.
The Realm Swift version I am using is 10.43.0.
Stacktrace & log output
Can you reproduce the bug?
Always
Reproduction Steps
Okay, here is the translation of those steps:
Build an app containing multiple Realm databases using Xcode 14.2, realm-swfit:10.13
Install a new version of the app over the existing one, which includes Realm field updates migrated via migrationBlock.
Open the app using Xcode 16.2. The app crashes immediately (force closes). realm-swift:10.43.0
Version
10.43.0
What Atlas Services are you using?
Local Database only
Are you using encryption?
Yes
Platform OS and version(s)
iOS 18.3.1
Build environment
Xcode version: 16.2
Dependency manager and version: realm-swift:10.43.0
The text was updated successfully, but these errors were encountered: