Forums - Every Vulkan API call will crash after Snapdragon Profiler is connected to the device

10 posts / 0 new
Last post
Every Vulkan API call will crash after Snapdragon Profiler is connected to the device
tiantian20007
Join Date: 13 Oct 11
Posts: 4
Posted: Tue, 2017-07-25 00:59

Every Vulkan API call will crash after Snapdragon Profiler is connected to the device.

If I launch the app after Snapdragon Profiler is connected, the very basic vkCreateInstance will crash.

If I launch the app, then connect Snapdragon Profiler, any Vulkan API at that moment will crash.

Test device: MI 5 with MIUI 8.5

Android 7.0

  • Up0
  • Down0
Carlos Dominguez Moderator
Join Date: 27 Jul 15
Location: San Diego
Posts: 110
Posted: Tue, 2017-07-25 09:44

In order for Vulkan profiling to work without modifying your application there's two additional requirements. Your device needs to be rooted and you need to do "adb shell setenforce 0". If your device isn't rooted you can try packaging the appropriate layer *.so that is located in your Snapdragon Profiler's installation directory + \service\android\vulkan\layers\[arm64-v8a or armeabi-v7a]\libq3dtools_qgl.so and put it in your applications 'libs' folder. If the problem persists even with this suggestions can you please post the logcat's backtrace that gets generated from the crash? 

  • Up0
  • Down0
chrisvarns
Join Date: 21 Jun 17
Posts: 4
Posted: Tue, 2017-12-12 03:54

Hi Carlos,

Jumping on this thread rather than starting a new one as I have the same issue.

After opening the Snapdragon Profiler (2.1.0.11062017 currently) every call to vkCreateInstance will fail with eErrorLayerNotPresent (which if you're using the C++ wrapper header asserts and crashes). I don't have root on this device but I did try packaging libq3dtools_qgl.so which made no change. Are there any extra steps beyond simply copy-pasting the so to the jni libs folder prior to packaging the apk?

Thanks,

Chris

  • Up0
  • Down0
Carlos Dominguez Moderator
Join Date: 27 Jul 15
Location: San Diego
Posts: 110
Posted: Tue, 2017-12-12 09:01

Can you please try renaming the layer to libVkLayer_q3dtools_32.so or libVkLayer_q3dtools_64.so (depending on what you need) and see if that finds the layer? 

  • Up0
  • Down0
chrisvarns
Join Date: 21 Jun 17
Posts: 4
Posted: Sat, 2017-12-30 04:26

Thanks Carlos, that did the trick!

  • Up0
  • Down0
Lorenzo
Profile picture
Join Date: 19 May 14
Posts: 3
Posted: Tue, 2018-01-02 02:52

Hi Carlos,

what you suggested worked for me too, thanks. 

Unfortunately I am still not able to capture CPU and GPU metrics while doing a Trace Capture.

Is there anything I am missing, or another library I should include in my APK?

Screenshot: https://imgur.com/fcdzlKd

Thanks,

Lorenzo

  • Up0
  • Down0
Fans0014
Join Date: 10 May 17
Posts: 8
Posted: Tue, 2018-01-02 03:18

Hi lordalcol

  Your metrics message was shown in your bottom data explorer.

 Just pull the slider to the right, then you can find them.

  • Up0
  • Down0
Lorenzo
Profile picture
Join Date: 19 May 14
Posts: 3
Posted: Tue, 2018-01-02 05:44

Do you mean these? https://imgur.com/VnhdPEP

If so, that's not what I was expecting, I was expecting GPU and CPU metrics related to utilization, cache misses, vertex/fragment shading, etc. similar to what can be seen in https://developer.qualcomm.com/sites/default/files/attachments/vr-profil...

 

  • Up0
  • Down0
eshaw Moderator
Join Date: 12 May 16
Location: San Diego
Posts: 142
Posted: Tue, 2018-01-02 11:46

Hi Lorenzo,

The rendering stages trace you referenced is currently only available for OpenGL ES applications. We are working to add more features for Vulkan applications in future versions of Snapdragon Profiler.

Eric

 

  • Up0
  • Down0
Lorenzo
Profile picture
Join Date: 19 May 14
Posts: 3
Posted: Fri, 2018-07-06 01:42

Quote:
Can you please try renaming the layer to libVkLayer_q3dtools_32.so or libVkLayer_q3dtools_64.so (depending on what you need) and see if that finds the layer? 

Just a quick note to say that this is still needed with v2018.1.0.

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