SDK initialization fails on Android

284 views
Skip to first unread message

Kunal Rathod

unread,
Jul 11, 2022, 12:02:48 AM7/11/22
to doubango-ai
Hi There,

I'm using the Android Video Parallel sample in my Android application for LPR detection only.  The SDK works perfectly when the App is deployed to phone using debug mode but it crashes on SDK initialization in the signed released version of app installed via aab or apk.

Below are the logs from device when running a release version.  Please advise on how to resolve this issue.

2022-07-08 17:36:08.560 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltAlprSdkEngine] *************** JNI_OnLoad ****************
2022-07-08 17:36:08.565 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltAlprSdkEngine] Call: init
2022-07-08 17:36:08.565 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltAlprSdkEngine] jsonConfig: {"debug_level":"info","debug_write_input_image_enabled":false,"debug_internal_data_path":"\/storage\/emulated\/0\/Android\/data\/au.gov.wa.pta.parkinginspector\/files","num_threads":4,"gpgpu_enabled":true,"charset":"latin","max_latency":-1,"ienv_enabled":false,"openvino_enabled":true,"openvino_device":"CPU","detect_minscore":0.7,"detect_roi":[0,0,0,0],"car_noplate_detect_enabled":false,"car_noplate_detect_min_score":0.8,"pyramidal_search_enabled":true,"pyramidal_search_sensitivity":0.28,"pyramidal_search_minscore":0.7,"pyramidal_search_min_image_size_inpixels":800,"klass_lpci_enabled":false,"klass_vcr_enabled":false,"klass_vmmr_enabled":false,"klass_vbsr_enabled":false,"klass_vcr_gamma":1.5,"recogn_minscore":0.7,"recogn_score_type":"min","recogn_rectify_enabled":false,"license_token_file":"","license_token_data":"ANI6+wWgBUVDUFFVdzBBR1VQRkMuBApERW4nS1FTRksJKTEANzwQeEtZREJRZkdRMVpsCh5JdGNlXwggKyJIQFZLSUlRUAkjIBsTBgQJX0t2QEtFVzlyUEF1KXpeRmJgPg8VHCQ3VUBPQUNMLj0hN0sZ
2022-07-08 17:36:08.566 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltAlprSdkEngine] **** Copyright (C) 2011-2021 Doubango Telecom <https://www.doubango.org> ****
    ultimateALPR-SDK <https://github.com/DoubangoTelecom/ultimateALPR-SDK> version 3.3.2
2022-07-08 17:36:08.566 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltAlprSdkEngine] AAssetManager successfully defined. The engine owe the AAssetManager and must clear it at deInit.
2022-07-08 17:36:08.566 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] Initializing [base] modules (v 1.0.0, nt 4)...
2022-07-08 17:36:08.566 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] sizeof(compv_scalar_t)= #8
2022-07-08 17:36:08.566 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] sizeof(float)= #4
2022-07-08 17:36:08.566 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] [Base] module: android static API version: 21
2022-07-08 17:36:08.566 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: Initializing window registery
2022-07-08 17:36:08.566 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [ImageDecoder] Initializing image decoder...
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: /!\ Code in file '..\compv_cpu.cxx' in function 'init' starting at line #635: _SC_LEVEL1_DCACHE_LINESIZE and _SC_LEVEL1_DCACHE_SIZE not availabe and Android
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVCpu] H: 'Qualcomm Technologies, Inc LAGOON', S: '', M: '', MN: ''
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] CPU features: [arm];[arm64];neon;neon_fma;vfpv3;vfpv4;
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] CPU cores: #8
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] CPU cache1: line size: #64B, size :#4KB
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] CPU Phys RAM size: #5425GB
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] CPU endianness: LITTLE
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] Binary type: AArch64
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] Intrinsic enabled
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] Assembler enabled
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] Code built with debug enabled
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] OS name: Android
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] Math Fast Trig.: true
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] Math Fixed Point: true
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVMathExp] Init
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] Default alignment: #32
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] Best alignment: #32
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVMem] Memory check enabled for debugging, this may slowdown the code
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] Heap limit: #277767KB (#271MB)
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVParallel] Initializing [parallel] module...
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVThreadDispatcher] Not optimized -> Your system have #8 cores but you're only using #4. Sad!!
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVThreadDispatcher] Thread dispatcher created with #4 threads/#8 cores
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVParallel] [Parallel] module initialized
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] [Base] modules initialized
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVCore] Initializing [core] module (v 1.0.0)...
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVFeature] Registering feature factory with id = 1 and name = 'FAST (Features from Accelerated Segment Test)'...
2022-07-08 17:36:08.567 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVFeature] Registering feature factory with id = 8 and name = 'ORB (Oriented FAST and Rotated BRIEF)'...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVFeature] Registering feature factory with id = 27 and name = 'Sobel edge detector'...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVFeature] Registering feature factory with id = 28 and name = 'Scharr edge detector'...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVFeature] Registering feature factory with id = 29 and name = 'Prewitt edge detector'...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVFeature] Registering feature factory with id = 20 and name = 'Canny edge detector'...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVFeature] Registering feature factory with id = 30 and name = 'Hough standard (STD)'...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVFeature] Registering feature factory with id = 31 and name = 'Kernel-based Hough transform (KHT)'...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVFeature] Registering feature factory with id = 41 and name = 'Standard Histogram of oriented gradients (S-HOG)'...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVMatcher] Registering matcher factory with id = 0 and name = 'Brute force matcher'...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVConnectedComponentLabeling] Registering connected component labeling factory with id = 1 and name = 'PLSL (Parallel Light Speed Labeling)'...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVConnectedComponentLabeling] Registering connected component labeling factory with id = 19 and name = 'LMSER (Linear Time Maximally Stable Extremal Regions)'...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVGL] Initializing [gl] module (v 1.0.0)...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVGL] android API version: 21
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVGL] OpenGL-ES implementation enabled
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVGL] OpenGL-ES 2.0 API
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVSharedLib] Loaded shared lib: libGLESv2.so
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVGLVAO] 'libGLESv2.so' file loaded: bindVertexArrayOES=YES, deleteVertexArraysOES=YES, genVertexArraysOES=YES, isVertexArrayOES=YES
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVGL] GL module initialized
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVGpu] Initializing [gpu] module (v 1.0.0)...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVCamera] Initializing [camera] module (v 1.0.0)...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVDrawing] Initializing [drawing] module (v 1.0.0)...
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVDrawing] [Drawing] module: android API version: 21
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: Setting window factory: AndroidEGL
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVDrawing] /!\ No jpeg decoder found
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVDrawing] Drawing module initialized
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVGpu] GPU enabled: true
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: /!\ Code in file '..\source\ultimate_base_engine.cxx' in function 'init' starting at line #72: Not optimized -> Multi-threading disabled
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: /!\ Code in file '..\source\ultimate_base_engine.cxx' in function 'init' starting at line #75: Not optimized for GPU -> GPGPU computing not enabled or deactivated
2022-07-08 17:36:08.568 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltBaseOpenCL] Trying to load [libOpenCL.so]
2022-07-08 17:36:08.568 17620-17762/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=3,set=useless, threadId:0x6c70d71cb0, kThreadSetAffinity:false) - ENTER
2022-07-08 17:36:08.569 17620-17760/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=1,set=useless, threadId:0x6c70f6dcb0, kThreadSetAffinity:false) - ENTER
2022-07-08 17:36:08.569 17620-17759/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=0,set=useless, threadId:0x6c7106bcb0, kThreadSetAffinity:false) - ENTER
2022-07-08 17:36:08.569 17620-17761/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVAsyncTask11] run(coreId:requested=2,set=useless, threadId:0x6c70e6fcb0, kThreadSetAffinity:false) - ENTER
2022-07-08 17:36:08.570 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltBaseOpenCL] Failed to load [libOpenCL.so]
2022-07-08 17:36:08.570 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltBaseOpenCL] Trying to load [libGLES_mali.so]
2022-07-08 17:36:08.570 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltBaseOpenCL] Failed to load [libGLES_mali.so]
2022-07-08 17:36:08.570 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltBaseOpenCL] Trying to load [libmali.so]
2022-07-08 17:36:08.570 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltBaseOpenCL] Failed to load [libmali.so]
2022-07-08 17:36:08.570 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltBaseOpenCL] Trying to load [libPVROCL.so]
2022-07-08 17:36:08.571 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltBaseOpenCL] Failed to load [libPVROCL.so]
2022-07-08 17:36:08.572 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [UltOcrEngine] Tensorflow version: 1.12.3
2022-07-08 17:36:08.572 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] android/os/Build$VERSION.SDK_INT: 31
2022-07-08 17:36:08.572 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] android/os/Build.CPU_ABI: arm64-v8a
2022-07-08 17:36:08.572 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] android/os/Build.MODEL: SM-A526B
2022-07-08 17:36:08.572 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] android/os/Build.HARDWARE: qcom
2022-07-08 17:36:08.574 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: [CompVBase] AID: ****
2022-07-08 17:36:08.575 17620-17620/au.gov.wa.pta.parkinginspector I/org.doubango.compv: *[COMPV INFO]: /!\ Code in file '..\compv_mem.cxx' in function 'CompVMemCopy_C' starting at line #956: Not optimized -> No SIMD implementation found. On ARM consider http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka13544.html
2022-07-08 17:36:08.575 17620-17620/au.gov.wa.pta.parkinginspector E/org.doubango.compv: ***[COMPV ERROR]: function: "updateLicenseInfo()"
    file: "..\source\ultimate_alpr_sdk_private_engine.cxx"
    line: "761"
    message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_CALL) -> Field [9]
