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 crash everytime call to Realm (please_report_this_error_to_help_at_realm_dot_io) #2403

Closed
minhhien177 opened this issue Aug 17, 2015 · 8 comments

Comments

@minhhien177
Copy link

My app accesses to Realm in App Become Active event and it crashes immediately and there's no way to get out of it, my tester has to remove and reinstall the app. It does not happen everytime but once it happens, we cannot open the app because it crashes right in app become active. Here is the crash logs:

Thread : Crashed: com.apple.main-thread
0  libsystem_kernel.dylib         0x3467fd24 __pthread_kill + 8
1  libsystem_pthread.dylib        0x3471fb5b pthread_kill + 62
2  libsystem_c.dylib              0x34617f51 abort + 108
3  JustSayHi                      0x004b2329 please_report_this_error_to_help_at_realm_dot_io + 21816
4  JustSayHi                      0x004b24b9 realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 22216
5  JustSayHi                      0x004f57ff realm::util::terminate(char const*, char const*, long) + 510
6  JustSayHi                      0x004c29e7 realm::ColumnBaseWithIndex::set_search_index_ref(unsigned long, realm::ArrayParent*, unsigned long, bool) + 89078
7  JustSayHi                      0x004e7d09 realm::Table::refresh_column_accessors(unsigned long) + 241432
8  JustSayHi                      0x004d269b realm::Group::create_table_accessor(unsigned long) + 153770
9  JustSayHi                      0x004d24d9 realm::Group::do_get_table(unsigned long, bool (*)(realm::Spec const&)) + 153320
10 JustSayHi                      0x004e7bd1 realm::Table::refresh_column_accessors(unsigned long) + 241120
11 JustSayHi                      0x004d269b realm::Group::create_table_accessor(unsigned long) + 153770
12 JustSayHi                      0x004d24d9 realm::Group::do_get_table(unsigned long, bool (*)(realm::Spec const&)) + 153320
13 JustSayHi                      0x003ef461 realm::ObjectStore::table_for_object_type(realm::Group*, realm::StringData) (bind_ptr.hpp:143)
14 JustSayHi                      0x003b7f69 RLMUpdateRealmToSchemaVersion (RLMObjectStore.mm:127)
15 JustSayHi                      0x003dc1a1 +[RLMRealm realmWithPath:key:readOnly:inMemory:dynamic:schema:error:] (RLMRealm.mm:424)
16 JustSayHi                      0x003db9f9 +[RLMRealm realmWithPath:readOnly:error:] (RLMRealm.mm:328)
17 JustSayHi                      0x003db937 +[RLMRealm defaultRealm] (RLMRealm.mm:314)
18 JustSayHi                      0x003b0aa5 +[RLMObject objectsWithPredicate:] (RLMObject.mm:133)
19 JustSayHi                      0x0011e078 static JustSayHi.JSHUser.currentUser (JustSayHi.JSHUser.Type)() -> Swift.Optional<JustSayHi.JSHUser> (JSHUser.swift:252)
20 JustSayHi                      0x0018e118 function signature specialization <Arg[0] = Owned To Guaranteed> of JustSayHi.AppDelegate.applicationDidBecomeActive (JustSayHi.AppDelegate)(ObjectiveC.UIApplication) -> () (AppDelegate.swift:90)
21 JustSayHi                      0x0018b698 @objc JustSayHi.AppDelegate.applicationDidBecomeActive (JustSayHi.AppDelegate)(ObjectiveC.UIApplication) -> () (AppDelegate.swift)
22 UIKit                          0x26a261ef -[UIApplication _stopDeactivatingForReason:] + 1050
23 UIKit                          0x26c39a75 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2104
24 UIKit                          0x26c4c15d __84-[UIApplication _handleApplicationActivationWithScene:transitionContext:completion:]_block_invoke3152 + 36
25 UIKit                          0x26c36dd7 -[UIApplication workspaceDidEndTransaction:] + 134
26 FrontBoardServices             0x2a970ccd -[FBSSerialQueue _performNext] + 232
27 FrontBoardServices             0x2a970fb9 -[FBSSerialQueue _performNextFromRunLoopSource] + 44
28 CoreFoundation                 0x2288e407 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 14
29 CoreFoundation                 0x2288dff7 __CFRunLoopDoSources0 + 454
30 CoreFoundation                 0x2288c35f __CFRunLoopRun + 806
31 CoreFoundation                 0x227ded89 CFRunLoopRunSpecific + 516
32 CoreFoundation                 0x227deb7d CFRunLoopRunInMode + 108
33 UIKit                          0x26a0cbdf -[UIApplication _run] + 526
34 UIKit                          0x26a0799d UIApplicationMain + 144
35 JustSayHi                      0x0018dadc main (AppDelegate.swift:16)
36 libdyld.dylib                  0x345b0873 start + 2

Anybody is facing this issue, it's killing me :(

@bmunkholm
Copy link
Contributor

Sounds like your realm file gets corrupted. Which version of Realm are you using?

@minhhien177
Copy link
Author

I use Realm version 0.94 installed by cocoapods. Thanks for your response btw.

@bmunkholm
Copy link
Contributor

It does look related to a bug we have seen and fixed in the beta version of null support: #628.
If you have not released yet, you might interested in trying that out. It should hopefully get officially released really soon now.

@minhhien177
Copy link
Author

Unluckily, the app was released already and we're receiving many feedbacks about this. Anyway, I'll try this fix, but it's in beta. Do we have other ways to prevent this to happen? It looks like Realm crash sometime when we call createOrUpdateInRealm and after that app crashes forever.

@segiddins
Copy link
Contributor

@minhhien177 if you could share both the Realm file and the actual assertion failure message, that would be very helpful in letting us check if this is a known issue. Thanks!

@jpsim
Copy link
Contributor

jpsim commented Sep 1, 2015

@minhhien177 just following up on our request for the corrupted realm file and assertion failure message. We'd love to help you with this, but need more information... thanks!

@minhhien177
Copy link
Author

Ok I will send you the Realm file when it happens again. Btw, we'll upgrage realm to 0.95, hope this helps to fix the issue.

@realm-ci realm-ci removed the pending label Sep 1, 2015
@jpsim
Copy link
Contributor

jpsim commented Sep 1, 2015

Great, let us know!

@jpsim jpsim closed this as completed Sep 1, 2015
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants