React Native Expo iOS生产构建使用TanStack React Query请求时崩溃
React Native + Expo iOS生产构建中React Query触发登录后崩溃问题
React Native + Expo项目中使用TanStack React Query获取数据,开发环境运行正常,但iOS生产构建版本中,每当登录(触发React Query数据请求)时应用就会崩溃。根据日志怀疑问题出在TanStack React Query,但无法完全确定,以下是日志和错误信息:
XHR info GET: https://api/api/v1/chat/conversations?search= [200]
EXC_BAD_ACCESS: functionPrototype > natural > objectPrototype > KERN_INVALID_ADDRESS at 0x28 Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Subtype: KERN_INVALID_ADDRESS at 0x0074656c6b726f57 -> 0x0000656c6b726f57 (possible pointer authentication failure) Exception Codes: 0x0000000000000001, 0x0074656c6b726f57 VM Region Info: 0x656c6b726f57 is not in any region. Bytes after previous region: 5962680397656 REGION TYPE START - END [ VSIZE] PRT/MAX SHRMOD REGION DETAIL MALLOC_NANO 600000000000-600020000000 [512.0M] rw-/rwx SM=PRV ---> UNUSED SPACE AT END Termination Reason: SIGNAL 11 Segmentation fault: 11 Terminating Process: exc handler [59019] Triggered by Thread: 0 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 hermes 0x1086d0f8c hermes::vm::HadesGC::EvacAcceptor<false>::acceptNullable(hermes::vm::PinnedHermesValue&) + 12 1 hermes 0x10862cf10 hermes::vm::GCScope::mark(hermes::vm::RootAcceptor&) + 100 2 hermes 0x10862ce98 hermes::vm::HandleRootOwner::markGCScopes(hermes::vm::RootAcceptor&) + 36 3 hermes 0x108661e70 hermes::vm::Runtime::markRoots(hermes::vm::RootAndSlotAcceptorWithNames&, bool) + 4208 4 hermes 0x1086ccdf0 void hermes::vm::HadesGC::youngGenEvacuateImpl<hermes::vm::HadesGC::EvacAcceptor<false>>(hermes::vm::HadesGC::EvacAcceptor<false>&, bool) + 76 5 hermes 0x1086ca128 hermes::vm::HadesGC::youngGenCollection(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool) + 556 6 hermes 0x1086cc5d8 hermes::vm::HadesGC::allocSlow(unsigned int) + 56 7 hermes 0x108677738 hermes::vm::BufferedStringPrimitive<char>* hermes::vm::GCBase::makeA<hermes::vm::BufferedStringPrimitive<char>, false, (hermes::vm::HasFinalizer)0, (hermes::vm::LongLived)0, hermes::vm::Runtime&, unsigned int&, hermes::vm::Handle<hermes::vm::ExternalStringPrimitive<char>>&>(unsigned int, hermes::vm::Runtime&, unsigned int&, hermes::vm::Handle<hermes::vm::ExternalStringPrimitive<char>>&) + 104 8 hermes 0x108674754 hermes::vm::BufferedStringPrimitive<char>::create(hermes::vm::Runtime&, hermes::vm::Handle<hermes::vm::StringPrimitive>, hermes::vm::Handle<hermes::vm::StringPrimitive>) + 188 9 hermes 0x1086758dc hermes::vm::StringPrimitive::concat(hermes::vm::Runtime&, hermes::vm::Handle<hermes::vm::StringPrimitive>, hermes::vm::Handle<hermes::vm::StringPrimitive>) + 236 10 hermes 0x10865b53c hermes::vm::addOp_RJS(hermes::vm::Runtime&, hermes::vm::Handle<hermes::vm::HermesValue>, hermes::vm::Handle<hermes::vm::HermesValue>) + 276 11 hermes 0x108636208 hermes::vm::CallResult<hermes::vm::HermesValue, (hermes::vm::detail::CallResultSpecialize)2> hermes::vm::Interpreter::interpretFunction<false, false>(hermes::vm::Runtime&, hermes::vm::InterpreterState&) + 13388 12 hermes 0x108632d94 hermes::vm::Runtime::interpretFunctionImpl(hermes::vm::CodeBlock*) + 52 13 hermes 0x108625e2c hermes::vm::JSFunction::_callImpl(hermes::vm::Handle<hermes::vm::Callable>, hermes::vm::Runtime&) + 40 14 hermes 0x10860f790 facebook::hermes::HermesRuntimeImpl::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) + 284 15 OraCash 0x10438b6c4 facebook::jsi::RuntimeDecorator<facebook::jsi::Runtime, facebook::jsi::Runtime>::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) + 36 (decorator.h:347) [inlined] 16 OraCash 0x10438b6c4 facebook::jsi::WithRuntimeDecorator<reanimated::AroundLock, facebook::jsi::Runtime, facebook::jsi::Runtime>::call(facebook::jsi::Function const&, facebook::jsi::Value const&, facebook::jsi::Value const*, unsigned long) + 96 (decorator.h:764) 17 OraCash 0x104380ba0 facebook::jsi::Function::call(facebook::jsi::Runtime&, facebook::jsi::Value const*, unsigned long) const + 44 (jsi-inl.h:264) [inlined] 18 OraCash 0x104380ba0 facebook::jsi::Function::call(facebook::jsi::Runtime&, std::initializer_list<facebook::jsi::Value>) const + 44 (jsi-inl.h:269) [inlined] 19 OraCash 0x104380ba0 facebook::jsi::Value facebook::jsi::Function::call<facebook::jsi::Value&, facebook::jsi::String>(facebook::jsi::Runtime&, facebook::jsi::Value&, facebook::jsi::String&&) const + 148 (jsi-inl.h:277) 20 OraCash 0x104380a70 reanimated::ShareableWorklet::toJSValue(facebook::jsi::Runtime&) + 100 (Shareables.cpp:263) 21 OraCash 0x1043805f0 reanimated::ShareableObject::toJSValue(facebook::jsi::Runtime&) + 184 (Shareables.cpp:236) 22 OraCash 0x1043805f0 reanimated::ShareableObject::toJSValue(facebook::jsi::Runtime&) + 184 (Shareables.cpp:236) 23 OraCash 0x104380a2c reanimated::ShareableWorklet::toJSValue(facebook::jsi::Runtime&) + 32 (Shareables.cpp:262) 24 OraCash 0x1043805f0 reanimated::ShareableObject::toJSValue(facebook::jsi::Runtime&) + 184 (Shareables.cpp:236) 25 OraCash 0x1043805f0 reanimated::ShareableObject::toJSValue(facebook::jsi::Runtime&) + 184 (Shareables.cpp:236) 26 OraCash 0x104380a2c reanimated::ShareableWorklet::toJSValue(facebook::jsi::Runtime&) + 32 (Shareables.cpp:262) 27 OraCash 0x10437fa28 reanimated::ShareableArray::toJSValue(facebook::jsi::Runtime&) + 132 (Shareables.cpp:187) 28 OraCash 0x10437fa28 reanimated::ShareableArray::toJSValue(facebook::jsi::Runtime&) + 132 (Shareables.cpp:187) 29 OraCash 0x1043805f0 reanimated::ShareableObject::toJSValue(facebook::jsi::Runtime&) + 184 (Shareables.cpp:236) 30 OraCash 0x1043805f0 reanimated::ShareableObject::toJSValue(facebook::jsi::Runtime&) + 184 (Shareables.cpp:236) 31 OraCash 0x104380a2c reanimated::ShareableWorklet::toJSValue(facebook::jsi::Runtime&) + 32 (Shareables.cpp:262) 32 OraCash 0x10436283c facebook::jsi::Value reanimated::WorkletRuntime::runGuarded<>(std::__1::shared_ptr<reanimated::ShareableWorklet> const&) const + 24 (WorkletRuntime.h:42) [inlined] 33 OraCash 0x10436283c reanimated::NativeReanimatedModule::scheduleOnUI(facebook::jsi::Runtime&, facebook::jsi::Value const&)::$_9::operator()() const + 28 (NativeReanimatedModule.cpp:207) [inlined] 34 OraCash 0x10436283c decltype(std::declval<reanimated::NativeReanimatedModule::scheduleOnUI(facebook::jsi::Runtime&, facebook::jsi::Value const&)::$_9&>()()) std::__1::__invoke[abi:ue170006]<reanimated::NativeReanimatedModule::scheduleOnUI(facebook::jsi::Runtime&, facebook::jsi::Value const&)::$_9&>(reanimated::NativeReanimatedModule::scheduleOnUI(facebook::jsi::Runtime&, facebook::jsi::Value const&)::$_9&) + 28 (invoke.h:340) [inlined] 35 OraCash 0x10436283c void std::__1::__invoke_void_return_wrapper<void, true>::__call[abi:ue170006]<reanimated::NativeReanimatedModule::scheduleOnUI(facebook::jsi::Runtime&, facebook::jsi::Value const&)::$_9&>(reanimated::NativeReanimatedModule::scheduleOnUI(facebook::jsi::Runtime&, facebook::jsi::Value const&)::$_9&) + 28 (invoke.h:415) [inlined] 36 OraCash 0x10436283c std::__1::__function::__alloc_func<reanimated::NativeReanimatedModule::scheduleOnUI(facebook::jsi::Runtime&, facebook::jsi::Value const&)::$_9, std::__1::allocator<reanimated::NativeReanimatedModule::scheduleOnUI(facebook::jsi::Runtime&, facebook::jsi::Value const&)::$_9>, void ()>::operator()[abi:ue170006]() + 28 (function.h:193) [inlined] 37 OraCash 0x10436283c std::__1::__function::__func<reanimated::NativeReanimatedModule::scheduleOnUI(facebook::jsi::Runtime&, facebook::jsi::Value const&)::$_9, std::__1::allocator<reanimated::NativeReanimatedModule::scheduleOnUI(facebook::jsi::Runtime&, facebook::jsi::Value const&)::$_9>, void ()>::operator()() + 48 (function.h:364) 38 OraCash 0x104388924 std::__1::__function::__value_func<void ()>::operator()[abi:ue170006]() const + 20 (function.h:518) [inlined] 39 OraCash 0x104388924 std::__1::function<void ()>::operator()() const + 20 (function.h:1169) [inlined]
版本信息
- React Native: 0.74.5
- TanStack React Query: 5.55.4
- Hermes: 已启用
崩溃仅发生在iOS生产构建中,且触发时机为登录后使用React Query获取数据时。请问是否有人遇到过React Query与Hermes在iOS生产构建中的类似问题?是否存在已知兼容性问题或可行的解决方法?
内容的提问来源于stack exchange,提问作者haxor12
相关产品推荐
相关产品推荐

