You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As our app works in background (read/write to db) and after a day or two it stops (crashed in background), and when we try to launch manually app crash due to db is corrupted. It is not always after a day, happens very random, still figuring out to get more information and reproducible steps.
Thread 1 Queue : com.myapp.systemconfig (serial)
#0 0x00000001b8d4b964 in __pthread_kill ()#1 0x00000001f21e9378 in pthread_kill ()#2 0x000000018c6d4f50 in abort ()#3 0x00000001037783cc in ::please_report_this_issue_in_github_realm_realm_core() at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/util/terminate.cpp:50#4 0x000000010377869c in realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/util/terminate.cpp:123#5 0x0000000103778798 in realm::util::terminate(char const*, char const*, long, std::initializer_list<realm::util::Printable>&&) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/util/terminate.cpp:140#6 0x0000000102c51450 in realm::to_ref(long long) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/alloc.hpp:427#7 0x0000000102c71c68 in realm::Array::get_as_ref(unsigned long) const at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/array.hpp:755#8 0x0000000102d02474 in realm::ClusterNodeInner::init(realm::MemRef) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/cluster_tree.cpp:213#9 0x0000000102d06480 in realm::ClusterTree::create_root_from_parent(realm::ArrayParent*, unsigned long) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/cluster_tree.cpp:812#10 0x00000001036a5444 in realm::TableClusterTree::get_root_from_parent() at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/table_cluster_tree.cpp:161#11 0x0000000102d06d5c in realm::ClusterTree::init_from_parent() at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/cluster_tree.cpp:864#12 0x0000000103660400 in realm::Table::init(unsigned long, realm::ArrayParent*, unsigned long, bool, bool) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/table.cpp:581#13 0x0000000102d704cc in realm::Group::create_table_accessor(unsigned long) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/group.cpp:991#14 0x0000000102d70058 in realm::Group::do_get_table(unsigned long) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/group.cpp:865#15 0x0000000102d7ce78 in realm::Group::do_get_table(unsigned long) const at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/group.hpp:1214#16 0x0000000102d71f48 in realm::Group::get_table(realm::TableKey) const at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/group.hpp:1020#17 0x0000000102fd8e4c in realm::ObjectSchema::ObjectSchema(realm::Group const&, realm::StringData, realm::TableKey) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/object-store/object_schema.cpp:127#18 0x0000000102fd96dc in realm::ObjectSchema::ObjectSchema(realm::Group const&, realm::StringData, realm::TableKey) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/object-store/object_schema.cpp:124#19 0x0000000102ffc024 in void std::__1::allocator<realm::ObjectSchema>::construct<realm::ObjectSchema, realm::Group const&, realm::StringData&, realm::TableKey&>(realm::ObjectSchema*, realm::Group const&, realm::StringData&, realm::TableKey&) at /Users/test/Xcode/13.2.1/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include/c++/v1/memory:916#20 0x0000000102ffbf14 in void std::__1::allocator_traits<std::__1::allocator<realm::ObjectSchema> >::construct<realm::ObjectSchema, realm::Group const&, realm::StringData&, realm::TableKey&, void>(std::__1::allocator<realm::ObjectSchema>&, realm::ObjectSchema*, realm::Group const&, realm::StringData&, realm::TableKey&) at /Users/test/Xcode/13.2.1/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include/c++/v1/__memory/allocator_traits.h:288#21 0x0000000102ffbc7c in void std::__1::vector<realm::ObjectSchema, std::__1::allocator<realm::ObjectSchema> >::__construct_one_at_end<realm::Group const&, realm::StringData&, realm::TableKey&>(realm::Group const&, realm::StringData&, realm::TableKey&) at /Users/test/Xcode/13.2.1/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include/c++/v1/vector:926#22 0x0000000102fed764 in realm::ObjectSchema& std::__1::vector<realm::ObjectSchema, std::__1::allocator<realm::ObjectSchema> >::emplace_back<realm::Group const&, realm::StringData&, realm::TableKey&>(realm::Group const&, realm::StringData&, realm::TableKey&) at /Users/test/Xcode/13.2.1/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include/c++/v1/vector:1684#23 0x0000000102fed428 in realm::ObjectStore::schema_from_group(realm::Group const&) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/object-store/object_store.cpp:909#24 0x00000001030ecbd8 in realm::Realm::read_schema_from_group_if_needed() at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/object-store/shared_realm.cpp:229#25 0x00000001030ec710 in realm::Realm::Realm(realm::Realm::Config, realm::util::Optional<realm::VersionID>, std::__1::shared_ptr<realm::_impl::RealmCoordinator>, realm::Realm::MakeSharedTag) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/object-store/shared_realm.cpp:82#26 0x00000001030eceec in realm::Realm::Realm(realm::Realm::Config, realm::util::Optional<realm::VersionID>, std::__1::shared_ptr<realm::_impl::RealmCoordinator>, realm::Realm::MakeSharedTag) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/object-store/shared_realm.cpp:79#27 0x0000000102f499f4 in std::__1::__shared_ptr_emplace<realm::Realm, std::__1::allocator<realm::Realm> >::__shared_ptr_emplace<realm::Realm::Config, realm::util::Optional<realm::VersionID>, std::__1::shared_ptr<realm::_impl::RealmCoordinator>, realm::Realm::MakeSharedTag>(std::__1::allocator<realm::Realm>, realm::Realm::Config&&, realm::util::Optional<realm::VersionID>&&, std::__1::shared_ptr<realm::_impl::RealmCoordinator>&&, realm::Realm::MakeSharedTag&&) at /Users/test/Xcode/13.2.1/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include/c++/v1/memory:2627#28 0x0000000102f49574 in std::__1::__shared_ptr_emplace<realm::Realm, std::__1::allocator<realm::Realm> >::__shared_ptr_emplace<realm::Realm::Config, realm::util::Optional<realm::VersionID>, std::__1::shared_ptr<realm::_impl::RealmCoordinator>, realm::Realm::MakeSharedTag>(std::__1::allocator<realm::Realm>, realm::Realm::Config&&, realm::util::Optional<realm::VersionID>&&, std::__1::shared_ptr<realm::_impl::RealmCoordinator>&&, realm::Realm::MakeSharedTag&&) at /Users/test/Xcode/13.2.1/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include/c++/v1/memory:2621#29 0x0000000102f49398 in std::__1::shared_ptr<realm::Realm> std::__1::allocate_shared<realm::Realm, std::__1::allocator<realm::Realm>, realm::Realm::Config, realm::util::Optional<realm::VersionID>, std::__1::shared_ptr<realm::_impl::RealmCoordinator>, realm::Realm::MakeSharedTag, void>(std::__1::allocator<realm::Realm> const&, realm::Realm::Config&&, realm::util::Optional<realm::VersionID>&&, std::__1::shared_ptr<realm::_impl::RealmCoordinator>&&, realm::Realm::MakeSharedTag&&) at /Users/test/Xcode/13.2.1/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include/c++/v1/memory:3385#30 0x0000000102f492a8 in std::__1::shared_ptr<realm::Realm> std::__1::make_shared<realm::Realm, realm::Realm::Config, realm::util::Optional<realm::VersionID>, std::__1::shared_ptr<realm::_impl::RealmCoordinator>, realm::Realm::MakeSharedTag, void>(realm::Realm::Config&&, realm::util::Optional<realm::VersionID>&&, std::__1::shared_ptr<realm::_impl::RealmCoordinator>&&, realm::Realm::MakeSharedTag&&) at /Users/test/Xcode/13.2.1/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS15.2.sdk/usr/include/c++/v1/memory:3394#31 0x0000000102f3ddd8 in realm::Realm::make_shared_realm(realm::Realm::Config, realm::util::Optional<realm::VersionID>, std::__1::shared_ptr<realm::_impl::RealmCoordinator>) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/object-store/shared_realm.hpp:409#32 0x0000000102f3d1e4 in realm::_impl::RealmCoordinator::do_get_realm(realm::Realm::Config, std::__1::shared_ptr<realm::Realm>&, realm::util::Optional<realm::VersionID>, realm::util::CheckedUniqueLock&) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/object-store/impl/realm_coordinator.cpp:360#33 0x0000000102f3cf28 in realm::_impl::RealmCoordinator::get_realm(realm::Realm::Config, realm::util::Optional<realm::VersionID>) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/object-store/impl/realm_coordinator.cpp:324#34 0x00000001030edb0c in realm::Realm::get_shared_realm(realm::Realm::Config) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-core/src/realm/object-store/shared_realm.cpp:154#35 0x0000000102bb430c in +[RLMRealm realmWithConfiguration:queue:error:] at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-cocoa/Realm/RLMRealm.mm:476#36 0x000000010397bf08 in @nonobjc RLMRealm.__allocating_init(configuration:queue:) ()#37 0x0000000103a277a0 in Realm.init(configuration:queue:) at /Users/test/Library/Developer/Xcode/DerivedData/Myapp-ewgoruuvgymxgtaziknwfkwnpfrf/SourcePackages/checkouts/realm-cocoa/RealmSwift/Realm.swift:92#38 0x0000000102410e34 in RealmDatabase.realm.getter at /Users/test/iOS/myapp-ios/Myapp/DataStores/RealmDatabase.swift:107#39 0x00000001020b9428 in AppConfigManager.getConfig(name:) at /Users/test/iOS/myapp-ios/Myapp/Managers/Database/AppConfigManager.swift:96#40 0x00000001026f6bf8 in closure #1 in static AppConfig.SystemConfig.get(name:) at /Users/test/iOS/myapp-ios/Myapp/Configs/API/AppConfig.swift:41#41 0x000000019aea1938 in partial apply for thunk for @callee_guaranteed () -> (@out τ_0_0, @error @owned Error) ()#42 0x000000019aea8c18 in thunk for @callee_guaranteed () -> (@out τ_0_0, @error @owned Error)partial apply ()#43 0x000000019aea2c70 in closure #1 in closure #1 in OS_dispatch_queue._syncHelper<τ_0_0>(fn:execute:rescue:) ()#44 0x000000019aea2d5c in partial apply for thunk for @callee_guaranteed () -> () ()#45 0x000000019aea2680 in thunk for @escaping @callee_guaranteed () -> () ()#46 0x000000010bf5e3b4 in _dispatch_client_callout ()#47 0x000000010bf6f8e4 in _dispatch_lane_barrier_sync_invoke_and_complete ()#48 0x000000019aea1ffc in implicit closure #2 in implicit closure #1 in OS_dispatch_queue.sync<τ_0_0>(execute:) ()#49 0x000000019aea1074 in partial apply for implicit closure #2 in implicit closure #1 in OS_dispatch_queue.sync<τ_0_0>(execute:) ()#50 0x000000019aea1d8c in OS_dispatch_queue._syncHelper<τ_0_0>(fn:execute:rescue:) ()#51 0x000000019aea1124 in OS_dispatch_queue.sync<τ_0_0>(execute:) ()#52 0x00000001026f6a68 in static AppConfig.SystemConfig.get(name:) at /Users/test/iOS/myapp-ios/Myapp/Configs/API/AppConfig.swift:37#53 0x0000000102584664 in AppDelegate.application(_:didFinishLaunchingWithOptions:) at /Users/test/iOS/myapp-ios/Myapp/Systems/AppDelegate.swift:75#54 0x0000000102587090 in @objc AppDelegate.application(_:didFinishLaunchingWithOptions:) ()#55 0x0000000183f484bc in -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] ()#56 0x0000000184130518 in -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] ()#57 0x0000000184118e58 in -[UIApplication _runWithMainScene:transitionContext:completion:] ()#58 0x0000000183f76424 in -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] ()#59 0x0000000183dcde14 in _UIScenePerformActionsWithLifecycleActionMask ()#60 0x0000000183ef9f48 in __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke ()#61 0x000000018401abe8 in -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] ()#62 0x000000018425bdb0 in -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] ()#63 0x00000001841e72d0 in -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] ()#64 0x0000000183dcec18 in __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block_invoke ()#65 0x0000000183e8f484 in +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] ()#66 0x0000000183dd0b28 in _UISceneSettingsDiffActionPerformChangesWithTransitionContext ()#67 0x0000000183ebbf58 in -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] ()#68 0x0000000184344084 in __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.613 ()#69 0x0000000183dff460 in -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] ()#70 0x0000000183e42d74 in -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] ()#71 0x0000000183f7b350 in -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] ()#72 0x0000000183eba218 in -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] ()#73 0x00000001934698d4 in -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] ()#74 0x000000019348f824 in __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.215 ()#75 0x000000019344a06c in -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] ()#76 0x000000019344b6ac in __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke ()#77 0x000000010bf5e3b4 in _dispatch_client_callout ()#78 0x000000010bf61e70 in _dispatch_block_invoke_direct ()#79 0x000000019344b9c4 in __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ ()#80 0x000000019344ad8c in -[FBSSerialQueue _targetQueue_performNextIfPossible] ()#81 0x000000019344f414 in -[FBSSerialQueue _performNextFromRunLoopSource] ()#82 0x00000001818330d0 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ ()#83 0x0000000181843d90 in __CFRunLoopDoSource0 ()#84 0x000000018177e098 in __CFRunLoopDoSources0 ()#85 0x00000001817838a4 in __CFRunLoopRun ()#86 0x0000000181797468 in CFRunLoopRunSpecific ()#87 0x000000019d32338c in GSEventRunModal ()#88 0x0000000184139088 in -[UIApplication _run] ()#89 0x0000000183eb7958 in UIApplicationMain ()#90 0x0000000102592af8 in main at /Users/test/iOS/myapp-ios/Myapp/Systems/AppDelegate.swift:17#91 0x000000010bd79aa4 in start ()
### Can you reproduce the bug?
Yes, sometimes
### Reproduction Steps
Leave the app running, (updating db ~ once a min, (business logic) - and it db getting corrupted after a while
Frequency like 7 to 8 times a week. since db is encrypted we loose data
### Version
10.21.1 (via SPM) (most of our crashes) but also reported once with 10.1.4
### What SDK flavour are you using?
Local Database only
### Are you using encryption?
Yes, using encryption
### Platform OS and version(s)
iOS 15.x and 14.5.1
### Build environment
Swift package manager
xcode 13.2.1
The text was updated successfully, but these errors were encountered:
How frequently does the bug occur?
Sometimes
Description
We use realm encrypted db.
As our app works in background (read/write to db) and after a day or two it stops (crashed in background), and when we try to launch manually app crash due to db is corrupted. It is not always after a day, happens very random, still figuring out to get more information and reproducible steps.
Also reported to realm core - realm/realm-core#5190
stack_trace.txt
Myapp_crash.txt
Mpapp.1-24-22.10-20.AM.crash.txt
Stacktrace & log output
The text was updated successfully, but these errors were encountered: