Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Mobile] null pointer dereference #22538

Open
FaithyQi opened this issue Oct 22, 2024 · 9 comments
Open

[Mobile] null pointer dereference #22538

FaithyQi opened this issue Oct 22, 2024 · 9 comments
Labels
api:Java issues related to the Java API platform:mobile issues related to ONNX Runtime mobile; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot

Comments

@FaithyQi
Copy link

Describe the issue

I got a npt when I use this, the stack trace is as follow:

10-22 14:29:33.367 1000 23794 23794 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x658
10-22 14:29:33.367 1000 23794 23794 F DEBUG : Cause: null pointer dereference
10-22 14:29:33.367 1000 23794 23794 F DEBUG : x0 0000000000000000 x1 0000007a66ccfc90 x2 0000000000000000 x3 0000000000000010
10-22 14:29:33.367 1000 23794 23794 F DEBUG : x4 0000000000000000 x5 000000000000006e x6 0000007b46c78c40 x7 0000000000000001
10-22 14:29:33.367 1000 23794 23794 F DEBUG : x8 0000007930a571e0 x9 f64309fd9f80b5c5 x10 0000007930a57698 x11 0000000046db8a80
10-22 14:29:33.367 1000 23794 23794 F DEBUG : x12 0000ffff00000eff x13 00000000ab458101 x14 d3d0d3d3e1c8d3d6 x15 0000007936d88000
10-22 14:29:33.367 1000 23794 23794 F DEBUG : x16 0000007937d4d480 x17 0000007cafaf0c78 x18 0000007928ae2000 x19 0000007930a57698
10-22 14:29:33.367 1000 23794 23794 F DEBUG : x20 0000007930a571e0 x21 0000007930a579d0 x22 0000007a46db8a50 x23 0000000000000000
10-22 14:29:33.367 1000 23794 23794 F DEBUG : x24 0000007b46c78520 x25 0000007930a5a000 x26 0000007930a57260 x27 0000000000000006
10-22 14:29:33.367 1000 23794 23794 F DEBUG : x28 0000000000000000 x29 0000007930a570b0
10-22 14:29:33.367 1000 23794 23794 F DEBUG : lr 0000007937166488 sp 0000007930a57060 pc 0000007937932c10 pst 0000000060001000
10-22 14:29:33.367 1000 23794 23794 F DEBUG : backtrace:
10-22 14:29:33.367 1000 23794 23794 F DEBUG : #00 pc 0000000000ca7c10 /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/base.apk!libonnxruntime.so (BuildId: 736ba7e1d77a64a11c6843cc8b68344cfb24407c)
10-22 14:29:33.367 1000 23794 23794 F DEBUG : #1 pc 00000000004db484 /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/base.apk!libonnxruntime.so (BuildId: 736ba7e1d77a64a11c6843cc8b68344cfb24407c)
10-22 14:29:33.367 1000 23794 23794 F DEBUG : #2 pc 00000000004dda38 /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/base.apk!libonnxruntime.so (BuildId: 736ba7e1d77a64a11c6843cc8b68344cfb24407c)
10-22 14:29:33.367 1000 23794 23794 F DEBUG : #3 pc 00000000004a7d04 /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/base.apk!libonnxruntime.so (BuildId: 736ba7e1d77a64a11c6843cc8b68344cfb24407c)
10-22 14:29:33.367 1000 23794 23794 F DEBUG : #4 pc 000000000000edd8 /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/base.apk (Java_ai_onnxruntime_OrtSession_run+564) (BuildId: 589fe9d6055bbdcb403b41300daa045c35778c77)
10-22 14:29:33.367 1000 23794 23794 F DEBUG : #5 pc 0000000000222244 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.367 1000 23794 23794 F DEBUG : #6 pc 000000000212ce00 /memfd:jit-cache (deleted) (ai.onnxruntime.OrtSession.run+5344)
10-22 14:29:33.367 1000 23794 23794 F DEBUG : #7 pc 0000000000212520 /apex/com.android.art/lib64/libart.so (nterp_helper+4016) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.367 1000 23794 23794 F DEBUG : #8 pc 0000000000446720 /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/oat/arm64/base.vdex (ai.onnxruntime.OrtSession.run+10)
10-22 14:29:33.367 1000 23794 23794 F DEBUG : #9 pc 00000000002124c4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.367 1000 23794 23794 F DEBUG : #10 pc 00000000004466de /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/oat/arm64/base.vdex (ai.onnxruntime.OrtSession.run+4)
10-22 14:29:33.367 1000 23794 23794 F DEBUG : #11 pc 00000000002124c4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.376 1000 23794 23794 F DEBUG : #12 pc 0000000000c52982 /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/oat/arm64/base.vdex (com.iflytek.aistudyclient.lib.audio.vad.silero.VadSilero.predict+18)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #13 pc 00000000002124c4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #14 pc 0000000000c5290e /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/oat/arm64/base.vdex (com.iflytek.aistudyclient.lib.audio.vad.silero.VadSilero.isSpeech+22)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #15 pc 00000000002124c4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #16 pc 0000000000c54916 /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/oat/arm64/base.vdex (com.iflytek.aistudyclient.lib.audioablity.audio.processor.VadSileroCheckManager.process+110)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #17 pc 00000000002132e4 /apex/com.android.art/lib64/libart.so (nterp_helper+7540) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #18 pc 0000000000c4e44c /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/oat/arm64/base.vdex (com.iflytek.aistudyclient.lib.ai.speechbase.AIAbilityVoiceBaseManager.processData+36)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #19 pc 00000000002124c4 /apex/com.android.art/lib64/libart.so (nterp_helper+3924) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #20 pc 0000000000c3caa0 /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/oat/arm64/base.vdex (com.iflytek.aistudyclient.lib.ai.dictation.iat.AIIATManager.onAudioDataReceived+186)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #21 pc 000000000213e520 /memfd:jit-cache (deleted) (com.iflytek.aistudyclient.lib.audioablity.audio.source.PcmRecordAudioSource.onRecordData+816)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #22 pc 000000000217f920 /memfd:jit-cache (deleted) (com.iflytek.aistudyclient.lib.audioablity.audio.recorder.PcmRecorder.readRecordData+1136)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #23 pc 0000000000218964 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #24 pc 0000000000284208 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+188) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #25 pc 00000000003e351c /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+400) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #26 pc 00000000003de390 /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+804) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #27 pc 0000000000755f9c /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1036) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #28 pc 0000000000203914 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #29 pc 0000000000c5617e /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/oat/arm64/base.vdex (com.iflytek.aistudyclient.lib.audioablity.audio.recorder.PcmRecorder.lambda$startReadThread$0+8)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #30 pc 00000000003d61c0 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool)+304) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #31 pc 00000000003dd900 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+204) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #32 pc 00000000003de36c /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+768) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #33 pc 0000000000755f9c /apex/com.android.art/lib64/libart.so (MterpInvokeDirect+1036) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #34 pc 0000000000203914 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #35 pc 0000000000c5616a /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/oat/arm64/base.vdex (com.iflytek.aistudyclient.lib.audioablity.audio.recorder.PcmRecorder.a+0)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #36 pc 00000000003d61c0 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool)+304) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #37 pc 00000000003dd900 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+204) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #38 pc 00000000003de36c /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+768) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #39 pc 000000000074cbb0 /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+1168) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #40 pc 0000000000203814 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #41 pc 0000000000c54e66 /data/app/~~tHEEIdoLD2HaHqt5Wdlt_w==/com.iflytek.cbg.aistudy.picturereading-H6lpXftCaky323rSjggNVA==/oat/arm64/base.vdex (com.iflytek.aistudyclient.lib.audioablity.audio.recorder.a.run+4)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #42 pc 00000000003d61c0 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool)+304) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #43 pc 00000000003dd900 /apex/com.android.art/lib64/libart.so (art::interpreter::ArtInterpreterToInterpreterBridge(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame*, art::JValue*)+204) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #44 pc 00000000003de36c /apex/com.android.art/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+768) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #45 pc 0000000000752edc /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+1568) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #46 pc 0000000000203a14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #47 pc 000000000020d3ae /apex/com.android.art/javalib/core-oj.jar (java.util.concurrent.ThreadPoolExecutor.runWorker+158)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #48 pc 000000000074d2fc /apex/com.android.art/lib64/libart.so (MterpInvokeVirtual+3036) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #49 pc 0000000000203814 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_virtual+20) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #50 pc 000000000020c164 /apex/com.android.art/javalib/core-oj.jar (java.util.concurrent.ThreadPoolExecutor$Worker.run+4)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #51 pc 000000000075350c /apex/com.android.art/lib64/libart.so (MterpInvokeInterface+3152) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #52 pc 0000000000203a14 /apex/com.android.art/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #53 pc 00000000000eda70 /apex/com.android.art/javalib/core-oj.jar (java.lang.Thread.run+8)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #54 pc 00000000003d61c0 /apex/com.android.art/lib64/libart.so (art::interpreter::Execute(art::Thread*, art::CodeItemDataAccessor const&, art::ShadowFrame&, art::JValue, bool, bool)+304) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #55 pc 000000000073b5d0 /apex/com.android.art/lib64/libart.so (artQuickToInterpreterBridge+776) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #56 pc 0000000000222378 /apex/com.android.art/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #57 pc 0000000000218964 /apex/com.android.art/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #58 pc 0000000000284208 /apex/com.android.art/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+188) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #59 pc 000000000061fab0 /apex/com.android.art/lib64/libart.so (art::JValue art::InvokeVirtualOrInterfaceWithJValuesart::ArtMethod*(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, art::ArtMethod*, jvalue const*)+460) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #60 pc 000000000066e674 /apex/com.android.art/lib64/libart.so (art::Thread::CreateCallback(void*)+1184) (BuildId: 4925dbfec35f1037f8ee5dab9b73e87d)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #61 pc 00000000000b1810 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+264) (BuildId: cd7952cb40d1a2deca6420c2da7910be)
10-22 14:29:33.377 1000 23794 23794 F DEBUG : #62 pc 00000000000512f0 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: cd7952cb40d1a2deca6420c2da7910be)
10-22 14:29:33.413 1058 384 384 E tombstoned: Tombstone written to: tombstone_09

To reproduce

test in monkey process

Urgency

No response

Platform

Android

OS Version

9,12

ONNX Runtime Installation

Released Package

Compiler Version (if 'Built from Source')

No response

Package Name (if 'Released Package')

None

ONNX Runtime Version or Commit ID

onnxruntime-android:1.19.0

ONNX Runtime API

Java/Kotlin

Architecture

ARM64

Execution Provider

Default CPU

Execution Provider Library Version

No response

@FaithyQi FaithyQi added the platform:mobile issues related to ONNX Runtime mobile; typically submitted using template label Oct 22, 2024
@github-actions github-actions bot added the api:Java issues related to the Java API label Oct 22, 2024
@Craigacp
Copy link
Contributor

How are you calling ORT, and is there a Java stack trace?

@FaithyQi
Copy link
Author

How are you calling ORT, and is there a Java stack trace?

I have a silent detection program on an Android device that receives PCM data from the Android recorder. I send this data to a local ONNX model for classification, and the issue occurs intermittently. and without the relevant Java stack trace logs, I can provide a Tombstone log as follows.2024-10-21-21-07-54-SYSTEM_TOMBSTONE.txt

@Craigacp
Copy link
Contributor

It looks like it's 4 calls deep into the ORT native library on a session run call, which seems a little surprising. Can you build ORT with debug symbols and replicate the issue? That should give us the functions it's calling inside the native library and then we can work on running it down.

