Skip to content

Worker crash at exit #1163

@patricklx

Description

@patricklx

Hi again, we see again issues with worker thread termination. We see them in firebase, but not sure how to reproduce it yet.

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):

  • CLI: 3.5.1
  • Cross-platform modules:
  • iOS Runtime: v5.4.2
  • Android Runtime (if applicable):
  • Plugin(s):

Describe the bug
When the worker thread exits, it crashes.

EXC_BAD_ACCESS KERN_INVALID_ADDRESS 0x0000000000014310

0  NativeScript                   0x10580c44c JSC::JSLock::dropAllLocks(JSC::JSLock::DropAllLocks*) (VM.h:696)
1  NativeScript                   0x10580c438 JSC::JSLock::dropAllLocks(JSC::JSLock::DropAllLocks*) (ThreadSpecific.h:158)
2  NativeScript                   0x10580c628 JSC::JSLock::DropAllLocks::DropAllLocks(JSC::VM*) (JSLock.cpp:280)
3  NativeScript                   0x105f0ae10 JSC::Heap::releaseDelayedReleasedObjects() (Heap.cpp:487)
4  NativeScript                   0x105f0acd4 JSC::Heap::lastChanceToFinalize() (Vector.h:691)
5  NativeScript                   0x105943a58 JSC::VM::~VM() (VM.cpp:629)
6  NativeScript                   0x10580bd7c JSC::JSLockHolder::~JSLockHolder() (ThreadSafeRefCounted.h:37)
7  NativeScript                   0x105732370 -[TNSRuntime dealloc] (TNSRuntime.mm:372)

I think its because the check here passes with a negative refCount, since here where it still goes on substracting -1

Expected behavior
Should exit without crash

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions