realm / realm-browser-osx

DEPRECATED - Realm Browser for Mac OS X has been replaced by realm-studio which is cross platform.
https://realm.io
502 stars 54 forks source link

Realm browser crashes before opening realm file. #259

Closed anjanibansal closed 7 years ago

anjanibansal commented 7 years ago

I have been trying to open my Android app's Realm database in the browser but it's not happening. It used to work properly before but now it just "quits unexpectedly" as soon as I open the file. I have Realm browser 2.1.2 and I'm using Realm 2.2.2 in my project, both of which, i believe, are the latest versions.
I'm using this method to obtain my database file:
http://stackoverflow.com/a/29849902

I'm configuring my realm like this:

RealmConfiguration config1 = new RealmConfiguration.Builder()
                .name("default4")
                .schemaVersion(4)
                .migration(new Migration())
                .build();
        Realm.setDefaultConfiguration(config1);

Am I missing some thing? I'd really appreciate any help.

stel commented 7 years ago

Hi @anjanibansal! Thank you for reporting this! Could you please provide some more info about this crash? Any error messages or even better an example Realm file to reproduce it, thanks!

stel commented 7 years ago

Hi @anjanibansal! Do you still experience this issue? Did you have a chance to find any error logs or messages?

stel commented 7 years ago

I'm closing this issue for now. @anjanibansal feel free to reopen it if you have a chance to reproduce this case.

anjanibansal commented 7 years ago

The problem is still there. Every time I open a realm file, the browser crashes.

Exception Type:  SIGABRT
Exception Codes: #0 at 0x7fff8936c866  

Application Specific Information:  
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSTextField placeholderAttributedString]: unrecognized selector sent to instance 0x6000001971b0'

I've sent you the crash report from within the Realm Browser app.

Incident Identifier: FB60FAEC-1EFD-45EA-ACBF-9306AA747CB4
CrashReporter Key:   BD9442DE-3C18-5A9A-8783-E2A0772DCE71
anjanibansal commented 7 years ago

Here's the exported realm file from my app, which I'm trying to open.

export.realm.zip

stel commented 7 years ago

Thanks for sending an example Realm file, @anjanibansal!

I was able to open it with the latest version (2.1.4) of the Realm Browser without any errors. Please make sure that you use the latest version of the Browser. Also please make sure the Realm file you're trying to open in not opened with the simulator at the same time, see more info in https://github.com/realm/realm-browser-osx/issues/239#issuecomment-263360452

anjanibansal commented 7 years ago

I still am unable to open my database file. I've installed Realm Browser 2.1.4. I'm not using any simulators to run my app. I'm using a real Android device to debug it. I'm not trying to open the original Realm file but instead I'm copying its contents & then trying to open that copy. I've even disconnected my device before opening the file in browser & the same thing happens. The file opens momentarily & then the browser crashes.

Please suggest what else can I do?

anjanibansal commented 7 years ago

Here's the log that I get when I try to reopen the browser.

log.txt

stel commented 7 years ago

Oh, I didn't noticed that you use OS X 10.9, it looks like this issue is not related to the realm file at all, but there is some incompatibility with the previous version of AppKit. I'll take a closer look on it as soon as possible.

stel commented 7 years ago

@anjanibansal I've just merged a fix for this issue, not it should work ;)