realm / realm-swift

Realm is a mobile database: a replacement for Core Data & SQLite
https://realm.io
Apache License 2.0
16.21k stars 2.14k forks source link

App crash for iOS 12 using 'RealmSwift', '~> 3.20.0' #8638

Closed rajaMusharaf closed 2 days ago

rajaMusharaf commented 3 weeks ago

How frequently does the bug occur?

Always

Description

static void create_empty_group_when_missing(Group& group) { if (!group.m_top.is_attached()) group.create_empty_group(); // Throws }

Screenshot 2024-06-25 at 2 51 29 PM

Stacktrace & log output

Thread 1: EXC_BAD_ACCESS (code=1, address=0x2a2d4eb968cf)

Can you reproduce the bug?

Always

Reproduction Steps

let realm = try! Realm()

Version

3.20.0

What Atlas Services are you using?

Both Atlas Device Sync and Atlas App Services

Are you using encryption?

No

Platform OS and version(s)

iOS 12.5.6

Build environment

Xcode version: 15.0 Dependency manager and version: ...

sync-by-unito[bot] commented 3 weeks ago

➤ PM Bot commented:

Jira ticket: RCOCOA-2401

Jaycyn commented 2 weeks ago

The bug report is a little vague as there's no Realm code involved. The crash is shown but there's no context around what that function does so that would need to be included as well. Also, based on the report, are you actually using Ream 3.20.0? Or something later? Keeping in mind that 3.20.0 will not be file compatible with later versions and you'll need to go through an upgrade/migration process to use more current versions (3.20.0 was from Oct 21 2019)

rajaMusharaf commented 2 weeks ago

@nirinchev here is the more information:

Screenshot 2024-06-26 at 10 50 07 AM

in above image i added break point. after pressing stepover in xcode it goes to

Screenshot 2024-06-26 at 10 51 57 AM

with the crash.

nirinchev commented 2 weeks ago

This screenshot doesn't really give us new information - it's not obvious why creating an empty group would fail. That being said, as @Jaycyn pointed out, Realm Swift 3.20 is a very old version and we don't plan to investigate or backport fixes to it. Can you try to upgrade to the latest version and see if the issue still occurs?

github-actions[bot] commented 2 days ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.