Forums - Segmentation Fault when using snpe-net-run

5 posts / 0 new
Last post
Segmentation Fault when using snpe-net-run
baridbelx
Join Date: 19 Jun 17
Posts: 4
Posted: Mon, 2017-08-14 10:12

Hello,

First of all thank you for releasing SNPE, I've been waiting for a long time to try it!

Secondly, I am having trouble running the Inception V3  net on my smartphone (HTC 10, Android 7.0, not rooted).

I have followed the steps in the guide but whenever I try to run the network with the given input data (e.g. using snpe-net-run --container inception_v3_quantized.dlc --input_list target_raw_list.txt)I get a "Segmentation Fault" message. 

Same problem happens to AlexNet too.

 

Inception and AlexNet run fine on Ubuntu 16.04. (i.e. I can run the nets by following the "Run On Linux host" section )

What should I do?

Regards,

Alex

  • Up0
  • Down0
moljaca moderator
Join Date: 25 Jul 17
Location: San Diego
Posts: 40
Posted: Mon, 2017-08-14 17:40

Hi Alex,

Thanks you for interest in Snapdragon NPE.

Could you provide some more details about the "Segmentation Fault" message? Is there any other information output?

Does the same thing happen if you try using --use_dsp option (Running on Android using DSP Runtime)?

What is Android NDK version that you use? I am thinking of possible libgnustl_shared.so compatibility issue. I assume you followed SNPE Setup instructions to copy libgnustl_shared.so into SDK..

Best regards,

Milan

  • Up0
  • Down0
baridbelx
Join Date: 19 Jun 17
Posts: 4
Posted: Tue, 2017-08-15 04:01

Hello,

In the adb shell i get "Segmentation fault", preceded by WARNING: linker: Warning: unable to normalize "".

I get the same error if i try to use the --use_dsp option.

I followed the instruction to copy the libgnustl_shared.so into $SNPE_ROOT/lib/arm-android-gcc4.9/ .  I tried using different versions of ndk; initially I used version 15 and after your reply I tried versions 14 and 12, but without success.

 

In the meantime I also tried the Android sample, but the application crashes; after some debugging, I realized it crashes after executing lines containing calls to the SNPE lib (e.g.  SNPE.getRuntimeVersion ( ... ) ).

Could something be wrong with my libSNPE.so that causes crashes in both cases?

Thank you!

Regards,

Alex

  • Up0
  • Down0
baridbelx
Join Date: 19 Jun 17
Posts: 4
Posted: Tue, 2017-08-29 12:14

Hello,

Sorry to bump this but I still didn't solve the problem; I will try to run the example on a S801 smartphone and see if the problem persists.

In the meantime, what else could I try for the 820 phone?

Regards,

Alex

  • Up0
  • Down0
baridbelx
Join Date: 19 Jun 17
Posts: 4
Posted: Sun, 2017-09-10 02:46

Hello,

Sorry for triple posting but I have finally managed to make it work!

The problem for the HTC10 was that I did not check the option "Install from unknown sources" from the Security menu. Once I did that, i was able to install and test the Android demo app(CPU and GPU options were in the menu!). I have also managed to run the inception_v3 models using the CPU or the DSP ( no more segmentation fault errors!).

I also tried to run the android demo app on a Sony Z3 Compact ( Snapdragon 801 ). It ran well, except there was no GPU option in the menu ( guess it is not supported). Also, trying to run the inception_v3 with the DSP option resulted in error code 101, but the CPU option ran fine.

Hope this helps anyone facing the same problems !

Regards,

Alex 

  • 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.