Summary
After a long live-scanning session (especially device lock / screen-off for ~25–50+ minutes), UltALPR (org.buyun.alpr.sdk.AlprSdk) enters a sticky failure state:
AlprSdk.process(...) → isOK() == false
code() == 20004
phrase() ≈ Internal processing failed
Camera frames still flow. Preview can still work.
AlprSdk.deInit() + AlprSdk.init(...) reports success, but every following process() immediately returns 20004 again.
Soft re-init, hard re-init, and Activity recreate() do not fix it.
Only killing the process that hosts the native SDK restores recognition.
This is not “no plate in view” (isOK()==true, numPlates==0).
Environment
| Item |
Value |
| Platform |
Android (minSdk 28) |
| SDK |
org.buyun.alpr.sdk (AlprSdk / UltALPR) |
| Package |
libttvalpr.aar |
| Pipeline |
Camera YUV → AlprSdk.yuv2Bitmap → process(RGBA32) |
| Frame size |
1280×720 |
| Use case |
Long-running patrol LPR with frequent lock/unlock |
Device (please fill):
- Model:
- Android version:
- Chipset/GPU:
- Date of logs:
Steps to reproduce
- Open live scanner; confirm plates are recognized.
- Lock device / leave idle for ~25–50+ minutes.
- Unlock and return to scanner.
- Point at clear license plates.
Controls (usually OK): continuous scan; short Plate Detail trip (few minutes).
Expected
After unlock: init OK, process OK, plates detected when in view. Empty scene → OK + numPlates==0.
Actual
- Frames keep arriving.
init succeeds.
- Every
process() returns 20004 / Internal processing failed.
- Soft/hard re-init and Activity recreate still sticky 20004.
- Process kill (or force-stop app) restores scanning.
API usage
AlprSdk.setActivation(...)
AlprSdk.init(assets, jsonConfig, null)
// per frame (single-threaded; one process at a time)
bitmap = AlprSdk.yuv2Bitmap(yuv, w, h, exifOrientation)
copy RGBA → direct ByteBuffer
result = AlprSdk.process(
SDK_IMAGE_TYPE.ULTALPR_SDK_IMAGE_TYPE_RGBA32,
nativeBuffer, width, height
)
// on SCREEN_OFF / lock
AlprSdk.deInit()
// on unlock / resume
AlprSdk.init(...)
Summary
After a long live-scanning session (especially device lock / screen-off for ~25–50+ minutes), UltALPR (
org.buyun.alpr.sdk.AlprSdk) enters a sticky failure state:AlprSdk.process(...)→isOK() == falsecode() == 20004phrase()≈Internal processing failedCamera frames still flow. Preview can still work.
AlprSdk.deInit()+AlprSdk.init(...)reports success, but every followingprocess()immediately returns 20004 again.Soft re-init, hard re-init, and Activity
recreate()do not fix it.Only killing the process that hosts the native SDK restores recognition.
This is not “no plate in view” (
isOK()==true,numPlates==0).Environment
org.buyun.alpr.sdk(AlprSdk/ UltALPR)libttvalpr.aarAlprSdk.yuv2Bitmap→process(RGBA32)Device (please fill):
Steps to reproduce
Controls (usually OK): continuous scan; short Plate Detail trip (few minutes).
Expected
After unlock:
initOK,processOK, plates detected when in view. Empty scene → OK +numPlates==0.Actual
initsucceeds.process()returns20004/ Internal processing failed.API usage