-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Crash when instantiating new instance of realm #6828
Comments
That crash log does not show a crash inside Realm. The crash is on the main thread, not on the background thread where a Realm is being opened. |
@tgoyne - Crash reporting tool Appcenter is pointing to realm thread. I updated ticket with stacktrace |
@dheeraj-singh511 If you could give us a self contained reproduction case that would be very helpful. Also please update to version 5.4.7 and see if that helps. Thanks |
@leemaguire - I analyzed logs when the crash happened but did not seem to find any pattern. I am unable to replicate it. As per the stack trace, it is crashing when app tries to create new realm instance. Meanwhile, I will upgrade to 5.4.7. I will update you if the crash is still seen. |
Closing due to inactivity, if the issue persists with the latest version of Realm please open a new issue. Thanks. |
Goals
App should not crash
Expected Results
App should not crash
Actual Results
App crashed when trying to instantiate new instance of realm using try Realm()
Stack trace
Incident Identifier: 3660b9c1-2382-412d-9809-1ae5a2ae406b
CrashReporter Key: E46940E5-4517-44EB-B171-AFB50593EBCC
Hardware Model: iPhone8,2
Process: MyApp [388]
Path: /private/var/containers/Bundle/Application/02283985-9BA3-4E62-AD57-5F13D282E65A/MyApp.app/MyApp
Identifier: com.myApp.phone2
Version: 4.0.966 (4.0.966)
Code Type: arm64
Parent Process: ??? [1]
Date/Time: 2020-09-27T17:42:55.999Z
Launch Time: 2020-09-27T17:24:25Z
OS Version: iPhone OS 13.7 (17H35)
Report Version: 104
Exception Type: SIGSEGV
Exception Codes: SEGV_ACCERR at 0x93e035778
Crashed Thread: 25
Thread 25 Crashed:
0 Realm 0x0000000104283898 long long realm::Array::get<64ul>(unsigned long) const + 4
1 Realm 0x00000001040d575c non-virtual thunk to realm::Array::get_child_ref(unsigned long) const (array.hpp:1087)
2 Realm 0x00000001043bebdc realm::Table::init(unsigned long, realm::ArrayParent*, unsigned long, bool, bool) + 448
3 Realm 0x000000010431a744 realm::Group::create_table_accessor(unsigned long) + 752
4 Realm 0x000000010431a3f4 realm::Group::do_get_table(unsigned long) + 92
5 Realm 0x00000001040e976c realm::ObjectSchema::ObjectSchema(realm::Group const&, realm::StringData, realm::TableKey) (group.hpp:1169)
6 Realm 0x00000001040f0d08 realm::ObjectStore::schema_from_group(realm::Group const&) (memory:1826)
7 Realm 0x00000001041d454c realm::Realm::read_schema_from_group_if_needed() (shared_realm.cpp:204)
8 Realm 0x00000001041d4364 realm::Realm::Realm(realm::Realm::Config, realm::util::Optionalrealm::VersionID, std::__1::shared_ptrrealm::_impl::RealmCoordinator, realm::Realm::MakeSharedTag) (shared_realm.cpp:68)
9 Realm 0x000000010410517c std::*1::shared_ptrrealm::Realm std::*1::shared_ptrrealm::Realm::make_shared<realm::Realm::Config, realm::util::Optionalrealm::VersionID, std::*1::shared_ptrrealm::_impl::RealmCoordinator, realm::Realm::MakeSharedTag>(realm::Realm::Config&&, realm::util::Optionalrealm::VersionID&&, std::*1::shared_ptrrealm::_impl::RealmCoordinator&&, realm::Realm::MakeSharedTag&&) (memory:2156)
10 Realm 0x00000001040fecf8 realm::_impl::RealmCoordinator::do_get_realm(realm::Realm::Config, std::__1::shared_ptrrealm::Realm&, realm::util::Optionalrealm::VersionID, realm::util::CheckedUniqueLock&) (memory:4710)
11 Realm 0x00000001040feaa0 realm::_impl::RealmCoordinator::get_realm(realm::Realm::Config, realm::util::Optionalrealm::VersionID) (realm_coordinator.cpp:264)
12 Realm 0x00000001041d4ccc realm::Realm::get_shared_realm(realm::Realm::Config) (shared_realm.cpp:144)
13 Realm 0x00000001041a3fc4 +[RLMRealm realmWithConfiguration:queue:error:] (RLMRealm.mm:504)
14 RealmSwift 0x0000000104929314 RealmSwift.Realm.init(queue: __C.OS_dispatch_queue?) throws
> RealmSwift.Realm (<compilergenerated>:0)15 MyApp 0x0000000102e0fe88 function signature specialization <Arg[0] = Dead> of generic specialization <MyApp.MStoreDate> of MyApp.UnifiedDatabase.(realm in _15EE5ABE828ED209C1CFF5BDEB0C36C4).getter : RealmSwift.Realm? (UnifiedDatabase.swift:30)
16 MyApp 0x0000000102540778 MyApp.CallLogsDao.getUnSeenCallLogsCount()
> Swift.Int (<compilergenerated>:0)17 MyApp 0x000000010254b140 closure #1 (MyApp.UnifiedDatabase<MyApp.CallLogEntry>.ModelResult) -> RxSwift.Observable<Swift.Int> in MyApp.CallLogsDao.(unseenCallLogsObservable in _1CBF34422121120377EAA44982ED4E49).getter : RxSwift.Observable<Swift.Int> (CallLogsDao.swift:257)
18 MyApp 0x000000010254d988 partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed MyApp.UnifiedDatabase<MyApp.CallLogEntry>.ModelResult) -> (@owned RxSwift.Observable<Swift.Int>, @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed MyApp.UnifiedDatabase<MyApp.CallLogEntry>.ModelResult)
> (@out RxSwift.Observable<Swift.Int>, @error @owned Swift.Error) (<compilergenerated>:0)19 RxSwift 0x0000000104d6770c RxSwift.(FlatMapSink in _DDEA0423368B3B462AE46699A4D080E1).performMap(A) throws -> B (Merge.swift:352)
20 RxSwift 0x0000000104d66e5c RxSwift.(MergeSink in _DDEA0423368B3B462AE46699A4D080E1).on(RxSwift.Event) -> () (Merge.swift:443)
21 RxSwift 0x0000000104d67db4 protocol witness for RxSwift.ObserverType.on(RxSwift.Event<A.Element>)
> () in conformance RxSwift.(MergeSink in _DDEA0423368B3B462AE46699A4D080E1)<A, B, C> : RxSwift.ObserverType in RxSwift (<compilergenerated>:0)22 RxSwift 0x0000000104d6f794 partial apply forwarder (:0)
23 RxSwift 0x0000000104d8b9c0 partial apply forwarder for reabstraction thunk helper <A1 where A == A1.Element, A1: RxSwift.ObserverType> from @escaping @callee_guaranteed (@in_guaranteed RxSwift.Event) -> () to @escaping @callee_guaranteed (@in_guaranteed RxSwift.Event)
> (@out ()) (<compilergenerated>:0)24 RxSwift 0x0000000104d8a960 merged RxSwift.(ShareReplay1WhileConnectedConnection in _E9FE621655D67A613BF2FC2D9B3041FC).on(RxSwift.Event) -> () + 296
25 RxSwift 0x0000000104d8a3d4 protocol witness for RxSwift.ObserverType.on(RxSwift.Event<A.Element>)
> () in conformance RxSwift.(ShareReplay1WhileConnectedConnection in _E9FE621655D67A613BF2FC2D9B3041FC): RxSwift.ObserverType in RxSwift (<compilergenerated>:0)26 RxSwift 0x0000000104d6ddc0 RxSwift.(ObserveOnSink in 277A93ABA8477198C125F3F26B2D4B62).run((), (())
> ())> () (ObserveOn.swift:117)27 RxSwift 0x0000000104d6f000 partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@unowned @callee_guaranteed () -> ())
> () to @escaping @callee_guaranteed (@in_guaranteed (), @unowned @callee_guaranteed (@in_guaranteed ())> ())> () (<compilergenerated>:0)28 RxSwift 0x0000000104d7cdf0 partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed A, @unowned @callee_guaranteed (@in_guaranteed A) -> ())
> () to @escaping @callee_guaranteed (@in_guaranteed A, @in_guaranteed @callee_guaranteed (@in_guaranteed A)> (@out ()))> (@out ()) (<compilergenerated>:0)29 RxSwift 0x0000000104d7c728 closure #1 (A) -> RxSwift.Disposable in RxSwift.RecursiveImmediateScheduler.schedule(A)
> () (<compilergenerated>:0)30 RxSwift 0x0000000104d54e98 closure #1 () -> () in RxSwift.DispatchQueueConfiguration.schedule(: A, action: (A)
> RxSwift.Disposable)> RxSwift.Disposable (DispatchQueueConfiguration.swift:27)31 RxSwift 0x0000000104d4801c reabstraction thunk helper from @escaping @callee_guaranteed () -> () to @escaping @callee_unowned @convention(block) ()
> () (<compilergenerated>:0)32 libdispatch.dylib 0x0000000198ef19a8 _dispatch_call_block_and_release + 20
33 libdispatch.dylib 0x0000000198ef2524 _dispatch_client_callout + 12
34 libdispatch.dylib 0x0000000198e9ae98 _dispatch_continuation_pop$VARIANT$mp + 408
35 libdispatch.dylib 0x0000000198e9a6a8 _dispatch_async_redirect_invoke + 840
36 libdispatch.dylib 0x0000000198ea7438 _dispatch_root_queue_drain + 372
37 libdispatch.dylib 0x0000000198ea7bf8 _dispatch_worker_thread2 + 120
38 libsystem_pthread.dylib 0x0000000198f43b38 _pthread_wqthread + 208
39 libsystem_pthread.dylib 0x0000000198f46740 start_wqthread + 4
Thread 0:
0 libsystem_kernel.dylib 0x0000000199000198 mach_msg_trap + 8
1 CoreFoundation 0x00000001991aa328 __CFRunLoopServiceMachPort + 144
2 CoreFoundation 0x00000001991a535c __CFRunLoopRun + 1156
3 CoreFoundation 0x00000001991a4ba8 CFRunLoopRunSpecific + 420
4 GraphicsServices 0x00000001a331b344 GSEventRunModal + 156
5 UIKitCore 0x000000019d2e03e4 UIApplicationMain + 1928
6 MyApp 0x00000001020d470c main (AppDelegate.swift:39)
7 libdyld.dylib 0x000000019902c8f0 start + 0
Attached crash log
Steps for others to Reproduce
No particular pattern or steps
Code Sample
the last realm API called from app in the stack trace
let rlm = try Realm()
Version of Realm and Tooling
Realm framework version:
pod 'Realm', '5.4.4'
pod 'RealmSwift', '5.4.4'
Realm Object Server version: N/A
Xcode version: Version 11.3.1 (11C504)
iOS/OSX version: iPhone OS 13.7
Dependency manager + version: CocoaPods
The text was updated successfully, but these errors were encountered: