App Crashes On Launch in some iphone(iOS 17)

My app keeps getting crashed for the same reason in some iphone(iOS 17) and I need help. Here is the lastExceptionBacktrace.

"lastExceptionBacktrace" : [ {"imageOffset":972256,"symbol":"__exceptionPreprocess","symbolLocation":164,"imageIndex":10}, {"imageOffset":179200,"symbol":"objc_exception_throw","symbolLocation":60,"imageIndex":7}, {"imageOffset":1516452,"symbol":"-[NSException initWithCoder:]","symbolLocation":0,"imageIndex":10}, {"imageOffset":195548,"symbol":"CA::Layer::set_position(CA::Vec2<double> const&, bool)","symbolLocation":168,"imageIndex":19}, {"imageOffset":195340,"symbol":"-[CALayer setPosition:]","symbolLocation":52,"imageIndex":19}, {"imageOffset":195204,"symbol":"-[CALayer setFrame:]","symbolLocation":396,"imageIndex":19}, {"imageOffset":409656,"symbol":"__26-[_UILabelLayer setFrame:]_block_invoke","symbolLocation":56,"imageIndex":12}, {"imageOffset":409388,"symbol":"-[_UILabelLayer _setFrameOrBounds:settingAction:]","symbolLocation":60,"imageIndex":12}, {"imageOffset":426392,"symbol":"-[_UILabelLayer setFrame:]","symbolLocation":104,"imageIndex":12}, {"imageOffset":104744,"symbol":"-[UIView _backing_setFrame:]","symbolLocation":240,"imageIndex":12}, {"imageOffset":97808,"symbol":"-[UIView(Geometry) setFrame:]","symbolLocation":296,"imageIndex":12}, {"imageOffset":106944,"symbol":"-[UILabel setFrame:]","symbolLocation":112,"imageIndex":12}, {"imageOffset":16705216,"symbol":"-[UITableViewHeaderFooterView layoutSubviews]","symbolLocation":220,"imageIndex":12}, {"imageOffset":209368,"symbol":"-[UIView(CALayerDelegate) layoutSublayersOfLayer:]","symbolLocation":1528,"imageIndex":12}, {"imageOffset":424072,"symbol":"CA::Layer::layout_if_needed(CA::Transaction*)","symbolLocation":500,"imageIndex":19}, {"imageOffset":221860,"symbol":"-[UIView(Hierarchy) layoutBelowIfNeeded]","symbolLocation":308,"imageIndex":12}, {"imageOffset":16700796,"symbol":"-[UITableViewHeaderFooterView _sizeThatFits:stripPaddingForAbuttingView:isTopHeader:]","symbolLocation":192,"imageIndex":12}, {"imageOffset":16733416,"symbol":"-[UISectionRowData _headerFooterSizeForSection:inTable:withTitle:detailText:isHeader:stripPaddingForAbuttingView:isTopHeader:]","symbolLocation":680,"imageIndex":12}, {"imageOffset":2595124,"symbol":"-[UISectionRowData refreshWithSection:tableView:tableViewRowData:]","symbolLocation":464,"imageIndex":12}, {"imageOffset":2604748,"symbol":"-[UITableViewRowData rectForFooterInSection:heightCanBeGuessed:]","symbolLocation":104,"imageIndex":12}, {"imageOffset":2604572,"symbol":"-[UITableViewRowData heightForTable]","symbolLocation":52,"imageIndex":12}, {"imageOffset":2599644,"symbol":"-[UITableView _updateContentSizeSkippingContentOffsetAdjustment:]","symbolLocation":168,"imageIndex":12}, {"imageOffset":16599748,"symbol":"-[UITableView _rebuildGeometryForcingRowDataUpdate:skipContentOffsetAdjustment:updateImmediatelyIfPossible:]","symbolLocation":140,"imageIndex":12}, {"imageOffset":16595412,"symbol":"-[UITableView setLayoutMargins:]","symbolLocation":204,"imageIndex":12}, {"imageOffset":16595180,"symbol":"-[UITableView _setDefaultLayoutMargins:]","symbolLocation":52,"imageIndex":12}, {"imageOffset":16595032,"symbol":"-[UITableView didMoveToWindow]","symbolLocation":288,"imageIndex":12}, {"imageOffset":74184,"symbol":"-[UIView(Internal) _didMoveFromWindow:toWindow:]","symbolLocation":1716,"imageIndex":12}, {"imageOffset":1969584,"symbol":"-[UIScrollView _didMoveFromWindow:toWindow:]","symbolLocation":88,"imageIndex":12}, {"imageOffset":73152,"symbol":"-[UIView(Internal) _didMoveFromWindow:toWindow:]","symbolLocation":684,"imageIndex":12}, {"imageOffset":71756,"symbol":"__45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke","symbolLocation":124,"imageIndex":12}, {"imageOffset":71520,"symbol":"-[UIView _postMovedFromSuperview:]","symbolLocation":484,"imageIndex":12}, {"imageOffset":66468,"symbol":"-[UIView(Internal) _addSubview:positioned:relativeTo:]","symbolLocation":2180,"imageIndex":12}, {"imageOffset":555240,"symbol":"-[UIWindow addRootViewControllerViewIfPossible]","symbolLocation":728,"imageIndex":12}, {"imageOffset":1651088,"symbol":"-[UIWindow setRootViewController:]","symbolLocation":364,"imageIndex":12}, {"imageOffset":27056,"imageIndex":2}, {"imageOffset":26016,"imageIndex":2}, {"imageOffset":2179544,"symbol":"-[UIApplication _handleDelegateCallbacksWithOptions:isSuspended:restoreState:]","symbolLocation":320,"imageIndex":12},

......

{"imageOffset":2433472,"symbol":"-[UIApplicationSceneClientAgent scene:didInitializeWithEvent:completion:]","symbolLocation":288,"imageIndex":12}, {"imageOffset":60072,"symbol":"-[FBSScene _callOutQueue_didCreateWithTransitionContext:completion:]","symbolLocation":324,"imageIndex":9}, {"imageOffset":59716,"symbol":"__92-[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:]_block_invoke.108","symbolLocation":280,"imageIndex":9}, {"imageOffset":54696,"symbol":"-[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:]","symbolLocation":168,"imageIndex":9}, {"imageOffset":103264,"symbol":"__92-[FBSWorkspaceScenesClient createSceneWithIdentity:parameters:transitionContext:completion:]_block_invoke","symbolLocation":352,"imageIndex":9}, {"imageOffset":17152,"symbol":"_dispatch_client_callout","symbolLocation":20,"imageIndex":8}, {"imageOffset":32072,"symbol":"_dispatch_block_invoke_direct","symbolLocation":284,"imageIndex":8}, {"imageOffset":39404,"symbol":"FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK","symbolLocation":52,"imageIndex":9}, {"imageOffset":39276,"symbol":"-[FBSMainRunLoopSerialQueue _targetQueue_performNextIfPossible]","symbolLocation":240,"imageIndex":9}, {"imageOffset":38980,"symbol":"-[FBSMainRunLoopSerialQueue _performNextFromRunLoopSource]","symbolLocation":28,"imageIndex":9}, {"imageOffset":228044,"symbol":"CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION","symbolLocation":28,"imageIndex":10}, {"imageOffset":224584,"symbol":"__CFRunLoopDoSource0","symbolLocation":176,"imageIndex":10}, {"imageOffset":218460,"symbol":"__CFRunLoopDoSources0","symbolLocation":340,"imageIndex":10}, {"imageOffset":213560,"symbol":"__CFRunLoopRun","symbolLocation":828,"imageIndex":10}, {"imageOffset":212504,"symbol":"CFRunLoopRunSpecific","symbolLocation":608,"imageIndex":10}, {"imageOffset":13804,"symbol":"GSEventRunModal","symbolLocation":164,"imageIndex":11}, {"imageOffset":2290512,"symbol":"-[UIApplication _run]","symbolLocation":888,"imageIndex":12}, {"imageOffset":2288012,"symbol":"UIApplicationMain","symbolLocation":340,"imageIndex":12}, {"imageOffset":24608,"imageIndex":2}, {"imageOffset":23876,"symbol":"start","symbolLocation":2104,"imageIndex":13} ],

Answered by tttt202310 in 768923022

My experience is that exceptions thrown from CA geometry routines, like this CA::Layer::set_position(…) method, are most often caused by one of the coordinates being a NaN.

We have checkd the source of the application for a while time . There are no NaN coordinates settings was found. So We don't know how to prevent it on our application side. We think it occurred in the processing part inside UIKit.

Here are some more details about this problem.

  • Our app is compiled with iOS6 as iOS Deployment Target. The app is crashing on an iOS 17/iPadOS 17 device.
  • Since iOS 6, many frame-drawing related fixes have been made.
  • When we changed iOS Deployment Target to 12 or later, Xcode displayed that frame-related fixes were required.
  • When we changed iOS Deployment Target to 12 or later and recompiled, the problem no longer occurred on the device where the problem occurred before.

From the above, we think that the structure related to the screen frame has been expanded and the number of members has increased due to the influence of many modifications. When iOS Deployment Target passes memory in 6.0 or later, it refers to the members of the extended part of the memory (inappropriate area) in iOS 17, It is assumed that the initialization process was performed with an incorrect value and terminated abnormally.

Is this understanding correct? Is it okay to change iOS Deployment Target to 12 or later to solve this problem?

Furthermore,here are some questions.

  1. Is there a way for the application to prevent one of the coordinates from becoming NaN?
  2. Is it necessary to recompiled apps that target an old OS (older than the minimum deployment target os supported by the latest Xcode)to match the minimum deployment target os of the latest Xcode?

Please help us, thanks!

Here is the lastExceptionBacktrace.

Please post the full crash report, using the process described in Posting a Crash Report.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I'm from the same team as tttt202310. I will post the full crash report.

I couldn't find dSYM, but I was able to symbolicate in Xcode, so I'll also post the screenshot.

Looking at this, you can see that the crash occurred during processing from line 144 to line 259 of iNetSecICApplication.m. I am trying to get the controller for the next screen to be displayed on line 144, do I need to check whether the value of mainController is valid?

Here’s the Last Exception Backtrace from your crashing thread:

Last Exception Backtrace:
0   CoreFoundation  … __exceptionPreprocess + 164
1   libobjc.A.dylib … objc_exception_throw + 60
2   CoreFoundation  … -[NSException initWithCoder:] + 0
3   QuartzCore      … CA::Layer::set_position(CA::Vec2 const&, bool) + 168
4   QuartzCore      … -[CALayer setPosition:] + 52
5   QuartzCore      … -[CALayer setFrame:] + 396
6   UIKitCore       … __26-[_UILabelLayer setFrame:]_block_invoke + 56
7   UIKitCore       … -[_UILabelLayer _setFrameOrBounds:settingAction:] + 60
8   UIKitCore       … -[_UILabelLayer setFrame:] + 104
9   UIKitCore       … -[UIView _backing_setFrame:] + 240
10  UIKitCore       … -[UIView(Geometry) setFrame:] + 296
11  UIKitCore       … -[UILabel setFrame:] + 112
12  UIKitCore       … -[UITableViewHeaderFooterView layoutSubviews] + 220
13  UIKitCore       … -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1528
14  QuartzCore      … CA::Layer::layout_if_needed(CA::Transaction*) + 500
15  UIKitCore       … -[UIView(Hierarchy) layoutBelowIfNeeded] + 308
16  UIKitCore       … -[UITableViewHeaderFooterView _sizeThatFits:stripPaddingForAbuttingView:isTopHeader:] + 1…
17  UIKitCore       … -[UISectionRowData _headerFooterSizeForSection:inTable:withTitle:detailText:isHeader:stri…
18  UIKitCore       … -[UISectionRowData refreshWithSection:tableView:tableViewRowData:] + 464
19  UIKitCore       … -[UITableViewRowData rectForFooterInSection:heightCanBeGuessed:] + 104
20  UIKitCore       … -[UITableViewRowData heightForTable] + 52
21  UIKitCore       … -[UITableView _updateContentSizeSkippingContentOffsetAdjustment:] + 168
22  UIKitCore       … -[UITableView _rebuildGeometryForcingRowDataUpdate:skipContentOffsetAdjustment:updateImme…
23  UIKitCore       … -[UITableView setLayoutMargins:] + 204
24  UIKitCore       … -[UITableView _setDefaultLayoutMargins:] + 52
25  UIKitCore       … -[UITableView didMoveToWindow] + 288
26  UIKitCore       … -[UIView(Internal) _didMoveFromWindow:toWindow:] + 1716
27  UIKitCore       … -[UIScrollView _didMoveFromWindow:toWindow:] + 88
28  UIKitCore       … -[UIView(Internal) _didMoveFromWindow:toWindow:] + 684
29  UIKitCore       … __45-[UIView(Hierarchy) _postMovedFromSuperview:]_block_invoke + 124
30  UIKitCore       … -[UIView _postMovedFromSuperview:] + 484
31  UIKitCore       … -[UIView(Internal) _addSubview:positioned:relativeTo:] + 2180
32  UIKitCore       … -[UIWindow addRootViewControllerViewIfPossible] + 728
33  UIKitCore       … -[UIWindow setRootViewController:] + 364
34  iNetSecIC       … 0x100320000 + 27056

In frame 34 you set the root view controller, which triggers a massive cascade of work, which results in Core Animation throwing the exception from CA::Layer::set_position(…) at frame 3.

My experience is that exceptions thrown from CA geometry routines, like this CA::Layer::set_position(…) method, are most often caused by one of the coordinates being a NaN.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

By the way, after iOS 6.0, there are many changes in iOS frame properties. Is there a possibility that the changes of the frame properties caused the problem to occur?

  1. With the release of iOS 7.0, the frame property became read-only for views that are managed by auto layout.
  2. The introduction of size classes in iOS 8.0 further enhanced the adaptive layout capabilities of iOS.
  3. The introduction of the layoutMargins property in iOS 9.0 allows developers to specify custom margins for views.
  4. Safe Area Layout Guide was introduced in iOS 11.0 to handle the layout of views in the presence of notches, home indicators, and other screen features.
  5. iOS 14 added widgets and redesigned the home screen. This allows you to arrange your app's screen frame and It may be resized. It may also change the design of the splash screen that appears when the app starts.

Accepted Answer

My experience is that exceptions thrown from CA geometry routines, like this CA::Layer::set_position(…) method, are most often caused by one of the coordinates being a NaN.

We have checkd the source of the application for a while time . There are no NaN coordinates settings was found. So We don't know how to prevent it on our application side. We think it occurred in the processing part inside UIKit.

Here are some more details about this problem.

  • Our app is compiled with iOS6 as iOS Deployment Target. The app is crashing on an iOS 17/iPadOS 17 device.
  • Since iOS 6, many frame-drawing related fixes have been made.
  • When we changed iOS Deployment Target to 12 or later, Xcode displayed that frame-related fixes were required.
  • When we changed iOS Deployment Target to 12 or later and recompiled, the problem no longer occurred on the device where the problem occurred before.

From the above, we think that the structure related to the screen frame has been expanded and the number of members has increased due to the influence of many modifications. When iOS Deployment Target passes memory in 6.0 or later, it refers to the members of the extended part of the memory (inappropriate area) in iOS 17, It is assumed that the initialization process was performed with an incorrect value and terminated abnormally.

Is this understanding correct? Is it okay to change iOS Deployment Target to 12 or later to solve this problem?

Furthermore,here are some questions.

  1. Is there a way for the application to prevent one of the coordinates from becoming NaN?
  2. Is it necessary to recompiled apps that target an old OS (older than the minimum deployment target os supported by the latest Xcode)to match the minimum deployment target os of the latest Xcode?

Please help us, thanks!

Our app is compiled with iOS 6 as iOS Deployment Target.

What version of Xcode to build that?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

App Crashes On Launch in some iphone(iOS 17)
 
 
Q