Description
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:
- https://github.com/vallemar/bug-worker/blob/master/app/components/Home.vue#L27
- https://github.com/vallemar/bug-worker/blob/master/app/components/Worker.ts#L6
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