Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Call getApplicationContext 2 times in a worker and then calling worker.terminate breaks the app #9561

Copy link
Copy link
Open
@vallemar

Description

@vallemar
Issue body actions

Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
✔ Getting NativeScript components versions information...
✔ Component nativescript has 8.1.2 version and is up to date.
✔ Component @nativescript/core has 8.1.3 version and is up to date.
✔ Component @nativescript/android has 8.1.1 version and is up to date.

Describe the bug
Call Utils.android.getApplicationContext() 2 times in a worker and then calling worker.terminate breaks the app

To Reproduce
Repo: https://github.com/vallemar/bug-worker/tree/master/app/components

Run and tap screen 2 times to run worker 2 times. When worker.terminate is called the second time after calling Utils.android.getApplicationContext() twice, the application will be closed

Lines break app:

on android studio i have this logs

2021-09-21 20:43:02.096 17027-17165/org.nativescript.bugworker E/libc++abi: terminate_handler unexpectedly threw an exception
2021-09-21 20:43:02.209 17027-17165/org.nativescript.bugworker I/chatty: uid=11153(org.nativescript.bugworker) package_json.js identical 145 lines
2021-09-21 20:43:02.210 17027-17165/org.nativescript.bugworker E/libc++abi: terminate_handler unexpectedly threw an exception
2021-09-21 20:43:02.211 17027-17165/org.nativescript.bugworker E/libc++abi: terminate_handler unexpectedly threw an exception
2021-09-21 20:43:02.278 17027-17165/? I/chatty: uid=11153(org.nativescript.bugworker) cript.bugworker identical 87 lines
2021-09-21 20:43:02.279 17027-17165/? E/libc++abi: terminate_handler unexpectedly threw an exception

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.