2022-07-08 17:36:08.575 17620-17620/au.gov.wa.pta.parkinginspector E/org.doubango.compv: ***[COMPV ERROR]: function: "init()"
    file: "..\source\ultimate_alpr_sdk_private_engine.cxx"
    line: "131"
    message: Operation Failed (COMPV_ERROR_CODE_E_INVALID_CALL) ->
2022-07-08 17:36:08.575 17620-17620/au.gov.wa.pta.parkinginspector E/org.doubango.compv: ***[COMPV ERROR]: function: "init()"
    file: "..\source\ultimate_alpr_sdk_public_engine.cxx"
    line: "131"
    message: [UltAlprSdkEngine] Failed to initialize the engine

Mamadou DIOP

unread,
Jul 11, 2022, 12:50:43 AM7/11/22
to Kunal Rathod, doubango-ai
Hello,

In the mail you received about your credentials there were:
As explained at https://www.doubango.org/pricing.html, the license depends on the device identifier. To make sure the device identifier won't change:
    1/ Always use the same signing keys (release or debug) to update your application. So, make sure not to loose your signing keys.
    2/ Do not change the application unique identifier.
    3/ We highly recommend not doing a factory reset on the device.

You’re using Singing keys S1 for the debug target and S2 for release. With S1!=S2. A token generated with S1 will be different than a token generated with S2 even if it’s the same device. Your logs show that the token you’re trying to use wasn’t activated using a runtime key from the running device. Based on your explanation I guess it’s the same device but you’re using different signing keys.
You have to generate a new token using your real Signing keys instead of letting Android Studio choose a random one (this is what it’ll do in Debug mode if you don’t set one).

On Android and iOS different singing keys means different developers. The OS will fortunately return different identifier on the same device for Developer D1 and D2 for security reasons. This is done this way by Google and Apple to prevent your device from being tracked across websites/apps.

--
You received this message because you are subscribed to the Google Groups "doubango-ai" group.
To unsubscribe from this group and stop receiving emails from it, send an email to doubango-ai...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/doubango-ai/3cc7700a-7188-4041-ae5b-86c382e28387n%40googlegroups.com.

Kunal Rathod

unread,
Jul 11, 2022, 4:18:50 AM7/11/22
to doubango-ai
Can I generate new token for the same device with a different signing key using the same slave key?  Or does this mean i've burnt one license key?

Mamadou DIOP

unread,
Jul 11, 2022, 10:05:10 AM7/11/22
to Kunal Rathod, doubango-ai


Le 7/11/2022 à 10:18 AM, 'Kunal Rathod' via doubango-ai a écrit :
Can I generate new token for the same device with a different signing key using the same slave key?  Or does this mean i've burnt one license key?
No, you cannot. The slave key can only be used once (https://www.doubango.org/SDKs/LicenseManager/docs/Jargon.html#slave-key). Your balance will be incremented if you generate another token on that device using another signing key.

Kunal Rathod

unread,
Jul 12, 2022, 2:15:35 AM7/12/22
to doubango-ai
Thanks for clarification.
Reply all
Reply to author
Forward
0 new messages