Skip to content

Android: Crash with "markingMode: none" + navigation + backgroundColor change (NS 5.4 / 6.0) #7867

@jpierront

Description

@jpierront

Environment

  • CLI: 5.4.? & 6.0.2
  • Cross-platform modules: 5.4.2 & 6.0.1
  • Android Runtime: 5.4.0 & 6.0.0
  • NativeScript-Angular: 8.0.0 & 8.0.2
  • Angular: 8.0.0 & 8.0.3

Tested on Android Emulator 8.1

Describe the bug
I get "Attempt to use cleared object reference" errors in a few seconds with the MarkingMode = none. (Again: #7125)

You have to change background colors of elements while navigating to a new route several times. After a while it crash.

Use case: Change background color of current route in a menu.

  • It don’t crash when you only navigating
  • It don’t crash when you only change background color
  • It crash when you do both
  • It don’t crash when you change text color instead of background color
  • It crash quicker when you do lot of calculations in the app

To Reproduce

  • Navigate to a new route every second (router.navigate)
  • Change Background color of current route in the menu ([class.active]=« … »)
  • Overloading the app with other changes (Here other background color changes) (Necessary to accelerate the crash)

Expected behavior
No crash.

Sample project
https://play.nativescript.org/?template=play-ng&id=4RKa1j&v=2
Download it, add "markingMode": "none" in app/package.json under « android » object
Yes, it don’t crash directly in PlayGround.

Additional context
Observed on my application and reproduced in a blank application.
In my app it can crash after 3 or 40 route changes.

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