@FaithyQi
Copy link
Author

It looks like it's 4 calls deep into the ORT native library on a session run call, which seems a little surprising. Can you build ORT with debug symbols and replicate the issue? That should give us the functions it's calling inside the native library and then we can work on running it down.

Sorry, I don't have the conditions for cross-compilation locally. I'm working with version 1.19.0. Could you provide an .so file with debug symbols? I can replace it and replicate the issue.

@skottmckay
Copy link
Contributor

Does the model work if you run it with the same input on a desktop machine (e.g. using the python is relatively simple) or in the Android emulator?

@FaithyQi
Copy link
Author

Does the model work if you run it with the same input on a desktop machine (e.g. using the python is relatively simple) or in the Android emulator?

I haven't tried cross-platform testing; I've only run it on different Android devices, and it works fine.
It only occasionally has issues.

@FaithyQi
Copy link
Author

Is there any way to catch this error to prevent the program from crashing, based on this stack trace information?

@skottmckay
Copy link
Contributor

I would expect the call stack to be more than 4 levels deep if it was actually running the model, as none of the C API entry point, InferenceSession::Run, onnxruntime::utils::ExecuteGraph or onnxruntime::utils::ExecuteGraphImpl get inlined, and
ExecuteGraphImpl calls ExecuteThePlan to start the model execution giving 5 levels to the very start of actual execution.

My guess would be one of the args passed to the Run call has become invalid and might be failing in InferenceSession::ValidateInputsOutputs as the call stack for that would be a better match.

You could try this libonnxruntime.so. Built with the 1.19.0 tag, RelWithDebInfo config, and the same NDK used for the release (26.1.10909125).

Copy link
Contributor

This issue has been automatically marked as stale due to inactivity and will be closed in 30 days if no further activity occurs. If further support is needed, please provide an update and/or more details.

@github-actions github-actions bot added the stale issues that have not been addressed in a while; categorized by a bot label Nov 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api:Java issues related to the Java API platform:mobile issues related to ONNX Runtime mobile; typically submitted using template stale issues that have not been addressed in a while; categorized by a bot
Projects
None yet
Development

No branches or pull requests

3 participants