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

android demo在荣耀50/60全系机型上出现native报错 #5721

Closed
zzfighting opened this issue Mar 16, 2022 · 7 comments
Closed

android demo在荣耀50/60全系机型上出现native报错 #5721

zzfighting opened this issue Mar 16, 2022 · 7 comments

Comments

@zzfighting
Copy link

  • 系统环境/System Environment:荣耀50/60系列+Android 11
  • 版本号/Version:PaddleLite:2.9.1 PaddleOCR:2.4 问题相关组件/Related components:PaddleOCR执行paddlePredictor.runImage在native中报错
  • 问题复现:在paddleocr初始化predictor和模型的init方法里使用一个内置的小图在模型load完成后进行初次推理预热,后续再通过predictor.runModel的方式正常执行推理,此时必现native报错。去掉init中的小图预热后,报错消失;init方法中小图预热完成重新释放加载模型后,报错消失。使用的手机是荣耀50/60,安卓11,比较奇怪的是同一套代码在其他机型同样处理器的安卓11平台上都可以成功执行
  • 完整报错/Complete Error Message:
    Build fingerprint: 'HONOR/NTH-AN00/HNNTH:11/HONORNTH-AN00/4.2.0.193C00:user/release-keys'
    ABI: 'arm64'
    Predictor Worke >>> com.baidu.paddle.lite.demo.ocr <<<
    signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x6e452fe000
    x0 0000006e45275680 x1 0000000000000000 x2 0000000000067600 x3 0000006e452fe000
    x4 0000006e45365680 x5 0000000000000004 x6 0000000000000060 x7 0000000000000100
    x8 0000006e64d161e8 x9 0000000000000001 x10 0000006e45275680 x11 000000000000001e
    x12 0000000000000100 x13 00000000000f0000 x14 000000000003c000 x15 0000006ee8635af0
    x16 0000006e5ad7a850 x17 00000071c88de0c0 x18 0000000000000014 x19 0000000000000001
    x20 0000006e43a15080 x21 0000000000000102 x22 0000000000000102 x23 0000000000000100
    x24 0000000000000100 x25 0000000000000100 x26 0000000000000018 x27 0000000000000018
    x28 0000000000000060 x29 0000006e64d13380
    lr 0000006e5ab99ffc sp 0000006e64d12f50 pc 00000071c88de1c0 pst 0000000020001000
    backtrace:
    #00 pc 000000000004b1c0 /apex/com.android.runtime/lib64/bionic/libc.so (memset+256) (BuildId: 8a99910f553b2716882e4f24a6670330)
    Upload PaddleOCR code  #1 pc 0000000000119ff8 /data/app/~~dvsaA4ZiQz3L5TpebQmuQQ==/com.baidu.paddle.lite.demo.ocr-8JfD6wPVozyKVKe-_53SGA==/base.apk!libpaddle_light_api_shared.so (offset 0xb59000)
@WenmuZhou
Copy link
Collaborator

麻烦试一下最新代码看看,可以看一下是不是所有的模型都这样

@zzfighting
Copy link
Author

麻烦试一下最新代码看看,可以看一下是不是所有的模型都这样

感谢回复,使用的是最新release/2.4的分支,换了其他模型均出现此现象

@WenmuZhou
Copy link
Collaborator

你好,我说的是dygraph分支的代码哈,这个分支的代码支持单独测试det,rec和cls模型

@paddle-bot-old
Copy link

Since you haven't replied for more than 3 months, we have closed this issue/pr.
If the problem is not solved or there is a follow-up one, please reopen it at any time and we will continue to follow up.
It is recommended to pull and try the latest code first.
由于您超过三个月未回复,我们将关闭这个issue/pr。
若问题未解决或有后续问题,请随时重新打开(建议先拉取最新代码进行尝试),我们会继续跟进。

an1018 pushed a commit to an1018/PaddleOCR that referenced this issue Aug 17, 2022
@TheNovemberRain
Copy link

遇到了同样的问题,在这里记录一下解决方案:
将预热用的小图分辨率调大即可。由于原因未知,因此不知道要要调到多大才正常,可反复尝试。
android demo中的det_0.jpg(图片文字为“约定最终相遇”)是可以正常推理的。

另外,只要先推理过一张大图,再推理预热小图就不会报错。

@achintski
Copy link

遇到了同样的问题,在这里记录一下解决方案: 将预热用的小图分辨率调大即可。由于原因未知,因此不知道要要调到多大才正常,可反复尝试。 android demo中的det_0.jpg(图片文字为“约定最终相遇”)是可以正常推理的。

另外,只要先推理过一张大图,再推理预热小图就不会报错。

调大一次后,开发者模式下可以运行,结果打包后就又有闪退问题了,随后再次尝试开发者模式下运行,结果也是闪退,太离谱了

@yukiyang2
Copy link

换成Google MLKit即可解决问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants