microsoft / onnxruntime

ONNX Runtime: cross-platform, high performance ML inferencing and training accelerator
https://onnxruntime.ai
MIT License
13.5k stars 2.76k forks source link

[Mobile] React-native OnnxruntimeJSIHelper install segfaults when registering functions #21003

Open venetanji opened 3 weeks ago

venetanji commented 3 weeks ago

Describe the issue

I built the latest aar package and I am using it in onnxruntime-react-native. If I comment the OnnxruntimeJSIHelper.install() call in bindings.ts the models load fine. When calling Java_ai_onnxruntime_reactnative_OnnxruntimeJSIHelper_nativeInstall the app segfaults, failing reentrancy check. Similar to https://github.com/facebook/react-native/issues/35720

art_sigsegv_fault 0x0000782ffa6684a0 art::FaultManager::HandleSigsegvFault(int, siginfo , void ) 0x0000782ffa669244 art::SignalChain::Handler(int, siginfo , void ) 0x00007832a04a93a9 restore_rt 0x00007832a14f19d0 std::ndk1::cxx_atomic_compare_exchange_strong[abi:v170000]<…>(std::ndk1::cxx_atomic_base_impl<…> *, std::ndk1::thread_id *, std::ndk1::thread_id, std::ndk1::memory_order, std::ndk1::memory_order) 0x0000782f7c6d39d1 std::ndk1::atomic_base::compare_exchange_strong[abi:v170000](std::ndk1::thread_id &, std::ndk1::thread_id, std::ndk1::memory_order) 0x0000782f7c6d3724 facebook::react::ReentrancyCheck::before() HermesExecutorFactory.cpp:91 facebook::jsi::detail::BeforeCaller::before(facebook::react::ReentrancyCheck &) decorator.h:465 facebook::jsi::WithRuntimeDecorator::Around::Around(facebook::react::ReentrancyCheck &) decorator.h:797 facebook::jsi::WithRuntimeDecorator::clonePropNameID(const facebook::jsi::Runtime::PointerValue ) decorator.h:588 [Inlined] facebook::jsi::PropNameID::forAscii(facebook::jsi::Runtime &, const char , unsigned long) jsi.h:395 [Inlined] facebook::jsi::PropNameID::forAscii(facebook::jsi::Runtime &, const char ) jsi.h:401 Java_ai_onnxruntime_reactnative_OnnxruntimeJSIHelper_nativeInstall(JNIEnv , jclass, jlong, jobject) cpp-adapter.cpp:76 art_quick_generic_jni_trampoline 0x0000782ffa591a4c art_quick_invoke_static_stub 0x0000782ffa578827 art::ArtMethod::Invoke(art::Thread , unsigned int , unsigned int, art::JValue , const char ) 0x0000782ffa5c5390 art::interpreter::DoCall<…>(art::ArtMethod , art::Thread , art::ShadowFrame &, const art::Instruction , unsigned short, bool, art::JValue ) 0x0000782ffa76ddd1 art::interpreter::ExecuteSwitchImplCpp<…>(art::interpreter::SwitchImplContext ) 0x0000782ffa59b0a2 ExecuteSwitchImplAsm 0x0000782ffa5937a6 art::interpreter::Execute(art::Thread, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.uniq.112435418011751916792819755956732575238) 0x0000782ffa766018 artQuickToInterpreterBridge 0x0000782ffab1f057 art_quick_to_interpreter_bridge 0x0000782ffa591bdd art_quick_invoke_stub 0x0000782ffa5784c5 art::ArtMethod::Invoke(art::Thread , unsigned int , unsigned int, art::JValue , const char ) 0x0000782ffa5c535d art::InvokeVirtualOrInterfaceWithJValues<…>(const art::ScopedObjectAccessAlreadyRunnable &, _jobject , art::ArtMethod , const jvalue ) 0x0000782ffa9f1f21 art::JNI::CallBooleanMethodA(_JNIEnv , _jobject , _jmethodID , const jvalue ) 0x0000782ffa8776c1 art::(anonymous namespace)::CheckJNI::CallMethodA(char const, _JNIEnv, _jobject, _jclass, _jmethodID, jvalue const, art::Primitive::Type, art::InvokeType) (.__uniq.99033978352804627313491551960229047428) 0x0000782ffa7e1dee art::(anonymous namespace)::CheckJNI::CallBooleanMethodA(_JNIEnv, _jobject, _jmethodID, jvalue const*) (.uniq.99033978352804627313491551960229047428.llvm.1924743731234850023) 0x0000782ffa7cd8bf _JNIEnv::CallBooleanMethodA(_jobject , _jmethodID , const jvalue ) jni.h:618 facebook::react::MethodInvoker::invoke(std::__ndk1::weak_ptr<…> &, facebook::jni::alias_ref<…>, const folly::dynamic &) MethodInvoker.cpp:285 facebook::react::JavaNativeModule::callSerializableNativeHook(unsigned int, folly::dynamic &&) JavaModuleWrapper.cpp:151 facebook::react::ModuleRegistry::callSerializableNativeHook(unsigned int, unsigned int, folly::dynamic &&) ModuleRegistry.cpp:234 facebook::react::JsToNativeBridge::callSerializableNativeHook(facebook::react::JSExecutor &, unsigned int, unsigned int, folly::dynamic &&) NativeToJsBridge.cpp:90 facebook::react::JSIExecutor::nativeCallSyncHook(const facebook::jsi::Value , unsigned long) JSIExecutor.cpp:468 [Inlined] $_1::operator()(facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value , unsigned long) const JSIExecutor.cpp:124 [Inlined] std::ndk1::invoke[abi:v170000]<…>($_1 &, facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value &&, unsigned long &&) Invoke.h:394 [Inlined] std::ndk1::invoke_void_return_wrapper::call<…>($_1 &, facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value &&, unsigned long &&) Invoke.h:478 [Inlined] std::ndk1::function::__alloc_func::operator()[abi:v170000](facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value &&, unsigned long &&) Function.h:185 std::ndk1::function::func::operator()(facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value &&, unsigned long &&) Function.h:356 std::ndk1::function::__value_func::operator()[abi:v170000](facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value &&, unsigned long &&) const Function.h:510 std::ndk1::function::operator()(facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value , unsigned long) const Function.h:1156 facebook::jsi::DecoratedHostFunction::operator()(facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value , unsigned long) decorator.h:36 std::ndk1::invoke[abi:v170000]<…>(facebook::jsi::DecoratedHostFunction &, facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value *&&, unsigned long &&) Invoke.h:394 std::ndk1::invoke_void_return_wrapper::call<…>(facebook::jsi::DecoratedHostFunction &, facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value *&&, unsigned long &&) Invoke.h:478 std::ndk1::function::alloc_func::operator()[abi:v170000](facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value *&&, unsigned long &&) Function.h:185 std::ndk1::function::func::operator()(facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value &&, unsigned long &&) Function.h:356 [Inlined] std::ndk1::function::__value_func::operator()[abi:v170000](facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value &&, unsigned long &&) const Function.h:510 [Inlined] std::ndk1::function::operator()(facebook::jsi::Runtime &, const facebook::jsi::Value &, const facebook::jsi::Value , unsigned long) const Function.h:1156 facebook::hermes::HermesRuntimeImpl::HFContext::func(void , hermes::vm::Runtime &, hermes::vm::NativeArgs) 0x0000782f878fd6ed hermes::vm::NativeFunction::_nativeCall(hermes::vm::NativeFunction , hermes::vm::Runtime &) 0x0000782f8795ca4d [Inlined] hermes::vm::Interpreter::handleCallSlowPath(hermes::vm::Runtime &, hermes::vm::PinnedHermesValue ) 0x0000782f8797cdbe hermes::vm::Interpreter::interpretFunction<…>(hermes::vm::Runtime &, hermes::vm::InterpreterState &) 0x0000782f8797cd8b hermes::vm::Runtime::interpretFunctionImpl(hermes::vm::CodeBlock ) 0x0000782f8797c016 [Inlined] hermes::vm::JSFunction::_callImpl(hermes::vm::Handle<…>, hermes::vm::Runtime &) 0x0000782f8795d8ce hermes::vm::GeneratorInnerFunction::callInnerFunction(hermes::vm::Handle<…>, hermes::vm::Runtime &, hermes::vm::Handle<…>, hermes::vm::GeneratorInnerFunction::Action) 0x0000782f8795d8c2 [Inlined] hermes::vm::generatorResume(hermes::vm::Runtime &, hermes::vm::Handle<…>, hermes::vm::Handle<…>) 0x0000782f87a08786 hermes::vm::generatorPrototypeNext(void , hermes::vm::Runtime &, hermes::vm::NativeArgs) 0x0000782f87a08776 hermes::vm::NativeFunction::_nativeCall(hermes::vm::NativeFunction , hermes::vm::Runtime &) 0x0000782f8795ca4d [Inlined] hermes::vm::Interpreter::handleCallSlowPath(hermes::vm::Runtime &, hermes::vm::PinnedHermesValue ) 0x0000782f8797cdbe hermes::vm::Interpreter::interpretFunction<…>(hermes::vm::Runtime &, hermes::vm::InterpreterState &) 0x0000782f8797cd8b hermes::vm::Runtime::interpretFunctionImpl(hermes::vm::CodeBlock ) 0x0000782f8797c016 hermes::vm::JSFunction::_callImpl(hermes::vm::Handle<…>, hermes::vm::Runtime &) 0x0000782f8795cd41 [Inlined] hermes::vm::Callable::call(hermes::vm::Handle<…>, hermes::vm::Runtime &) 0x0000782f8795b403 hermes::vm::Callable::executeCall(hermes::vm::Handle<…>, hermes::vm::Runtime &, hermes::vm::Handle<…>, hermes::vm::Handle<…>, hermes::vm::Handle<…>) 0x0000782f8795b3e0 hermes::vm::functionPrototypeApply(void , hermes::vm::Runtime &, hermes::vm::NativeArgs) 0x0000782f87a38f56 hermes::vm::NativeFunction::_nativeCall(hermes::vm::NativeFunction , hermes::vm::Runtime &) 0x0000782f8795ca4d [Inlined] hermes::vm::Interpreter::handleCallSlowPath(hermes::vm::Runtime &, hermes::vm::PinnedHermesValue ) 0x0000782f8797cdbe hermes::vm::Interpreter::interpretFunction<…>(hermes::vm::Runtime &, hermes::vm::InterpreterState &) 0x0000782f8797cd8b hermes::vm::Runtime::interpretFunctionImpl(hermes::vm::CodeBlock ) 0x0000782f8797c016 [Inlined] hermes::vm::JSFunction::_callImpl(hermes::vm::Handle<…>, hermes::vm::Runtime &) 0x0000782f8795d8ce hermes::vm::GeneratorInnerFunction::callInnerFunction(hermes::vm::Handle<…>, hermes::vm::Runtime &, hermes::vm::Handle<…>, hermes::vm::GeneratorInnerFunction::Action) 0x0000782f8795d8c2 [Inlined] hermes::vm::generatorResume(hermes::vm::Runtime &, hermes::vm::Handle<…>, hermes::vm::Handle<…>) 0x0000782f87a08786 hermes::vm::generatorPrototypeNext(void , hermes::vm::Runtime &, hermes::vm::NativeArgs) 0x0000782f87a08776 hermes::vm::NativeFunction::_nativeCall(hermes::vm::NativeFunction , hermes::vm::Runtime &) 0x0000782f8795ca4d [Inlined] hermes::vm::Interpreter::handleCallSlowPath(hermes::vm::Runtime &, hermes::vm::PinnedHermesValue ) 0x0000782f8797cdbe hermes::vm::Interpreter::interpretFunction<…>(hermes::vm::Runtime &, hermes::vm::InterpreterState &) 0x0000782f8797cd8b hermes::vm::Runtime::interpretFunctionImpl(hermes::vm::CodeBlock ) 0x0000782f8797c016 hermes::vm::JSFunction::_callImpl(hermes::vm::Handle<…>, hermes::vm::Runtime &) 0x0000782f8795cd41 [Inlined] hermes::vm::Callable::call(hermes::vm::Handle<…>, hermes::vm::Runtime &) 0x0000782f8795b403 hermes::vm::Callable::executeCall(hermes::vm::Handle<…>, hermes::vm::Runtime &, hermes::vm::Handle<…>, hermes::vm::Handle<…>, hermes::vm::Handle<…>) 0x0000782f8795b3e0 hermes::vm::functionPrototypeApply(void , hermes::vm::Runtime &, hermes::vm::NativeArgs) 0x0000782f87a38f56 hermes::vm::NativeFunction::_nativeCall(hermes::vm::NativeFunction , hermes::vm::Runtime &) 0x0000782f8795ca4d [Inlined] hermes::vm::Interpreter::handleCallSlowPath(hermes::vm::Runtime &, hermes::vm::PinnedHermesValue ) 0x0000782f8797cdbe hermes::vm::Interpreter::interpretFunction<…>(hermes::vm::Runtime &, hermes::vm::InterpreterState &) 0x0000782f8797cd8b hermes::vm::Runtime::interpretFunctionImpl(hermes::vm::CodeBlock ) 0x0000782f8797c016 hermes::vm::JSFunction::_callImpl(hermes::vm::Handle<…>, hermes::vm::Runtime &) 0x0000782f8795cd41 [Inlined] hermes::vm::Callable::call(hermes::vm::Handle<…>, hermes::vm::Runtime &) 0x0000782f8795c521 hermes::vm::BoundFunction::_boundCall(hermes::vm::BoundFunction , const hermes::inst::Inst , hermes::vm::Runtime &) 0x0000782f8795c4ff [Inlined] hermes::vm::Interpreter::handleCallSlowPath(hermes::vm::Runtime &, hermes::vm::PinnedHermesValue ) 0x0000782f8797cddb hermes::vm::Interpreter::interpretFunction<…>(hermes::vm::Runtime &, hermes::vm::InterpreterState &) 0x0000782f8797cd8b hermes::vm::Runtime::interpretFunctionImpl(hermes::vm::CodeBlock ) 0x0000782f8797c016 hermes::vm::JSFunction::_callImpl(hermes::vm::Handle<…>, hermes::vm::Runtime &) 0x0000782f8795cd41 [Inlined] hermes::vm::Callable::call(hermes::vm::Handle<…>, hermes::vm::Runtime &) 0x0000782f8795c521 hermes::vm::BoundFunction::_boundCall(hermes::vm::BoundFunction , const hermes::inst::Inst , hermes::vm::Runtime &) 0x0000782f8795c4ff [Inlined] hermes::vm::Callable::call(hermes::vm::Handle<…>, hermes::vm::Runtime &) 0x0000782f878f58f0 facebook::hermes::HermesRuntimeImpl::call(const facebook::jsi::Function &, const facebook::jsi::Value &, const facebook::jsi::Value , unsigned long) 0x0000782f878f58ca facebook::jsi::RuntimeDecorator::call(const facebook::jsi::Function &, const facebook::jsi::Value &, const facebook::jsi::Value , unsigned long) decorator.h:344 facebook::jsi::WithRuntimeDecorator::call(const facebook::jsi::Function &, const facebook::jsi::Value &, const facebook::jsi::Value , unsigned long) decorator.h:757 [Inlined] facebook::jsi::Function::call(facebook::jsi::Runtime &, const facebook::jsi::Value , unsigned long) const jsi-inl.h:264 [Inlined] facebook::jsi::Function::call(facebook::jsi::Runtime &, std::initializer_list<…>) const jsi-inl.h:269 [Inlined] facebook::jsi::Function::call<…>(facebook::jsi::Runtime &, const double &, facebook::jsi::Value &&) const jsi-inl.h:277 facebook::react::JSIExecutor::invokeCallback(double, const folly::dynamic &) JSIExecutor.cpp:258 $_0::operator()(facebook::react::JSExecutor ) const NativeToJsBridge.cpp:236 std::ndk1::invoke[abi:v170000]<…>($_0 &, facebook::react::JSExecutor *&&) Invoke.h:394 std::ndk1::invoke_void_return_wrapper::__call<…>($_0 &, facebook::react::JSExecutor *&&) Invoke.h:487 std::ndk1::function::alloc_func::operator()[abi:v170000](facebook::react::JSExecutor &&) Function.h:185 std::ndk1::function::__func::operator()(facebook::react::JSExecutor &&) Function.h:356 std::ndk1::function::value_func::operator()[abi:v170000](facebook::react::JSExecutor &&) const Function.h:510 std::__ndk1::function::operator()(facebook::react::JSExecutor ) const Function.h:1156 $_0::operator()() const NativeToJsBridge.cpp:308 std::ndk1::invoke[abi:v170000]<…>($_0 &) Invoke.h:394 std::ndk1::invoke_void_return_wrapper::call<…>($_0 &) Invoke.h:487 std::ndk1::function::alloc_func::operator()[abi:v170000]() Function.h:185 std::ndk1::function::func::operator()() Function.h:356 std::ndk1::function::value_func::operator()[abi:v170000]() const Function.h:510 std::ndk1::function::operator()() const Function.h:1156 $_0::operator()() JMessageQueueThread.cpp:37 std::ndk1::invoke[abi:v170000]<…>($_0 &) Invoke.h:394 std::ndk1::invoke_void_return_wrapper::call<…>($_0 &) Invoke.h:487 std::ndk1::function::__alloc_func::operator()[abi:v170000]() Function.h:185 std::ndk1::function::func::operator()() Function.h:356 [Inlined] std::ndk1::function::value_func::operator()[abi:v170000]() const Function.h:510 [Inlined] std::ndk1::function::operator()() const Function.h:1156 [Inlined] facebook::jni::JNativeRunnable::run() NativeRunnable.h:44 facebook::jni::detail::MethodWrapper<void (facebook::jni::JNativeRunnable::)(), &facebook::jni::JNativeRunnable::run(), facebook::jni::JNativeRunnable, void>::dispatch(facebook::jni::alias_ref<facebook::jni::detail::JTypeFor<facebook::jni::HybridClass<facebook::jni::JNativeRunnable, facebook::jni::JRunnable>::JavaPart, facebook::jni::JRunnable, void>::_javaobject>) Registration-inl.h:129 [Inlined] facebook::jni::detail::CallWithJniConversions::call(facebook::jni::detail::JTypeFor<…>::_javaobject , void ()(facebook::jni::alias_ref<…>)) Registration-inl.h:66 facebook::jni::detail::FunctionWrapper::call(_JNIEnv , _jobject , void ()(facebook::jni::alias_ref<…>)) Registration-inl.h:95 art_quick_generic_jni_trampoline 0x0000782ffa591a4c art_quick_invoke_stub 0x0000782ffa5784c5 art::ArtMethod::Invoke(art::Thread , unsigned int , unsigned int, art::JValue , const char ) 0x0000782ffa5c535d art::interpreter::DoCall<…>(art::ArtMethod , art::Thread , art::ShadowFrame &, const art::Instruction , unsigned short, bool, art::JValue ) 0x0000782ffa76ddd1 art::interpreter::ExecuteSwitchImplCpp<…>(art::interpreter::SwitchImplContext ) 0x0000782ffa59ae33 ExecuteSwitchImplAsm 0x0000782ffa5937a6 art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.uniq.112435418011751916792819755956732575238) 0x0000782ffa766018 art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread , const art::CodeItemDataAccessor &, art::ShadowFrame , art::JValue ) 0x0000782ffa76d13f art::interpreter::DoCall<…>(art::ArtMethod , art::Thread , art::ShadowFrame &, const art::Instruction , unsigned short, bool, art::JValue ) 0x0000782ffa76ddb7 art::interpreter::ExecuteSwitchImplCpp<…>(art::interpreter::SwitchImplContext ) 0x0000782ffa59b0a2 ExecuteSwitchImplAsm 0x0000782ffa5937a6 art::interpreter::Execute(art::Thread, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238) 0x0000782ffa766018 art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread , const art::CodeItemDataAccessor &, art::ShadowFrame , art::JValue ) 0x0000782ffa76d13f art::interpreter::DoCall<…>(art::ArtMethod , art::Thread , art::ShadowFrame &, const art::Instruction , unsigned short, bool, art::JValue ) 0x0000782ffa76ddb7 art::interpreter::ExecuteSwitchImplCpp<…>(art::interpreter::SwitchImplContext ) 0x0000782ffa59ae33 ExecuteSwitchImplAsm 0x0000782ffa5937a6 art::interpreter::Execute(art::Thread, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.uniq.112435418011751916792819755956732575238) 0x0000782ffa766018 art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread , const art::CodeItemDataAccessor &, art::ShadowFrame , art::JValue ) 0x0000782ffa76d13f art::interpreter::DoCall<…>(art::ArtMethod , art::Thread , art::ShadowFrame &, const art::Instruction , unsigned short, bool, art::JValue ) 0x0000782ffa76ddb7 art::interpreter::ExecuteSwitchImplCpp<…>(art::interpreter::SwitchImplContext ) 0x0000782ffa59ae33 ExecuteSwitchImplAsm 0x0000782ffa5937a6 art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.uniq.112435418011751916792819755956732575238) 0x0000782ffa766018 art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread , const art::CodeItemDataAccessor &, art::ShadowFrame , art::JValue ) 0x0000782ffa76d13f art::interpreter::DoCall<…>(art::ArtMethod , art::Thread , art::ShadowFrame &, const art::Instruction , unsigned short, bool, art::JValue ) 0x0000782ffa76ddb7 art::interpreter::ExecuteSwitchImplCpp<…>(art::interpreter::SwitchImplContext ) 0x0000782ffa59b0a2 ExecuteSwitchImplAsm 0x0000782ffa5937a6 art::interpreter::Execute(art::Thread, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.__uniq.112435418011751916792819755956732575238) 0x0000782ffa766018 art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread , const art::CodeItemDataAccessor &, art::ShadowFrame , art::JValue ) 0x0000782ffa76d13f art::interpreter::DoCall<…>(art::ArtMethod , art::Thread , art::ShadowFrame &, const art::Instruction , unsigned short, bool, art::JValue ) 0x0000782ffa76ddb7 art::interpreter::ExecuteSwitchImplCpp<…>(art::interpreter::SwitchImplContext ) 0x0000782ffa59b0a2 ExecuteSwitchImplAsm 0x0000782ffa5937a6 art::interpreter::Execute(art::Thread, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.uniq.112435418011751916792819755956732575238) 0x0000782ffa766018 art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread , const art::CodeItemDataAccessor &, art::ShadowFrame , art::JValue ) 0x0000782ffa76d13f art::interpreter::DoCall<…>(art::ArtMethod , art::Thread , art::ShadowFrame &, const art::Instruction , unsigned short, bool, art::JValue ) 0x0000782ffa76ddb7 art::interpreter::ExecuteSwitchImplCpp<…>(art::interpreter::SwitchImplContext ) 0x0000782ffa59ae33 ExecuteSwitchImplAsm 0x0000782ffa5937a6 art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool) (.uniq.112435418011751916792819755956732575238) 0x0000782ffa766018 artQuickToInterpreterBridge 0x0000782ffab1f057 art_quick_to_interpreter_bridge 0x0000782ffa591bdd art_quick_invoke_stub 0x0000782ffa5784c5 art::ArtMethod::Invoke(art::Thread , unsigned int , unsigned int, art::JValue , const char ) 0x0000782ffa5c535d art::Thread::CreateCallback(void *) 0x0000782ffaa53177 pthread_start(void *) 0x00007832a156106b __start_thread 0x00007832a14f6d89

To reproduce

Build aar with tools\android_custom_build\build_custom_android_package.py

Copy content of release to localMaven directory and add it to onnxruntime-react-native gradle.

React native version: 0.74.1

Urgency

I need to finalize a react-native app with both coreml and qnn acceleration by the end of the month

Platform

Android

OS Version

34

ONNX Runtime Installation

Built from Source

Compiler Version (if 'Built from Source')

Docker image uses ndk 26.xxxxx

Package Name (if 'Released Package')

onnxruntime-react-native

ONNX Runtime Version or Commit ID

043ef5c95fad9a19a5563103cd7929633468ab4f

ONNX Runtime API

JavaScript

Architecture

ARM64

Execution Provider

Default CPU, CoreML, NNAPI, Other / Unknown

Execution Provider Library Version

No response

Windsander commented 2 weeks ago

I'v got almost seem issue, but solved today, here is my approach: https://github.com/microsoft/onnxruntime/issues/21097 wish to be helpful.