FATAL EXCEPTION: DefaultDispatcher-worker-3
Process: com.equipmentnameplateocr, PID: 31025
kotlin.UninitializedPropertyAccessException: lateinit property predictor has not been initialized
at com.equationl.fastdeployocr.OCR.runSync-IoAF18A(OCR.kt:124)
at com.equationl.fastdeployocr.OCR$run$1.invokeSuspend(OCR.kt:141)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:749)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@dd9605a, Dispatchers.IO]
上一次模型文件复制的问题,我通过手动复制到手机中解决,但是在模型初始化时又出现了新的问题,模型开始识别时,app闪退,报错提示
代码如下:
怀疑是模型初始化出现问题,因为模型初始化时,OcrInitCallback()似乎并没有执行,没有提示成功或失败的信息