NativeScript / NativeScript/ios
Random Crashes with ns7 core modules
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 150
- Forks
- 43
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 22
Description
We're also experiencing pretty random but often crash from time to time on iOS devices with latest NS 7 core modules and the project built with Xcode 12:
====== Assertion failed ======
Native stack trace:
1 0x1019f4f3c tns::Assert(bool, v8::Isolate*) + 128
2 0x10196178c tns::ArgConverter::Invoke(v8::Local<v8::Context>, objc_class*, v8::Local<v8::Object>, tns::V8Args&, tns::MethodMeta const*, bool) + 100
3 0x1019ba984 tns::MetadataBuilder::InvokeMethod(v8::Local<v8::Context>, tns::MethodMeta const*, v8::Local<v8::Object>, tns::V8Args&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool) + 88
4 0x1019ba210 tns::MetadataBuilder::MethodCallback(v8::FunctionCallbackInfo<v8::Value> const&) + 220
5 0x101b23e10 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) + 536
6 0x101b233dc v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) + 516
7 0x101b22b7c v8::internal::Builtin_Impl_HandleApiCall(v8::internal::BuiltinArguments, v8::internal::Isolate*) + 224
8 0x1022b4d8c Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit + 108
9 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
10 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
11 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
12 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
13 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
14 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
15 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
16 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
17 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
18 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
19 0x102246504 Builtins_ArgumentsAdaptorTrampoline + 228
20 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
21 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
22 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
23 0x10224d6b4 Builtins_InterpreterEntryTrampoline + 244
24 0x10224af64 Builtins_JSEntryTrampoline + 164
25 0x10224ac08 Builtins_JSEntry + 168
26 0x122ac4000 26 ??? 0x0000000122ac4000 0x0 + 4876681216
JavaScript stack trace:
at _removeViewFromNativeVisualTree (file: app/packages/core/ui/core/view/index.ios.ts:787:29)
at _tearDownUI (file: app/packages/core/ui/core/view-base/index.ts:871:15)
at <anonymous> (file: app/packages/core/ui/core/view-base/index.ts:865:9)
at eachChildView (file: app/packages/core/ui/layouts/layout-base-common.ts:125:18)
at eachChild (file: app/packages/core/ui/core/view/view-common.ts:867:7)
at _tearDownUI (file: app/packages/core/ui/core/view-base/index.ts:864:7)
at <anonymous> (file: app/packages/core/ui/core/view-base/index.ts:865:9)
at eachChildView (file: app/packages/core/ui/layouts/layout-base-common.ts:125:18)
at eachChild (file: app/packages/core/ui/core/view/view-common.ts:867:7)
at _tearDownUI (file: app/packages/core/ui/core/view-base/index.ts:864:7)
Originally posted by @romandragan in https://github.com/NativeScript/NativeScript/issues/8867#issuecomment-698143588
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with app/packages/core/ui/core/view/index.ios.ts at _removeViewFromNativeVisualTree and trace the teardown calls through view-base/index.ts and layout-base-common.ts. Reproduce the assertion on an iOS device using the reported NativeScript 7 and Xcode 12 setup, then confirm the teardown path no longer crashes under the observed conditions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, javascript
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100