Repository navigation
NS runtime crashes in iOS18 Simulators #262
Description
Activity
@edusperoni I have seen that you are actively developing on the runtime. Unfortunately, since NS 8.8 I am observing crashes when starting the ios app on an simulator with IOS 18, 18.1 and 18.2. I was now able to get some more insights when debugging with xcode. Unfortunately, I have no idea where to look for in the VS8 code.
Might you have some directions on how I could get to the source of the issue?Note: When running on IOS 17.x simulators I am not seeing the issue. Also I see random crashes of my app on real devices when the app switches between for and background. As this happens not very often I suspect it to be a timing related issue.
When starting the app, the app tries to login via oauth, hence opening a safari browser. I suspect the foreground background switch of the app to be involved with the issue.
NativeScript`tns::ObjectManager::FinalizerCallback: 0x112e56a3e <+0>: pushq %rbp 0x112e56a3f <+1>: movq %rsp, %rbp 0x112e56a42 <+4>: pushq %r14 0x112e56a44 <+6>: pushq %rbx 0x112e56a45 <+7>: movq (%rdi), %r14 0x112e56a48 <+10>: movq 0x8(%rdi), %rbx 0x112e56a4c <+14>: movq (%rbx), %rax -> 0x112e56a4f <+17>: movq (%rax), %rax 0x112e56a52 <+20>: testq %rax, %rax 0x112e56a55 <+23>: je 0x112e56a67 ; <+41> at v8-local-handle.h 0x112e56a57 <+25>: movq (%rax), %rsi 0x112e56a5a <+28>: movq %r14, %rdi 0x112e56a5d <+31>: callq 0x112f0a990 ; v8::HandleScope::CreateHandle(v8::internal::Isolate*, unsigned long) 0x112e56a62 <+36>: movq %rax, %rsi 0x112e56a65 <+39>: jmp 0x112e56a69 ; <+43> at ObjectManager.mm:34:21 0x112e56a67 <+41>: xorl %esi, %esi 0x112e56a69 <+43>: movq %r14, %rdi 0x112e56a6c <+46>: xorl %edx, %edx 0x112e56a6e <+48>: callq 0x112e56ac6 ; tns::ObjectManager::DisposeValue at ObjectManager.mm:45 0x112e56a73 <+53>: movq (%rbx), %r14 0x112e56a76 <+56>: movq (%r14), %rdi 0x112e56a79 <+59>: testb %al, %al 0x112e56a7b <+61>: je 0x112e56aa2 ; <+100> [inlined] void* v8::PersistentBase<v8::Value>::ClearWeak<void>() at v8-persistent-handle.h:533:31 0x112e56a7d <+63>: testq %rdi, %rdi 0x112e56a80 <+66>: je 0x112e56a8e ; <+80> [inlined] std::__1::shared_ptr<v8::Persistent<v8::Value, v8::NonCopyablePersistentTraits<v8::Value>>>::~shared_ptr[abi:ue170006]() at shared_ptr.h:771:5 0x112e56a82 <+68>: callq 0x112f0a450 ; v8::api_internal::DisposeGlobal(unsigned long*) 0x112e56a87 <+73>: movq $0x0, (%r14) 0x112e56a8e <+80>: movq %rbx, %rdi 0x112e56a91 <+83>: callq 0x112e755e0 ; std::__1::shared_ptr<v8::Persistent<v8::Value, v8::NonCopyablePersistentTraits<v8::Value>>>::~shared_ptr[abi:ue170006] at shared_ptr.h:771 0x112e56a96 <+88>: movq %rbx, %rdi 0x112e56a99 <+91>: popq %rbx 0x112e56a9a <+92>: popq %r14 0x112e56a9c <+94>: popq %rbp 0x112e56a9d <+95>: jmp 0x113aa9b66 ; symbol stub for: operator delete(void*) 0x112e56aa2 <+100>: callq 0x112f0a430 ; v8::api_internal::ClearWeak(unsigned long*) 0x112e56aa7 <+105>: movq (%rbx), %rax 0x112e56aaa <+108>: movq (%rax), %rdi 0x112e56aad <+111>: leaq -0x76(%rip), %rdx ; <+0> at ObjectManager.mm:30 0x112e56ab4 <+118>: movq %rbx, %rsi 0x112e56ab7 <+121>: movl $0x2, %ecx 0x112e56abc <+126>: popq %rbx 0x112e56abd <+127>: popq %r14 0x112e56abf <+129>: popq %rbp 0x112e56ac0 <+130>: jmp 0x112f0a410 ; v8::api_internal::MakeWeak(unsigned long*, void*, void (*)(v8::WeakCallbackInfo<void> const&), v8::WeakCallbackType)
Seems like my assumption with SFSafariViewController being the problem is a different issue which is explainable via an iOS18bug.
https://developer.apple.com/forums/thread/764468?answerId=806060022#806060022
However, the bug I am seeing above also seems to appear on real devices which would denote the IOS18 issue in the mentioned thread cannot be the source of the problem of my observation.
The issue documented in the thread looks exactly the same like in my usecase, but seems like I am seeing two overlapping issues here:
https://github.com/user-attachments/assets/0504e082-20cb-4962-ac3b-b6af5fe36c5f
https://github.com/user-attachments/assets/fdf16d3e-5f5c-464c-afba-4344a01ad9a6
Hello together,
I am currently trying to migrate my app from NS 8.7 to 8.8. It seems like NS has an issue on simulators running iOS18. The relevant code block which kills the runtime is the following, hence opening an SFSafariViewController breaks the app. The crash log is attached below,
crashiOS18SimOniPhone15Pro.txt
seems like it is a V8 related issue.
Dependencies