-
Notifications
You must be signed in to change notification settings - Fork 163
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
android系统骁龙设备上能跑,但是安装在天玑设备上就报错。 #330
Comments
是同一个 apk 吗? 你的 assets 目录有放模型文件么。 |
对,模型肯定有啊。是同一个apk,我在骁龙的手机运行是好的,语音识别都是好的,但是如果通过android studio 把另一部天玑(vivo s12)手机插上去,程序install成功,但是调试时 oncreate中initmodel部分到了我说的 newFromAsset(assetManager, config) 就崩溃了。 |
是最新的代码吗,即是master的代码么 |
一个星期前下的。git clone https://github.com/k2-fsa/sherpa-ncnn.git ,不过我为了节省时间,so库是从sherpa-ncnn-2.1.10-cpu-arm64-v8a-bilingual-en-zh.apk中拷贝出来的。刚用最新的代码编译出了so,也是不行的。还是一样的情况。 |
我们也遇到相同的问题,同一个 APK,在其它手机上都正常,唯独在 Google Pixel 6a(Android 14) 上,init 就会 crash。 |
可以抓到 logcat 的 log 吗? |
Crash Log
|
我把上面关键的 log 贴一下
@nihui 可以帮忙看下吗? @KennyHuangChina 你用的是最新的代码么? |
大概是几个月前的,最近有更新吗?有 fix 相关的问题?我去看看 commit history |
请用最新的 master 测试 |
再贴一下上面的 log
用的文件是 |
请试试 (需要自己编译 apk) |
|
经过测试通过上面的方法可行。多谢 @csukuangfj @KennyHuangChina |
请问大佬,我也是这个问题,但是我在build.gradle中加上如下配置,却依然闪退是怎么回事啊 android {
...
aaptOptions {
noCompress 'assets'
}
} |
你用我们提供的apk,有问题否。如果有,请告诉我们你是如何下载我们提供的apk |
我用这个apk,没有问题,我把对应的 source code 下下来,在里面没有看到禁止压缩 assets 的选项,请问您是怎么编译的呢 |
我将配置做了修改,编译后可以成功运行,非常感谢 @csukuangfj android {
...
aaptOptions {
noCompress ''
}
} |
@zqyp |
问题出在这行上。 是不是编译出的东东无法在这种天玑 展锐的机器上跑? 需要怎么编译?
init {
if (assetManager != null) {
ptr = newFromAsset(assetManager, config)
} else {
ptr = newFromFile(config)
}
}
错误异常:
Fatal signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x7c39e34000 in tid 23665 (fsa.sherpa.ncnn), pid 23665 (fsa.sherpa.ncnn)
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A Softversion: PD2055B_A_8.13.2
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A Time: 2024-03-24 12:58:44
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A Build fingerprint: 'vivo/PD2055/PD2055:13/TP1A.220624.014/compiler11091453:user/release-keys'
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A Revision: '0'
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A ABI: 'arm64'
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A Timestamp: 2024-03-24 12:58:44.046797201+0800
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A Process uptime: 31s
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A Cmdline: com.k2fsa.sherpa.ncnn
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A pid: 23665, tid: 23665, name: fsa.sherpa.ncnn >>> com.k2fsa.sherpa.ncnn <<<
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A uid: 10267
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x0000007c39e34000
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A x0 b400007c39e0c7a0 x1 b400007c39e33fe0 x2 6170726568530a36 x3 0000000000000000
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A x4 0000000000000000 x5 0000000000000000 x6 607360436073644c x7 7f7f7f7f7f7f7f7f
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A x8 0**************1 x9 0000000000000004 x10 0000007fee1f5cc0 x11 ffffff80ffffffd0
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A x12 0000007fee1f5b50 x13 0000000000000001 x14 0000000000000000 x15 0000007eed9d1812
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A x16 0000007eeda75d88 x17 0000007eed9f7b40 x18 0000007f102ca000 x19 ffffffffffffffff
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A x20 b400007c697e5fd0 x21 0000007f0f274000 x22 b400007c697e5fd0 x23 0000007f0f274000
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A x24 0000007fee1f6510 x25 0000007f0f274000 x26 0000007f0f274000 x27 0000000000000003
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A x28 0000007fee1f65c0 x29 0000007fee1f5ab0
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A lr 0000007eeda2aad0 sp 0000007fee1f5ab0 pc 0000007eed9f7be0 pst 0000000060001000
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A backtrace:
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A #00 pc 000000000004bbe0 /apex/com.android.runtime/lib64/bionic/libc.so (__strlen_aarch64+160) (BuildId: cbc4256ea6b3c4acdd12a421256d7f6e)
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A #1 pc 000000000007eacc /apex/com.android.runtime/lib64/bionic/libc.so (__strlen_chk+20) (BuildId: cbc4256ea6b3c4acdd12a421256d7f6e)
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A #2 pc 00000000000a2808 /apex/com.android.runtime/lib64/bionic/libc.so (vsscanf+136) (BuildId: cbc4256ea6b3c4acdd12a421256d7f6e)
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A #3 pc 00000000000b5360 /apex/com.android.runtime/lib64/bionic/libc.so (sscanf+120) (BuildId: cbc4256ea6b3c4acdd12a421256d7f6e)
2024-03-24 12:58:44.151 24000-24000 DEBUG pid-24000 A #4 pc 0000000000109f5c /data/app/~~GuP-h8_2vKAStTSEZ5fQVA==/com.k2fsa.sherpa.ncnn-9L6u2E6wtPgcBUYfi-IEDA==/lib/arm64/libncnn.so (ncnn::DataReaderFromAndroidAsset::scan(char const*, void*) const+164) (BuildId: 120e011fb24b042fee4d4c9d5a8106e743625072)
2024-03-24 12:58:44.152 24000-24000 DEBUG pid-24000 A #5 pc 00000000001148ec /data/app/~~GuP-h8_2vKAStTSEZ5fQVA==/com.k2fsa.sherpa.ncnn-9L6u2E6wtPgcBUYfi-IEDA==/lib/arm64/libncnn.so (ncnn::Net::load_param(ncnn::DataReader const&)+84) (BuildId: 120e011fb24b042fee4d4c9d5a8106e743625072)
2024-03-24 12:58:44.152 24000-24000 DEBUG pid-24000 A #6 pc 0000000000117ed0 /data/app/~~GuP-h8_2vKAStTSEZ5fQVA==/com.k2fsa.sherpa.ncnn-9L6u2E6wtPgcBUYfi-IEDA==/lib/arm64/libncnn.so (ncnn::Net::load_param(AAssetManager*, char const*)+84) (BuildId: 120e011fb24b042fee4d4c9d5a8106e743625072)
2024-03-24 12:58:44.152 24000-24000 DEBUG pid-24000 A #7 pc 000000000003a62c /data/app/~~GuP-h8_2vKAStTSEZ5fQVA==/com.k2fsa.sherpa.ncnn-9L6u2E6wtPgcBUYfi-IEDA==/lib/arm64/libsherpa-ncnn-core.so (sherpa_ncnn::Model::Create(AAssetManager*, sherpa_ncnn::ModelConfig const&)+120) (BuildId: a0f98d011401c3dc0de238d2af864d2ab137b045)
2024-03-24 12:58:44.152 24000-24000 DEBUG pid-24000 A #8 pc 0000000000042630 /data/app/~~GuP-h8_2vKAStTSEZ5fQVA==/com.k2fsa.sherpa.ncnn-9L6u2E6wtPgcBUYfi-IEDA==/lib/arm64/libsherpa-ncnn-core.so (sherpa_ncnn::Recognizer::Impl::Impl(AAssetManager*, sherpa_ncnn::RecognizerConfig const&)+272) (BuildId: a0f98d011401c3dc0de238d2af864d2ab137b045)
2024-03-24 12:58:44.152 24000-24000 DEBUG pid-24000 A #9 pc 000000000003dd14 /data/app/~~GuP-h8_2vKAStTSEZ5fQVA==/com.k2fsa.sherpa.ncnn-9L6u2E6wtPgcBUYfi-IEDA==/lib/arm64/libsherpa-ncnn-core.so (sherpa_ncnn::Recognizer::Recognizer(AAssetManager*, sherpa_ncnn::RecognizerConfig const&)+48) (BuildId: a0f98d011401c3dc0de238d2af864d2ab137b045)
2024-03-24 12:58:44.152 24000-24000 DEBUG pid-24000 A #10 pc 0000000000002c20 /data/app/~~GuP-h8_2vKAStTSEZ5fQVA==/com.k2fsa.sherpa.ncnn-9L6u2E6wtPgcBUYfi-IEDA==/lib/arm64/libsherpa-ncnn-jni.so (Java_com_k2fsa_sherpa_ncnn_SherpaNcnn_newFromAsset+172) (BuildId: cf4bc21817aed6d528bcd0cbc4eaa3bdc998cea4)
2024-03-24 12:58:44.152 24000-24000 DEBUG pid-24000 A #11 pc 000000000021a354 /apex/com.android.art/lib64/libart.so (art_quick_generic_jni_trampoline+148) (BuildId: cacff818afb569b5000b4cdc1347b805)
1970-01-01 08:00:00.000 0-0 I ---------------------------- PROCESS ENDED (23665) for package com.k2fsa.sherpa.ncnn ----------------------------
The text was updated successfully, but these errors were encountered: