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

App crashes while initializing Realm with configuration #4476

Closed
apalvai opened this issue Dec 21, 2016 · 7 comments
Closed

App crashes while initializing Realm with configuration #4476

apalvai opened this issue Dec 21, 2016 · 7 comments
Labels

Comments

@apalvai
Copy link

apalvai commented Dec 21, 2016

We recently updated out app to use swift version of library from the objc version.

App crashes as soon as it tries to create Realm instance.

Below is the stack trace of the crashed thread.

Incident Identifier: 730E4AE6-0217-4518-8C9A-60F1D90F071C
CrashReporter Key:   22517670-5381-424D-BD8D-FBA16F6D5788
Hardware Model:      iPhone7,2
Process:         MyApp [223]
Path:            /var/containers/Bundle/Application/F4002170-D8AD-46D1-B8D2-FA5EFBF239D0/MyApp.app/MyApp
Identifier:      com.MyApp.MyApp
Version:         2.60.01 (1086)
Code Type:       ARM-64
Parent Process:  ??? [1]

Date/Time:       2016-12-21T18:49:03Z
Launch Time:     2016-12-21T18:49:02Z
OS Version:      iPhone OS 10.1.1 (14B100)
Report Version:  104

Exception Type:  SIGABRT
Exception Codes: #0 at 0x18a902014
Crashed Thread:  0

Thread 0 Crashed:
0   libsystem_kernel.dylib               0x000000018a902014 __pthread_kill + 8
1   libsystem_pthread.dylib              0x000000018a9ca450 pthread_kill + 108
2   libsystem_c.dylib                    0x000000018a8763e0 abort + 136
3   Realm                                0x0000000100e8e4dc please_report_this_error_to_help_at_realm_dot_io + 8
4   Realm                                0x0000000100e8e79c realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 228
5   Realm                                0x0000000100e8e928 realm::util::terminate(char const*, char const*, long, std::initializer_list<realm::util::Printable>&&) + 364
6   Realm                                0x0000000100d5519c void realm::util::terminate<unsigned long long, unsigned long long>(char const*, char const*, long, unsigned long long, unsigned long long) (terminate.hpp:56)
7   Realm                                0x0000000100f37a80 realm::Group::attach(unsigned long, bool) + 612
8   Realm                                0x0000000100f429b8 realm::SharedGroup::do_begin_read(realm::VersionID, bool) + 72
9   Realm                                0x0000000100f41d70 realm::SharedGroup::begin_read(realm::VersionID) + 32
10  Realm                                0x0000000100e167e8 realm::Realm::read_group() (shared_realm.cpp:228)
11  Realm                                0x0000000100e16608 realm::Realm::init(std::__1::shared_ptr<realm::_impl::RealmCoordinator>) (shared_realm.cpp:93)
12  Realm                                0x0000000100d6d08c realm::_impl::RealmCoordinator::get_realm(realm::Realm::Config) (realm_coordinator.cpp:176)
13  Realm                                0x0000000100e17a00 realm::Realm::get_shared_realm(realm::Realm::Config) (shared_realm.cpp:244)
14  Realm                                0x0000000100dfd144 +[RLMRealm realmWithConfiguration:error:] (RLMRealm.mm:293)
15  RealmSwift                           0x00000001012ecbb0 RealmSwift.Realm.__allocating_init (configuration : RealmSwift.Realm.Configuration) throws -> RealmSwift.Realm (Realm.swift:0)
16  MyApp                                0x00000001004ac36c MyApp.Manager.(getRealm in _53F2332CE3FD43C75AF4C0E7DDDA9E94) () -> RealmSwift.Realm? (Manager.swift:707)
17  MyApp                                0x00000001004b4de8 function signature specialization <Arg[0] = Owned To Guaranteed> of Manager.fetchAll (__ObjC.NSDate) -> () (Manager.swift:138)
18  MyApp                                0x00000001004a97b4 @objc MyApp.Manager.fetchAll (__ObjC.NSDate) -> () (Manager.swift:0)
19  MyApp                                0x0000000100217bc0 -[Summary checkAndUpdateBrandsFromDictionary:] (Summary.m:422)
20  MyApp                                0x00000001002173a8 -[Summary fetchedUserStateSummary:error:backgroundFetchCompletionHandler:] (Summary.m:264)
21  MyApp                                0x0000000100216fb0 __85-[Summary refreshWithBackgroundFetchCompletionHandler:isEnteringForeground:]_block_invoke (Summary.m:206)
22  MyApp                                0x00000001000d8590 APICompletionBlock_block_invoke_5 (APIRequest.m:320)
23  libdispatch.dylib                    0x000000018a7bd200 _dispatch_call_block_and_release + 20
24  libdispatch.dylib                    0x000000018a7bd1c0 _dispatch_client_callout + 12
25  libdispatch.dylib                    0x000000018a7c1d6c _dispatch_main_queue_callback_4CF + 996
26  CoreFoundation                       0x000000018b8dff2c __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 8
27  CoreFoundation                       0x000000018b8ddb18 __CFRunLoopRun + 1656
28  CoreFoundation                       0x000000018b80c048 CFRunLoopRunSpecific + 440
29  GraphicsServices                     0x000000018d292198 GSEventRunModal + 176
30  UIKit                                0x00000001917f82fc -[UIApplication _run] + 680
31  UIKit                                0x00000001917f3034 UIApplicationMain + 204
32  MyApp                                0x00000001000dd0a0 main (main.m:14)
33  libdyld.dylib                        0x000000018a7f05b8 start + 0

RealmSwift Version: 2.1.0
Xcode: 8.1
iOS Versions: 9 & 10

@jpsim jpsim added the T-Help label Dec 22, 2016
@jpsim
Copy link
Contributor

jpsim commented Dec 22, 2016

Your report indicates that this happened with Realm 2.1.0.

Have you seen this with Realm 2.1.1 or later? A corruption issue was fixed in 2.1.1 which may have been responsible for this crash.

Updating to this version won't automatically repair already corrupt files, so existing users who have experienced corruption will need to delete their affected Realm files. You can send these Realm files to us for forensic recovery if the data is critical.

It's possible that your issue is unrelated to this corruption issue, however. So if you can reproduce this with a fresh Realm file created with Realm 2.1.1 or later, please let us know here, making sure to share as much relevant information as you can gather.

Thanks.

@jpsim
Copy link
Contributor

jpsim commented Jan 3, 2017

Hi @apalvai, I'm just following up on my last comment from two weeks ago. Thanks!

@stel
Copy link
Contributor

stel commented Jan 16, 2017

I'm closing this issue because of inactivity, @apalvai please feel free to reopen it or create a new one if you have any additional info or need any help.

@apalvai
Copy link
Author

apalvai commented Feb 9, 2017

@stel we are still seeing this crash with v2.3.0 of RealmSwift library.
We first this crash when we updated our app to use realm swift, because of the amount of crashes we had to revert it to use objc version. We tried with updated v2.3.0 of RealmSwift in the latest version and we started seeing these crashes again.

screen shot 2017-02-09 at 12 39 18 pm

@jpsim
Copy link
Contributor

jpsim commented Feb 10, 2017

@apalvai could you please file a new issue, sharing enough information to allow us to reproduce this? We'd love to fix this, but it's hard to do without more information from you.

@jpsim
Copy link
Contributor

jpsim commented Feb 16, 2017

@apalvai could you please share an affected Realm file in realm/realm-core#2441 so we can investigate this?

@finnschiermer
Copy link

@apalvai do you use encryption?

@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.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants