Repository navigation
Closed
Labels
Description
Issue Description
After updating @natitescript/core to 3.2.0 or above version application starting crashing on device rotation
Reproduction
No response
Relevant log output (if applicable)
***** Fatal JavaScript exception - application has been terminated. *****
2022-11-27 23:52:13.723549+0200 mobilequicklert[59130:1251799] NativeScript encountered a fatal error: Uncaught TypeError: Cannot read property 'getColumnIndex' of undefined
at
onLayout(file:///app/vendor.js:33113:66)
at layout(file:///app/vendor.js:23254:18)
at layoutChild(file:///app/vendor.js:25430:15)
at layoutChild(file:///app/vendor.js:24748:63)
at onLayout(file:///app/vendor.js:36319:54)
at layout(file:///app/vendor.js:23254:18)
at layoutChild(file:///app/vendor.js:25430:15)
at layoutView(file:///app/vendor.js:25205:69)
at UIViewControllerImpl.viewDidLayoutSubviews(file:///app/vendor.js:36160:63)
2022-11-27 23:52:13.743407+0200 mobilequicklert[59130:1251799] *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught TypeError: Cannot read property 'getColumnIndex' of undefined
at
onLayout(file:///app/vendor.js:33113:66)
at layout(file:///app/vendor.js:23254:18)
at layoutChild(file:///app/vendor.js:25430:15)
at layoutChild(file:///app/vendor.js:24748:63)
at onLayout(file:///app/vendor.js:36319:54)
at layout(file:///app/vendor.js:23254:18)
at layoutChild(file:///app/vendor.js:25430:15)
at layoutView(file:///app/vendor.js:25205:69)
at UIViewControllerImpl.viewDidLayoutSubviews(file:///app/vendor.js:36160:63)
', reason: '(null)'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff8004278cb __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff80004dba3 objc_exception_throw + 48
2 NativeScript 0x0000000111e17946 _ZN3tns21NativeScriptException15OnUncaughtErrorEN2v85LocalINS1_7MessageEEENS2_INS1_5ValueEEE + 1044
3 NativeScript 0x00000001121fe714 _ZN2v88internal14MessageHandler25ReportMessageNoExceptionsEPNS0_7IsolateEPKNS0_15MessageLocationENS0_6HandleINS0_6ObjectEEENS_5LocalINS_5ValueEEE + 356
4 NativeScript 0x00000001121fe573 _ZN2v88internal14MessageHandler13ReportMessageEPNS0_7IsolateEPKNS0_15MessageLocationENS0_6HandleINS0_15JSMessageObjectEEE + 883
5 NativeScript 0x00000001121347bf _ZN2v88internal7Isolate21ReportPendingMessagesEv + 751
6 NativeScript 0x0000000112071cc5 _ZN2v88internal12_GLOBAL__N_16InvokeEPNS0_7IsolateERKNS1_12InvokeParamsE + 2085
7 NativeScript 0x0000000112071473 _ZN2v88internal9Execution4CallEPNS0_7IsolateENS0_6HandleINS0_6ObjectEEES6_iPS6_ + 227
8 NativeScript 0x0000000111e83fa5 _ZN2v88Function4CallENS_5LocalINS_7ContextEEENS1_INS_5ValueEEEiPS5_ + 405
9 NativeScript 0x0000000111d53f20 _ZN3tns12ArgConverter14MethodCallbackEP7ffi_cifPvPS3_S3_ + 1334
10 NativeScript 0x0000000111e53356 ffi_closure_unix64_inner + 662
11 NativeScript 0x0000000111e545da ffi_closure_unix64 + 72
12 QuartzCore 0x00007ff80893c0fc _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 526
13 QuartzCore 0x00007ff80893587f -[CALayer layoutIfNeeded] + 333
14 UIKitCore 0x0000000117591812 __86-[UIViewController window:willAnimateRotationToInterfaceOrientation:duration:newSize:]_block_invoke + 52
15 UIKitCore 0x000000011848a3de +[UIView _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 588
16 UIKitCore 0x000000011848a781 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 25
17 UIKitCore 0x00000001175917a8 -[UIViewController window:willAnimateRotationToInterfaceOrientation:duration:newSize:] + 339
18 UIKitCore 0x0000000117599f66 __104-[UIViewController(AdaptiveSizing_Internal) _window:viewWillTransitionToSize:withTransitionCoordinator:]_block_invoke.3575 + 54
19 UIKitCore 0x00000001175a2c26 -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 297
20 UIKitCore 0x000000011759f16b -[_UIViewControllerTransitionContext __runAlongsideAnimations] + 278
21 UIKitCore 0x000000011848a3de +[UIView _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 588
22 UIKitCore 0x000000011848a781 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 25
23 UIKitCore 0x00000001175bbe90 __58-[_UIWindowRotationAnimationController animateTransition:]_block_invoke_2 + 280
24 UIKitCore 0x000000011848e933 +[UIView _performBlockDelayingTriggeringResponderEvents:forScene:] + 209
25 UIKitCore 0x00000001175bbc0e __58-[_UIWindowRotationAnimationController animateTransition:]_block_invoke + 152
26 UIKitCore 0x000000011848b909 +[UIView(UIViewAnimationWithBlocksPrivate) _modifyAnimationsWithPreferredFrameRateRange:updateReason:animations:] + 164
27 UIKitCore 0x000000011848a3de +[UIView _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 588
28 UIKitCore 0x000000011848a781 +[UIView(UIViewAnimationWithBlocks) animateWithDuration:delay:options:animations:completion:] + 25
29 UIKitCore 0x00000001175bba84 -[_UIWindowRotationAnimationController animateTransition:] + 594
30 UIKitCore 0x0000000117eba26b -[UIWindow _rotateToBounds:withAnimator:transitionContext:] + 640
31 UIKitCore 0x0000000117ebd613 -[UIWindow _rotateWindowToOrientation:updateStatusBar:duration:skipCallbacks:] + 2034
32 UIKitCore 0x0000000117ebdbdb -[UIWindow _setRotatableClient:toOrientation:updateStatusBar:duration:force:isRotating:] + 641
33 UIKitCore 0x0000000117eb9219 -[UIWindow _internal_setRotatableViewOrientation:updateStatusBar:duration:force:] + 113
34 UIKitCore 0x0000000117ebb7d6 __57-[UIWindow _updateToInterfaceOrientation:duration:force:]_block_invoke + 214
35 UIKitCore 0x0000000117ebb445 -[UIWindow _updateToInterfaceOrientation:duration:force:] + 1558
36 UIKitCore 0x00000001172a1384 -[_UIScenefbsSceneBasedMetricsCalculator _updateMetricsOnWindows:animated:] + 1844
37 UIKitCore 0x000000011815b114 -[UIWindowScene _computeMetricsForWindows:animated:] + 89
38 UIKitCore 0x000000011815a4fc __33-[UIWindowScene _computeMetrics:]_block_invoke + 130
39 UIKitCore 0x000000011815a66b -[UIWindowScene _computeMetricsAndForceDelegateCallback:withAction:] + 326
40 UIKitCore 0x000000011815a474 -[UIWindowScene _computeMetrics:] + 75
41 UIKitCore 0x000000011848a3de +[UIView _setupAnimationWithDuration:delay:view:options:factory:animations:start:animationStateGenerator:completion:] + 588
42 UIKitCore 0x000000011848a698 +[UIView(UIViewAnimationWithBlocks) _animateWithDuration:delay:options:factory:animations:completion:] + 20
43 UIKitCore 0x00000001177e2293 +[BSAnimationSettings(UIKit) tryAnimatingWithSettings:fromCurrentState:actions:completion:] + 625
44 UIKitCore 0x000000011792f42f _UISceneSettingsDiffActionPerformChangesWithTransitionContextAndCompletion + 257
45 UIKitCore 0x00000001172a7add -[_UIWindowSceneGeometrySettingsDiffAction _updateSceneGeometryWithSettingObserverContext:windowScene:transitionContext:] + 700
46 UIKitCore 0x00000001172a7774 -[_UIWindowSceneGeometrySettingsDiffAction _performActionsForUIScene:withUpdatedFBSScene:settingsDiff:fromSettings:transitionContext:lifecycleActionType:] + 1537
47 UIKitCore 0x0000000117090f16 __64-[UIScene scene:didUpdateWithDiff:transitionContext:completion:]_block_invoke.594 + 815
48 UIKitCore 0x000000011708f92c -[UIScene _emitSceneSettingsUpdateResponseForCompletion:afterSceneUpdateWork:] + 245
49 UIKitCore 0x0000000117090ac3 -[UIScene scene:didUpdateWithDiff:transitionContext:completion:] + 255
50 UIKitCore 0x00000001178150c6 -[UIApplicationSceneClientAgent scene:handleEvent:withCompletion:] + 475
51 FrontBoardServices 0x00007ff80547cd94 -[FBSScene updater:didUpdateSettings:withDiff:transitionContext:completion:] + 521
52 FrontBoardServices 0x00007ff8054ac45a __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke_2 + 133
53 FrontBoardServices 0x00007ff80548a46a -[FBSWorkspace _calloutQueue_executeCalloutFromSource:withBlock:] + 209
54 FrontBoardServices 0x00007ff8054ac3a2 __94-[FBSWorkspaceScenesClient _queue_updateScene:withSettings:diff:transitionContext:completion:]_block_invoke + 372
55 libdispatch.dylib 0x0000000111037f5b _dispatch_client_callout + 8
56 libdispatch.dylib 0x000000011103b8d2 _dispatch_block_invoke_direct + 496
57 FrontBoardServices 0x00007ff8054d0980 __FBSSERIALQUEUE_IS_CALLING_OUT_TO_A_BLOCK__ + 30
58 FrontBoardServices 0x00007ff8054d0876 -[FBSSerialQueue _targetQueue_performNextIfPossible] + 174
59 FrontBoardServices 0x00007ff8054d09a8 -[FBSSerialQueue _performNextFromRunLoopSource] + 19
60 CoreFoundation 0x00007ff800387035 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
61 CoreFoundation 0x00007ff800386f74 __CFRunLoopDoSource0 + 157
62 CoreFoundation 0x00007ff800386771 __CFRunLoopDoSources0 + 212
63 CoreFoundation 0x00007ff800380e73 __CFRunLoopRun + 927
64 CoreFoundation 0x00007ff8003806f7 CFRunLoopRunSpecific + 560
65 GraphicsServices 0x00007ff809c5c28a GSEventRunModal + 139
66 UIKitCore 0x0000000117e6862b -[UIApplication _run] + 994
67 UIKitCore 0x0000000117e6d547 UIApplicationMain + 123
68 NativeScript 0x0000000111e5441d ffi_call_unix64 + 85
69 ??? 0x00006000024d59f0 0x0 + 105553154890224
)
libc++abi: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught TypeError: Cannot read property 'getColumnIndex' of undefined
at
onLayout(file:///app/vendor.js:33113:66)
at layout(file:///app/vendor.js:23254:18)
at layoutChild(file:///app/vendor.js:25430:15)
at layoutChild(file:///app/vendor.js:24748:63)
at onLayout(file:///app/vendor.js:36319:54)
at layout(file:///app/vendor.js:23254:18)
at layoutChild(file:///app/vendor.js:25430:15)
at layoutView(file:///app/vendor.js:25205:69)
at UIViewControllerImpl.viewDidLayoutSubviews(file:///app/vendor.js:36160:63)
', reason: '(null)'
terminating with uncaught exception of type NSException
CoreSimulator 857.13 - Device: iPad (10th generation) (70BA54D7-F3D7-4AB8-AD80-96201EB82F6A) - Runtime: iOS 16.1 (20B72) - DeviceType: iPad (10th generation)
(lldb)Environment
No response
Please accept these terms
- I have searched the existing issues as well as StackOverflow and this has not been posted before
- This is a bug report
- I agree to follow this project's Code of Conduct
Activity
serhiynovos commentedon Nov 27, 2022
Found it happens on pages where ListView with template is used
serhiynovos commentedon Nov 28, 2022
Created test app, was not able to reproduce the crash but found similar behaviour. You can see that it's working as expected on @nativesript/core 8.1.1

But after upgrading since 8.2.0 (in my case I updated to 8.3.6) it starting working in this way

But on the same 8.3.6 version if I remove template from ListView component there are not issues

I published test app to this repository https://github.com/serrg1994/natiescript-issues-testing-app
CatchABus commentedon Nov 28, 2022
@serrg1994 Hello. Thanks for the details, this looks quite suspicious.
Can you help in locating the issue? I would like you to comment out or remove this line inside your
node_modulesand try again: https://github.com/NativeScript/NativeScript/blob/main/packages/core/ui/core/view/index.ios.ts#L214serhiynovos commentedon Nov 28, 2022
Ok. @CatchABus Updated @nativescript/core to 8.3.6 and commented the line that you suggested, it started working fine, then I un commented it back and issue was there. So yeah looks like the problem is in this line
serhiynovos commentedon Nov 28, 2022
@CatchABus Did the same with my original project and app is not crashing anymore
CatchABus commentedon Nov 28, 2022
Thank you very much for confirmation. We'll look into this as this line fixes a problem but creates another.
serhiynovos commentedon Dec 8, 2022
Do you have any plans in which version it will be fixed? It's a stopper to use 8.2+ NativeScript version
CatchABus commentedon Jan 4, 2023
@serrg1994 We are in the process of taking care of this. Could you provide us with a simple app sample that lets reproduce the issue? That would be very helpful.
CatchABus commentedon Mar 31, 2026
Closing due to inactivity.