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 when I try to configure, to save, to update some staff. #3316

Closed
adevios opened this issue Mar 11, 2016 · 4 comments
Closed

Realm crashes when I try to configure, to save, to update some staff. #3316

adevios opened this issue Mar 11, 2016 · 4 comments
Assignees

Comments

@adevios
Copy link

adevios commented Mar 11, 2016

Goals

I'm trying to configure, to save, to update some staff. But always I receive crash.

https://gyazo.com/378c8a0ad91844066bd728856865a32f

Expected Results

I expect that there are no crashes.

Actual Results

https://gyazo.com/378c8a0ad91844066bd728856865a32f

Code Sample

...
NSInteger const kDatabaseVersion = 1;
...
- (void)configureDatabase {
    RLMRealmConfiguration *config = [RLMRealmConfiguration defaultConfiguration];
    config.schemaVersion = kDatabaseVersion;
    config.migrationBlock = ^(RLMMigration *migration, uint64_t oldSchemaVersion) {

        if (oldSchemaVersion < kDatabaseVersion) {}
    };

    [RLMRealmConfiguration setDefaultConfiguration:config];

    [RLMRealm defaultRealm];
}

or I just try to add new item to Realm:

        @try {
            RLMRealm *realm = [RLMRealm defaultRealm];
            [realm beginWriteTransaction];
            [realm addObject:pair];
            [realm commitWriteTransaction];
        }

Version of Realm and Tooling

I'm using Pods: Realm (0.98.4)

jpsim added a commit to jpsim/GH3316 that referenced this issue Mar 12, 2016
@jpsim jpsim self-assigned this Mar 12, 2016
@jpsim
Copy link
Contributor

jpsim commented Mar 12, 2016

Hi @alychkouski, I took the time to create a project with your sample code and haven't been unable to reproduce the issue you've reported: https://github.com/jpsim/GH3316

Could you please either let me know what my repro case is missing to trigger the problem you've reported, or better yet, send us a full Xcode project that triggers the issue?

Thanks!

@Cellane
Copy link

Cellane commented Mar 16, 2016

I think I'm having the same issue. I've added Realm to my project via CocoaPods with the use_frameworks! option on (might be important, probably?) and anytime I access the database, Realm would crash with EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN). Also, I didn't observe this behaviour just during database configuration or entry updates – even the simplest queries would crash Realm completely.

Downgrading to 0.98.2 “solved” the issue for me. I will try to replicate the issue in an empty project this evening.

@Cellane
Copy link

Cellane commented Mar 16, 2016

Added pull request to the jpsim/GH3316 repository with changes to force the test project to crash. However, I didn't realise that the 0.98.5 version was released just a few days ago, 0.98.5 is definitely fine and not affected by the issue, at least not for me. 0.98.4 was throwing the same errors as the reporter had for me, but 0.98.5 is fine.

@bdash
Copy link
Contributor

bdash commented Mar 16, 2016

This is the same crash as #3321 and was fixed in v0.98.5.

@bdash bdash closed this as completed Mar 16, 2016
@bdash bdash added T-Duplicate and removed T-Help labels Mar 16, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 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

6 participants