(iOS) SIGSEGV: Crash due to signal: SIGSEGV(SEGV_MAPERR)

Viewed 767

Folks I have been debugging this crash on and off for a month now, need your help figuring this out. So some users have been seeing crash in particular flow and when we disable the particular flow crash stops. As of a fact we know that this particular feature is reason for crash but locally we ain't able to reproduce the crash, no matter what we do. this crash happens around 5% user base.

NEW FINDINGS: This crash is happening when we are pushing a view controller. New controller’s loadView is not getting called since I have added additional logs and can see this confidence. In the old controller we have a text field and s button, keyboard is expanded when this happens. Tech details: We have a view controller in memory where user enters their phone number, we hit few apis to login. Once these api succeeds we show another view controller where we hit some more api calls to login, once this is done user is logged in.

Crash timing: crash happens after user taps on login button after entering their phone number where we call few apis and then move to another VC. Added the details in above section.

Additional crash details/pattern: Some users keep on seeing this crash again and again. It persist for them even if they reinstall the app.

Feature details: We are adding a new login method in addition to previously added login methods. Think of login method as otp, passwords, magic link etc. When we disabled this new login method crashes stops.

OS Version/Device details: This is happening through out the iOS versions and device versions. There isn’t any pattern we could find with regards to that.

Additional details: In crash details which we can see in instabug dashboard, we can see that enough ram/storage memory is available in device. CPU usage is high in the beginning since this crash happens in login flow and our app is quite heavy so startup is cpu intensive, later it comes down to normal usage.

Crash log: There are slight variation of crash log is observed. Attaching all of them below.

