Forums - Unable to load 'snpe-android' after 'jniload' library in android

4 posts / 0 new
Last post
Unable to load 'snpe-android' after 'jniload' library in android
srajmeer
Join Date: 25 May 23
Posts: 3
Posted: Thu, 2023-05-25 16:28

Hi, 

In our android applicatin, when I try to do the following, the `snpe-android` library loading is stuck and never returns or completes.

System.loadLibrary("jniload");
System.loadLibrary("snpe-android");

 

However loading them in the reverse order or loading them individually works fine.
Root Cause of this issue will be helpful for us in long term in case of more dependencies.
 

Any help is greatly appreciated!

  • Up0
  • Down0
weihuan
Join Date: 12 Apr 20
Posts: 270
Posted: Fri, 2023-05-26 21:59

Dear developer,

What's type of jni-load in your code?

Per my understanding, this libray was not release by Qualcomm. Is the customing library created in you side?

You could load these two lib seperately in two module.

BR.

Wei

  • Up0
  • Down0
srajmeer
Join Date: 25 May 23
Posts: 3
Posted: Tue, 2023-05-30 11:44

Thank you for your reply.
We have the `jniload` (libjniload.so) library being loaded from one of our dependency - Honeywell's SwiftDecoder (https://sps.honeywell.com/us/en/products/advanced-sensing-technologies/l...).

Our application uses both SwiftDcoder and also Qualcomm's SNPE and have an issue of loading these in a particular order. Diving deep, we figured out the issue is with loading of these two libraries(`jniload` from SwiftDecode, `snpe-android` from SNPE) in a particular order.

Let us know if you need more details.

  • Up0
  • Down0
srajmeer
Join Date: 25 May 23
Posts: 3
Posted: Wed, 2023-06-28 17:11

Both SwiftDecoder and SNPE use libc++shared.so and are using different versions which is causing the issue. Honeywell provided a solution by statically linking the specific library libc++shared.so needed by SwiftDecoder. The order dependency is fixed now.

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.