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

Our app is crashing on launch #7775

Closed
ayush-ttn opened this issue Apr 28, 2022 · 10 comments
Closed

Our app is crashing on launch #7775

ayush-ttn opened this issue Apr 28, 2022 · 10 comments
Labels
O-Community Reproduction-Required T-Bug Waiting-For-Reporter Waiting for more information from the reporter before we can proceed

Comments

@ayush-ttn
Copy link

ayush-ttn commented Apr 28, 2022

How frequently does the bug occur?

Sometimes

Description

We were using Realm version 10.24 and getting the same crash then we reverted back to 10.20 and the crash was consistent. We are not able to reproduce this issue on our side but our customers are reporting the crash. Any help or suggestion will be appreciated. This is happening on almost all of the devices and OS versions so it is hard to guess the reason on our side. Also, not all of our users are facing the crash though.

Stacktrace & log output

Date/Time:           2022-04-24 07:35:12.9428 -0600
Launch Time:         2022-04-24 07:35:12.8429 -0600
OS Version:          iPhone OS 15.4 (19E241)
Release Type:        User
Report Version:      104

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note:  EXC_CORPSE_NOTIFY
Triggered by Thread:  0


Thread 0 name:
Thread 0 Crashed:
0   libsystem_kernel.dylib        	0x00000001b7357b78 __pthread_kill + 8
1   libsystem_pthread.dylib       	0x00000001f03a43bc pthread_kill + 268 (pthread.c:1668)
2   libsystem_c.dylib             	0x000000018b6ed51c abort + 168 (abort.c:118)
3   Realm                         	0x0000000102bb66a0 please_report_this_issue_in_github_realm_realm_core + 12
4   Realm                         	0x0000000102bb69a0 realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&) + 328
5   Realm                         	0x0000000102bb6b18 realm::util::terminate(char const*, char const*, long, std::initializer_list<realm::util::Printable>&&) + 328
6   Realm                         	0x0000000102919608 void realm::util::terminate_with_info<char const&, unsigned long&>(char const*, int, char const*, char const*, char const&, unsigned long&) + 366088 (terminate.hpp:51)
7   Realm                         	0x0000000102a1c234 realm::Array::set(unsigned long, long long) + 236
8   Realm                         	0x0000000102ade8e4 realm::Node::do_copy_on_write(unsigned long) + 232
9   Realm                         	0x0000000102a1bc78 realm::Array::move(unsigned long, unsigned long, unsigned long) + 120
10  Realm                         	0x0000000102cfffc4 realm::ArrayTimestamp::erase(unsigned long) + 112
11  Realm                         	0x0000000102a457d8 void realm::Cluster::do_erase<realm::ArrayTimestamp>(unsigned long, realm::ColKey) + 108
12  Realm                         	0x0000000102a44bd8 realm::util::FunctionRef<bool (realm::ColKey)>::FunctionRef<realm::Cluster::erase(realm::ObjKey, realm::CascadeState&)::$_3&>(realm::Cluster::erase(realm::ObjKey, realm::CascadeState&)::$_3&)::'lam... + 2316
13  Realm                         	0x0000000102b8c9e8 realm::TableClusterTree::for_each_and_every_column(realm::util::FunctionRef<bool (realm::ColKey)>) const + 84
14  Realm                         	0x0000000102a3ee88 realm::Cluster::erase(realm::ObjKey, realm::CascadeState&) + 160
15  Realm                         	0x0000000102a4d084 realm::ClusterNodeInner::erase(realm::ObjKey, realm::CascadeState&)::$_3::operator()(realm::ClusterNode*, realm::ClusterNodeInner::ChildInfo&) const + 68
16  Realm                         	0x0000000102a48dc4 realm::ClusterNodeInner::erase(realm::ObjKey, realm::CascadeState&) + 240
17  Realm                         	0x0000000102a4bc20 realm::ClusterTree::erase+ 1621024 (realm::ObjKey, realm::CascadeState&) + 128
18  Realm                         	0x0000000102b80dd8 realm::Table::remove_object(realm::ObjKey) + 268
19  Realm                         	0x0000000102ae3f98 realm::Obj::remove() + 44
20  Realm                         	0x00000001029186cc RLMDeleteObjectFromRealm + 112 (RLMObjectStore.mm:189)
21  RealmSwift                    	0x0000000103378c64 Realm.delete<A>(_:) + 429156 (<compiler-generated>:0)
22  Stitcher                      	0x000000010099c118 specialized DB.cleanUp() + 7892 (Database.swift:1433)
23  Stitcher                      	0x0000000100a15ec0 DB.cleanUp() + 4 (<compiler-generated>:0)
24  Stitcher                      	0x0000000100a15ec0 StitcherCore.cleanup() + 4 (StitcherCoreInterface.swift:416)
25  Stitcher                      	0x0000000100a15ec0 specialized StitcherCore.init(db:network:user:downloadManager:settingsManager:) + 2044 (StitcherCoreInterface.swift:202)
26  Stitcher                      	0x0000000100a16a4c specialized StitcherCore.init(db:network:user:downloadManager:settingsManager:) + 28 (<compiler-generated>:0)
27  Stitcher                      	0x0000000100a16a4c StitcherCore.init(db:network:user:downloadManager:settingsManager:) + 28 (StitcherCoreInterface.swift:178)
28  Stitcher                      	0x0000000100a16a4c specialized StitcherCore.__allocating_init(db:network:user:downloadManager:settingsManager:) + 28 (<compiler-generated>:178)
29  Stitcher                      	0x0000000100a16a4c StitcherCore.__allocating_init(db:network:user:downloadManager:settingsManager:) + 28 (AppDelegate.swift:79)
30  Stitcher                      	0x0000000100a16a4c specialized AppDelegate.application(_:willFinishLaunchingWithOptions:) + 1812
31  Stitcher                      	0x0000000100a10efc @objc AppDelegate.application(_:willFinishLaunchingWithOptions:) + 144
32  UIKitCore                     	0x0000000182d06f00 -[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:] + 204 (UIApplication.m:2323)
33  UIKitCore                     	0x0000000182eedda4 -[UIApplication _callInitializationDelegatesWithActions:forCanvas:payload:fromOriginatingProcess:] + 3572 (UIApplication.m:2754)
34  UIKitCore                     	0x0000000182ed6958 -[UIApplication _runWithMainScene:transitionContext:completion:] + 1180 (UIApplication.m:4491)
35  UIKitCore                     	0x0000000182d34590 -[_UISceneLifecycleMultiplexer completeApplicationLaunchWithFBSScene:transitionContext:] + 152 (_UISceneLifecycleMultiplexer.m:450)
36  UIKitCore                     	0x0000000182b8ec44 _UIScenePerformActionsWithLifecycleActionMask + 104 (_UISceneLifecycleState.m:109)
37  UIKitCore                     	0x0000000182cb95ec __101-[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:]_block_invoke + 216 (_UISceneLifecycleMultiplexer.m:563)
38  UIKitCore                     	0x0000000182dd92fc -[_UISceneLifecycleMultiplexer _performBlock:withApplicationOfDeactivationReasons:fromReasons:] + 248 (_UISceneLifecycleMultiplexer.m:512)
39  UIKitCore                     	0x0000000183017fa4 -[_UISceneLifecycleMultiplexer _evalTransitionToSettings:fromSettings:forceExit:withTransitionStore:] + 772 (_UISceneLifecycleMultiplexer.m:562)
40  UIKitCore                     	0x0000000182fa3554 -[_UISceneLifecycleMultiplexer uiScene:transitionedFromState:withTransitionContext:] + 340 (_UISceneLifecycleMultiplexer.m:468)
41  UIKitCore                     	0x0000000182b8fa30 __186-[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:]_block... + 196 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:73)
42  UIKitCore                     	0x0000000182c4f934 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:actions:completion:] + 892 (BSAnimationSettings+UIKit.m:50)
43  UIKitCore                     	0x0000000182b91934 _UISceneSettingsDiffActionPerformChangesWithTransitionContext + 276 (_UISceneSettingsDiffAction.m:23)
44  UIKitCore                     	0x0000000182c7baa0 -[_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 384 (_UIWindowSceneFBSSceneTransitionContextDrivenLifecycleSettingsDiffAction.m:58)
45  UIKitCore                     	0x0000000183100564 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.615 + 776 (UIScene.m:1825)
46  UIKitCore                     	0x0000000182bbfd14 -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 256 (UIScene.m:1526)
47  UIKitCore                     	0x0000000182c03528 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 288 (UIScene.m:1792)
48  UIKitCore                     	0x0000000182d39394 -[UIApplication workspace:didCreateScene:withTransitionContext:completion:] + 584 (UIApplication.m:3955)
49  UIKitCore                     	0x0000000182c79d64 -[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:] + 388 (UIApplicationSceneClientAgent.m:45)
50  FrontBoardServices            	0x0000000192789294 -[FBSScene _callOutQueue_agent_didCreateWithTransitionContext:completion:] + 440 (FBSScene.m:439)
51  FrontBoardServices            	0x00000001927af090 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke.215 + 128 (FBSWorkspaceScenesClient.m:384)
52  FrontBoardServices            	0x000000019276a308 -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 240 (FBSWorkspace.m:352)
53  FrontBoardServices            	0x000000019276b958 __94-[FBSWorkspaceScenesClient createWithSceneID:groupID:parameters:transitionContext:completion:]_block_invoke + 372 (FBSWorkspaceScenesClient.m:383)
54  libdispatch.dylib             	0x0000000180271a2c _dispatch_client_callout + 20 (object.m:560)
55  libdispatch.dylib             	0x00000001802754e0 _dispatch_block_invoke_direct + 264 (queue.c:501)
56  FrontBoardServices            	0x000000019276bc70 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 48 (FBSSerialQueue.m:157)
57  FrontBoardServices            	0x000000019276b040 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 220 (FBSSerialQueue.m:181)
58  FrontBoardServices            	0x000000019276f700 -[FBSSerialQueue _performNextFromRunLoopSource] + 28 (FBSSerialQueue.m:194)
59  CoreFoundation                	0x000000018062cf04 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 28 (CFRunLoop.c:1972)
60  CoreFoundation                	0x000000018063dc90 __CFRunLoopDoSource0 + 208 (CFRunLoop.c:2016)
61  CoreFoundation                	0x00000001805771e8 __CFRunLoopDoSources0 + 368 (CFRunLoop.c:2061)
62  CoreFoundation                	0x000000018057cb4c __CFRunLoopRun + 828 (CFRunLoop.c:2951)
63  CoreFoundation                	0x00000001805906b8 CFRunLoopRunSpecific + 600 (CFRunLoop.c:3268)
64  GraphicsServices              	0x000000019c62a374 GSEventRunModal + 164 (GSEvent.c:2200)
65  UIKitCore                     	0x0000000182ef5e88 -[UIApplication _run] + 1100 (UIApplication.m:3511)
66  UIKitCore                     	0x0000000182c775ec UIApplicationMain + 364 (UIApplication.m:5064)
67  Stitcher                      	0x000000010098beb8 main + 68 (AppDelegate.swift:22)
68  dyld                          	0x00000001014cdce4 start + 520 (dyldMain.cpp:879)

Can you reproduce the bug?

Not yet

Reproduction Steps

Not able to reproduce on our side.

Version

10.20

What SDK flavour are you using?

Local Database only

Are you using encryption?

No, not using encryption

Platform OS and version(s)

iOS 10.15.4

Build environment

Xcode version: 13.2.1
Dependency manager and version: Cocoapods 1.10.2

@ejm01
Copy link
Contributor

ejm01 commented Apr 28, 2022

@ironage Perhaps this is related to the first stack trace in this comment (#7703). Where is a good place to start on this?
How related to issues introduced 10.22.0 is this, considering encryption is not involved?

@ironage
Copy link

ironage commented Apr 28, 2022

@ericjordanmossman without a reproduction it is difficult to say what the cause is of a stack trace like this. To me, it looks like the assertion is about an array index out of bounds while updating from a parent which can be caused by corruption which has happened some time in the past. Perhaps the underlying issue is fixed by realm/realm-core#5334 but it is hard to say.

@ayush-ttn
Copy link
Author

@ericjordanmossman @ironage One point to mention is to try to fix this we rolled back our realm version from 10.24 to 10.20 but the crash is still the same. We just thought maybe there is any bug introduced in the new version so rollback may fix that. I forgot to mention it in the issue description above.

@ritesh-kanchi
Copy link

We are having the exact same issue - never crashed on our side, and the app got past app review; We were on Realm 10.24, and can't even cause the app to crash on our end.

It's happening for <1% of users, but it's enough to be a big problem... Does 10.25 fix it?

@ayush-ttn
Copy link
Author

@ritesh-kanchi It may be too early for me to report if this worked but we released a new build with 10.25 and some of our users are reporting that the crash is fixed but they had to uninstall/install the new build. We are monitoring the release to see how many users are reporting the fix and based on that I can say anything with certainty.

@ritesh-kanchi
Copy link

@ayush-ttn We thought our problem was with Realm, but really had to do with type initializers and data type conversions... Some devices weren't unable to unwrap the conversions, thus crashing the app.

Your error seemed familiar to mine, so I assumed Realm - but it wasn't the case.

@ayush-ttn
Copy link
Author

@ritesh-kanchi That's an interesting find. I'll keep an eye on such a thing on our side as well if the update turns out to be a downer.

@pavel-ship-it
Copy link
Contributor

Hi @ayush-ttn, do you have any updates on the issue? Does info from @ritesh-kanchi helps you?

@ayush-ttn
Copy link
Author

Hey @pavel-ship-it , no the info by @ritesh-kanchi was not the case with my code. I updated to the most recent version(10.25.2) though and it seems to have fix the problem

@pavel-ship-it
Copy link
Contributor

Thank you @ayush-ttn. I close the issue then.

@sync-by-unito sync-by-unito bot added the Waiting-For-Reporter Waiting for more information from the reporter before we can proceed label Nov 18, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
O-Community Reproduction-Required T-Bug Waiting-For-Reporter Waiting for more information from the reporter before we can proceed
Projects
None yet
Development

No branches or pull requests

5 participants