libobjc.A.dylib AutoreleasePoolPage::AutoreleasePoolPage(AutoreleasePoolPage*) + 88
1   libobjc.A.dylib AutoreleasePoolPage::autoreleaseFullPage(objc_object*, AutoreleasePoolPage*) + 63
2   libobjc.A.dylib objc_object::rootAutorelease2() + 111
3   CoreAutoLayout  _engineVar_forVariable + 207
4   CoreAutoLayout  -[NSISLinearExpression addVariable:coefficient:] + 63
5   UIKitCore   -[UIView(AdditionalLayoutSupport) nsli_lowerAttribute:intoExpression:withCoefficient:forConstraint:onBehalfOfLayoutGuide:] + 2967
6   UIKitCore   -[UIView(AdditionalLayoutSupport) nsli_lowerAttribute:intoExpression:withCoefficient:forConstraint:] + 311
7   CoreAutoLayout  -[NSLayoutConstraint _lowerIntoExpression:reportingConstantIsRounded:] + 79
8   CoreAutoLayout  -[NSLayoutConstraint _tryToChangeContainerGeometryWithUndoHandler:] + 175
9   CoreAutoLayout  -[NSLayoutConstraint _setSymbolicConstant:constant:symbolicConstantMultiplier:] + 411
10  CoreAutoLayout  -[NSLayoutConstraint setConstant:] + 95
11  UIKitCore   -[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints] + 691
12  UIKitCore   -[UIView(AdditionalLayoutSupport) _updateSystemConstraints] + 127
13  UIKitCore   -[UIView(AdditionalLayoutSupport) _sendUpdateConstraintsIfNecessaryForSecondPass:] + 483
14  UIKitCore   -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 947
15  UIKitCore   -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededCollectingViews:forSecondPass:] + 659
16  CoreAutoLayout  -[NSISEngine withBehaviors:performModifications:] + 87
17  UIKitCore   _100-[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:]_block_invoke + 115
18  UIKitCore   -[UIView(AdditionalLayoutSupport) _withUnsatisfiableConstraintsLoggingSuspendedIfEngineDelegateExists:] + 127
19  UIKitCore   -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeededWithViewForVariableChangeNotifications:] + 187
20  UIKitCore   -[UIView(AdditionalLayoutSupport) _updateConstraintsAtEngineLevelIfNeededWithViewForVariableChangeNotifications:] + 447
21  UIKitCore   -[UIView _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 403
22  UIKitCore   -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2503
23  QuartzCore  -[CALayer layoutSublayers] + 307
24  QuartzCore  CA::Layer::layout_if_needed(CA::Transaction*) + 523
25  QuartzCore  CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 143
26  QuartzCore  CA::Context::commit_transaction(CA::Transaction*, double, double*) + 415
27  QuartzCore  CA::Transaction::commit() + 731
28  QuartzCore  CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 95
29  CoreFoundation  _CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 35
30  CoreFoundation  _CFRunLoopDoObservers + 575
31  CoreFoundation  _CFRunLoopRun + 1055
32  CoreFoundation  CFRunLoopRunSpecific + 599
33  GraphicsServices    GSEventRunModal + 163
34  UIKitCore   -[UIApplication _run] + 1071
35  UIKitCore   UIApplicationMain + 167
36  libdyld.dylib   $start + 3

Thread 0 [Crashed]:

0    libobjc.A.dylib                          0x1aac6ce2c     AutoreleasePoolPage::AutoreleasePoolPage(AutoreleasePoolPage*) + 84
1    libobjc.A.dylib                          0x1aac6cc2c     AutoreleasePoolPage::autoreleaseFullPage(objc_object*, AutoreleasePoolPage*) + 59
2    libobjc.A.dylib                          0x1aac6cabc     objc_object::rootAutorelease2() + 107
3    UIKitCore                                0x19962ae14     -[UIView(Hierarchy) subviews] + 479
4    UIKitCore                                0x199627b80     -[UIView(Geometry) resizeSubviewsWithOldSize:] + 79
5    UIKitCore                                0x19955a19c     -[UIView(AdditionalLayoutSupport) _is_layout] + 147
6    UIKitCore                                0x19962f8ac     -[UIView _updateConstraintsAsNecessaryAndApplyLayoutFromEngine] + 999
7    UIKitCore                                0x199642398     -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 2467
8    QuartzCore                               0x199b47df4     -[CALayer layoutSublayers] + 287
9    QuartzCore                               0x199b4e398     CA::Layer::layout_if_needed(CA::Transaction*) + 519
10   QuartzCore                               0x199b596e8     CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 139
11   QuartzCore                               0x199aa4d7c     CA::Context::commit_transaction(CA::Transaction*, double, double*) + 415
12   QuartzCore                               0x199acef40     CA::Transaction::commit() + 727
13   QuartzCore                               0x199ad01f0     CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 91
14   CoreFoundation                           0x19684c87c     _CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 31
15   CoreFoundation                           0x196846f50     _CFRunLoopDoObservers + 603
16   CoreFoundation                           0x196847498     _CFRunLoopRun + 959
17   CoreFoundation                           0x196846ba0     CFRunLoopRunSpecific + 571
18   GraphicsServices                         0x1ad5ac598     GSEventRunModal + 159
19   UIKitCore                                0x1991382f4     -[UIApplication _run] + 1051
20   UIKitCore                                0x19913d874     UIApplicationMain + 163
22   libdyld.dylib                            
Thread 0 [Crashed]:

0    libobjc.A.dylib                          0x19d478bac     AutoreleasePoolPage::autoreleaseFullPage(objc_object*, AutoreleasePoolPage*) + 128
1    libobjc.A.dylib                          0x19d478b14     objc_object::rootAutorelease2() + 107
2    UIKitCore                                0x1a11d8f08     -[UIViewController(UIKitManual) autorelease] + 75
3    UIKitCore                                0x1a1109220     -[UINavigationController _outermostNavigationController] + 135
4    UIKitCore                                0x1a0f2088c     -[_UINavigationBarVisualProviderModernIOS _isInnerNavigationBarOfNestedNavigationController] + 59
5    UIKitCore                                0x1a0f21a68     -[_UINavigationBarVisualProviderModernIOS _ensureLayoutsConfiguredForEntry:] + 71
6    UIKitCore                                0x1a0f26e94     -[_UINavigationBarVisualProviderModernIOS layoutHeightsFittingWidth:] + 547
7    UIKitCore                                0x1a0ed3698     -[UINavigationBar _layoutHeightsForNavigationItem:fittingWidth:] + 111
8    UIKitCore                                0x1a111d0e0     -[UINavigationController _calculateTopViewFramesForExpandedLayoutWithViewController:contentScrollView:gettingNavBarFrame:topPaletteFrame:] + 363
9    UIKitCore                                0x1a111be34     -[UINavigationController _calculateTopViewFramesForLayoutWithViewController:contentScrollView:navBarFrame:topPaletteFrame:topLayoutType:] + 239
10   UIKitCore                                0x1a111bbbc     -[UINavigationController _calculateTopLayoutInfoForViewController:] + 255
11   UIKitCore                                0x1a1119df8     -[UINavigationController _edgeInsetsForChildViewController:insetsAreAbsolute:] + 167
12   UIKitCore                                0x1a11a3b4c     -[UIViewController __updateContentOverlayInsetsWithOurRect:inBoundsOfAncestorViewController:viaImmediateChildOfAncestor:] + 695
13   UIKitCore                                0x1a11a3558     -[UIViewController _updateContentOverlayInsetsFromParentIfNecessary] + 463
14   UIKitCore                                0x1a1ca43fc     -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1119
15   QuartzCore                               0x1a4241494     -[CALayer layoutSublayers] + 283
16   QuartzCore                               0x1a42475ec     CA::Layer::layout_if_needed(CA::Transaction*) + 467
17   QuartzCore                               0x1a4252128     CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 139
18   QuartzCore                               0x1a419ab44     CA::Context::commit_transaction(CA::Transaction*, double) + 295
19   QuartzCore                               0x1a41c44e4     CA::Transaction::commit() + 675
20   QuartzCore                               0x1a41c4ef8     CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 91
21   CoreFoundation                           0x19d6b9f2c     _CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 31
22   CoreFoundation                           0x19d6b4e20     _CFRunLoopDoObservers + 419
23   CoreFoundation                           0x19d6b529c     _CFRunLoopRun + 967
24   CoreFoundation                           0x19d6b4ba8     CFRunLoopRunSpecific + 423
25   GraphicsServices                         0x1a7824344     GSEventRunModal + 159
26   UIKitCore                                0x1a17f03e4     UIApplicationMain + 1931
28   libdyld.dylib                            0x19d53c8f0     $start + 3

I need your help to figure out possible reasons this crash can occur given the details I have mentioned

0 Answers
Related