Skip to content

[Tabs] Quickly changing selectedIndex property causes glitches #7694

Closed

Description

@vchimev

Environment

  • tns-core-modules: 6.0.6

Describe the bug

Multiple taps on a button which changes Tabs' selectedIndex causes glitches.

To Reproduce

Triple tap on the button from the repro page.

Expected behavior

Multiple taps does not prevent TabContentItem animation to execution.

Sample project

https://gist.github.com/vchimev/58b6969990c36236221336dc071c8c8d

Additional context

glitches

Activity

  1. ashhadaimviz commented on Aug 19, 2019

    @ashhadaimviz

    working fine on android.

  2. changed the title [-][iOS][Tabs] Quickly changing selectedIndex property causes glitches[/-] [+][Tabs] Quickly changing selectedIndex property causes glitches[/+] on Aug 26, 2019
  3. manoldonev commented on Aug 26, 2019

    @manoldonev
    Contributor

    Managed to crash it on iOS as well:

    CONSOLE LOG file:///app/home/home-page.ts:36:14 ---> args.object TabStripItem(6)@home/home-page.xml:7:7;
    NativeScript caught signal 11.
    Native Stack:
    1   0x10667184f sig_handler(int)
    2   0x10a2b8b5d _sigtramp
    3   0x1098ff5b0 __CFRunLoopRunSpecific_block_invoke
    4   0x10a1feb4d libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step()
    5   0x10a202e4c _Unwind_RaiseException
    6   0x109ddb6bc __cxa_rethrow
    7   0x1087f2c6e objc_exception_rethrow
    8   0x1098ff567 CFRunLoopRunSpecific
    9   0x110b0a2fe GSEventRunModal
    10  0x10c331fc2 UIApplicationMain
    11  0x10700663d ffi_call_unix64
    12  0x11d511640
    JS Stack:
    1   UIApplicationMain@[native code]
    2   _start@file:///app/Users/*/github/NativeScript/tns-core-modules/application/application.ts:344:26
    3   run@file:///app/Users/*/github/NativeScript/tns-core-modules/application/application.ts:372:11
    4   @file:///app/bundle.js:61172:65
    5   ./app.ts@file:///app/bundle.js:61188:34
    6   __webpack_require__@file:///app/webpack/bootstrap:750:0
    7   checkDeferredModules@file:///app/webpack/bootstrap:43:0
    8   webpackJsonpCallback@file:///app/webpack/bootstrap:30:0
    9   anonymous@file:///app/bundle.js:2:61
    10  evaluate@[native code]
    11  moduleEvaluation@:1:11
    12  promiseReactionJob@:1:11
    
  4. AdrianoOP commented on Nov 30, 2019

    @AdrianoOP

    I'm seeing something similar to manoldonev when using bottomNavigation and tabs in iOS... Any tip/workaround?

    Some logs:

    CONSOLE INFO file:///node_modules/nativescript-dev-webpack/hot.js:3:0: HMR: Hot Module Replacement Enabled. Waiting for signal.
    CONSOLE LOG file:///node_modules/@angular/core/fesm5/core.js:25638:0: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
    CONSOLE WARN file:///node_modules/@nativescript/core/ui/bottom-navigation/bottom-navigation.js:23:0: Objective-C class name "UITabBarControllerImpl" is already in use - using "UITabBarControllerImpl1" instead.
    CONSOLE WARN file:///node_modules/@nativescript/core/ui/bottom-navigation/bottom-navigation.js:80:0: Objective-C class name "UITabBarControllerDelegateImpl" is already in use - using "UITabBarControllerDelegateImpl1" instead.
    CONSOLE WARN file:///node_modules/@nativescript/core/ui/bottom-navigation/bottom-navigation.js:138:0: Objective-C class name "UINavigationControllerDelegateImpl" is already in use - using "UINavigationControllerDelegateImpl1" instead.
    NativeScript caught signal 11.
    Native Stack:
    1   0x10bdcfff1 sig_handler(int)
    2   0x7fff51bf9b1d _sigtramp
    3   0x6393c300024e09
    4   0x7fff51c2db85 libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step()
    5   0x7fff51c31e58 _Unwind_RaiseException
    6   0x7fff4f9fc8bd __cxa_throw
    7   0x7fff50b97c44 _objc_exception_destructor(void*)
    8   0x7fff23ce1a71 _CFThrowFormattedException
    9   0x7fff23b634de -[__NSArrayM objectAtIndexedSubscript:]
    10  0x10ce42883 -[TKEntity groupAtIndex:]
    11  0x10c753edd ffi_call_unix64
    12  0x117a99f80
    JS Stack:
    groupAtIndex([native code])
    at getNativeGroup(file:///node_modules/nativescript-ui-dataform/ui-dataform.js:837:0)
    at _initDataForm(file:///node_modules/nativescript-ui-dataform/ui-dataform.js:906:0)
    at _onSourcePropertyChanged(file:///node_modules/nativescript-ui-dataform/ui-dataform.js:947:0)
    at onSourcePropertyChanged(file:///node_modules/nativescript-ui-dataform/ui-dataform.common.js:128:0)
    at valueChanged(file:///node_modules/nativescript-ui-dataform/ui-dataform.common.js:321:0)
    at set(file:///node_modules/@nativescript/core/ui/core/properties/properties.js:164:0)
    at setPropertyInternal(file:///node_modules/@nativescript/angular/view-util.js:286:0)
    at setProperty(file:///node_modules/@nativescript/angular/view-util.js:263:0)
    at setProperty(file:///node_modules/@nativescript/angular/renderer.js:181:0)
    at setProperty(file:///node_modules/@angular/core/fesm5/core.js:30484:0)
    at setElementProperty(file:///node_modules/@angular/core/fesm5/core.js:28555:0)
    at checkAndUpdateElementValue(file:///node_modules/@angular/core/fesm5/core.js:28506:0)
    at checkAndUpdateElementInline(file:///node_modules/@angular/core/fesm5/core.js:28453:0)
    at debugCheckAndUpdateNode(file:///node_modules/@angular/core/fesm5/core.js:30091:0)
    at debugCheckRenderNodeFn(file:///node_modules/@angular/core/fesm5/core.js:30077:0)
    at
    at checkAndUpdateView(file:///node_modules/@angular/core/fesm5/core.js:29444:0)
    at callViewAction(file:///node_modules/@angular/core/fesm5/core.js:29680:0)
    at execComponentViewsAction(file:///node_modules/@angular/core/fesm5/core.js:29622:0)
    
  5. phaeton2040 commented on Jan 14, 2020

    @phaeton2040

    The same error in console but it happens when trying to update RadListView with new data:

    NativeScript caught signal 11.
    Native Stack:
    1 0x10813584f sig_handler(int)
    2 0x7fff51bf9b1d _sigtramp
    3 0x0
    4 0x7fff51c2db85 libunwind::UnwindCursor<libunwind::LocalAddressSpace, libunwind::Registers_x86_64>::step()
    5 0x7fff51c31e58 _Unwind_RaiseException
    6 0x7fff4f9fc8bd __cxa_throw
    7 0x7fff4f9eedbf operator new(unsigned long, std::nothrow_t const&)
    8 0x7fff47068605 -[UICollectionViewData _updateItemCounts]
    9 0x7fff47068b82 -[UICollectionViewData _prepareToLoadData]
    10 0x7fff4706bd4e -[UICollectionViewData collectionViewContentRect]
    11 0x7fff470276b3 -[UICollectionView setFrame:]
    12 0x7fff47d18a5b -[UIView(Geometry) _applyAutoresizingMaskWithOldSuperviewSize:]
    13 0x7fff47d198fa -[UIView(Geometry) _resizeWithOldSuperviewSize:]
    14 0x7fff47c40dbd -[UIScrollView(_UIOldConstraintBasedLayoutSupport) _resizeWithOldSuperviewSize:]
    15 0x7fff23c1cf97 NSARRAY_IS_CALLING_OUT_TO_A_BLOCK
    16 0x7fff23b626ac -[__NSArrayM enumerateObjectsWithOptions:usingBlock:]
    17 0x7fff47d186c1 -[UIView(Geometry) resizeSubviewsWithOldSize:]
    18 0x7fff47d1678f -[UIView(Geometry) setFrame:]
    19 0x10918753c -[TKListView setFrame:]
    20 0x108aca63d ffi_call_unix64
    21 0x11bf5d560
    JS Stack:
    1 setFrame@[native code]
    2 _setNativeViewFrame@file:///node_modules/tns-core-modules/ui/core/view/view.js:129:0
    3 layoutNativeView@file:///node_modules/tns-core-modules/ui/core/view/view.js:165:0
    4 layout@file:///node_modules/tns-core-modules/ui/core/view/view.js:66:0
    5 layoutChild@file:///node_modules/tns-core-modules/ui/core/view/view-common.js:933:0
    6 onLayout@file:///node_modules/tns-core-modules/ui/layouts/grid-layout/grid-layout.js:167:0
    7 layout@file:///node_modules/tns-core-modules/ui/core/view/view.js:74:0
    8 layoutChild@file:///node_modules/tns-core-modules/ui/core/view/view-common.js:933:0
    9 @file:///node_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:112:0
    10 eachLayoutChild@file:///node_modules/tns-core-modules/ui/layouts/layout-base-common.js:143:0
    11 layoutVertical@file:///node_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:110:0
    12 onLayout@file:///node_modules/tns-core-modules/ui/layouts/stack-layout/stack-layout.js:82:0
    13 layout@file:///node_modules/tns-core-modules/ui/core/view/view.js:74:0
    14 layoutChild@file:///node_modules/tns-core-modules/ui/core/view/view-common.js:933:0
    15 layoutView@file:///node_modules/tns-core-modules/ui/core/view/view.js:637:0
    16 viewDidLayoutSubviews@file:///node_modules/tns-core-modules/ui/core/view/view.js:803:0
    17 UIApplicationMain@[native code]
    18 _start@file:///node_modules/tns-core-modules/application/application.js:277:0
    19 run@file:///node_modules/tns-core-modules/application/application.js:305:0
    20 bootstrapNativeScriptApp@file:///node_modules/nativescript-angular/platform-common.js:205:0
    21 bootstrapApp@file:///node_modules/nativescript-angular/platform-common.js:106:0
    22 bootstrapModule@file:///app/vendor.js:84<…>

  6. rigor789 commented on Sep 7, 2023

    @rigor789
    Member

    Closing because BottomNavigation and Tabs are no longer part of core since NativeScript 8.0:

    https://blog.nativescript.org/nativescript-8-announcement/#important-note-about-bottomnavigation-and-tabs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions