amggg / YXing

481 stars 38 forks source link

大佬,帮忙看下闪退问题,多发生于低端机型上,分辨率为720*1600/720*xxxx #21

Open Belief-Yp opened 2 years ago

Belief-Yp commented 2 years ago

![Uploading WechatIMG47.jpeg…]()

Belief-Yp commented 2 years ago

2022-05-06 10:39:35.445 8527-8774/com.ljkj.blockpay E/AndroidRuntime: FATAL EXCEPTION: pool-7-thread-1 Process: com.ljkj.blockpay, PID: 8527 java.lang.RuntimeException: Limit Size Must be within the picture width and height at com.yxing.ScanCodeAnalyzer.analyze(ScanCodeAnalyzer.kt:58) at androidx.camera.core.ImageAnalysis.lambda$setAnalyzer$1$ImageAnalysis(ImageAnalysis.java:370) at androidx.camera.core.-$$Lambda$ImageAnalysis$qO2F3Tn7pfTvGyL-EvT8WWE0F0w.analyze(Unknown Source:4) at androidx.camera.core.ImageAnalysisAbstractAnalyzer.lambda$analyzeImage$0$ImageAnalysisAbstractAnalyzer(ImageAnalysisAbstractAnalyzer.java:121) at androidx.camera.core.-$$Lambda$ImageAnalysisAbstractAnalyzer$g-dcm6aZmGod2IWKPwN4CArIZzI.run(Unknown Source:8) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) 2022-05-06 10:39:35.471 923-3507/? E/CamX: [ERROR][PPROC ] camxopenode.cpp:8273 UpdateStripingInput() for debug UsecaseVideo_PVLT1080p_PGTV_OPE0, Striping Input for Full In Port: W x H 1280 x 720, Format = 3 2022-05-06 10:39:35.474 923-3507/? E/CamX: [ERROR][PPROC ] camxopenode.cpp:4611 ExecuteProcessRequest() UsecaseVideo_PVLT1080p_PGTV_OPE0 Submitted packets with requestId = 5 2022-05-06 10:39:35.491 1241-8758/? E/libc: Access denied finding property "vendor.debug.preview.lockFpsRange" 2022-05-06 10:39:35.510 1241-8758/? E/libc: Access denied finding property "vendor.debug.preview.lockFpsRange" 2022-05-06 10:39:35.514 923-3510/? E/CamX: [ERROR][PPROC ] camxopenode.cpp:8273 UpdateStripingInput() for debug UsecaseVideo_PVLT1080p_PGTV_OPE0, Striping Input for Full In Port: W x H 1280 x 720, Format = 3 2022-05-06 10:39:35.520 923-3510/? E/CamX: [ERROR][PPROC ] camxopenode.cpp:4611 ExecuteProcessRequest() UsecaseVideo_PVLT1080p_PGTV_OPE0 Submitted packets with requestId = 6 2022-05-06 10:39:35.551 1241-8758/? E/libc: Access denied finding property "vendor.debug.preview.lockFpsRange"

amggg commented 2 years ago

设置限制扫码区域时,注意宽高不要大于屏幕宽高, 低端机分辨率都很低,横向700个像素点, 设置800的扫码区域, 就超了。 图片 图片

amggg commented 2 years ago

建议使用将大小单位转为dp, 或者根据屏幕比例设置识别区域大小。