Troubleshooting#

The troubleshooting section contains advice and suggestions on frequently encountered issues with PVRCarbon Recorder.

General Issues#

Tracking Modification Issues#

The code used for tracking modifications to mapped buffers relies on being able to capture SIGSEGV signals on Linux and STATUS_GUARD_PAGE_VIOLATION on Windows. If the application sets handlers to do the same while recording, this functionality will fail.

If the application does this, set the option watchMappedMemory to false so the recorder can fall back to a slow and dumb approach for tracking changes.

First-chance Exceptions#

The memory tracking code on Windows will cause a “first-chance exception” to be printed to Visual Studio’s debug output every time some tracked memory is written to. This is nothing to worry about.

Vulkan-specific Troubleshooting#

This troubleshooting section contains advice and suggestions on frequently encountered Vulkan-related issues with the PVRCarbon Recorder.

Device Does Not Have /data/local/debug/vulkan Directory#

You can create it by using:

mkdir -p /data/local/debug/vulkan

Note

Relates to Android rooted devices only.

Logcat: ‘vulkan : failed to load layer library ‘/data/local/debug/vulkan/libVkLayer_PowerVR_carbon.so’: dlopen failed: “/data/local/debug/vulkan/libVkLayer_PowerVR_carbon.so” is 32-bit instead of 64-bit’#

You’re attempting to use the 32-bit (armeabi-v7a or x86) version of the PVRCarbon layer to capture a 64-bit application (arm64-v8a or x86_64). Please use the version of PVRCarbon that matches your application’s ABI.

Where Does PVRCarbon Output To By Default#

If a filename is not defined PVRCarbon will calculate a suitable output filename and directory on a per-application basis. It will notify you via logcat/stdout where it is writing to.

No sign of PVRCarbon being loaded in Logcat#

Some devices may not be configured correctly to look for Vulkan layers in /data/local/debug/vulkan. To work around this you can push PVRCarbon to the application’s lib directory located in /data/app/. For example:

adb push libVkLayer_PowerVR_carbon.so /data/app/com.powervr.VulkanSkinning-tZ9jl809mXQnsRWiuwaciQ==/lib/arm64

Note

Relates to Android rooted devices only.

Layer cannot be opened by the loader#

When copying the layer to device it may be required to modify its security context so it can be opened by the loader. This can be done by:

chcon u:object_r:system_file:s0 libVkLayer_PowerVR_carbon.so

Note

Relates to Android rooted devices only.

PVRCarbon throws an “out of memory” error which is caught in Logcat#

This can be resolved by setting the following:

setprop pvrcbn.memory_map_files 0

Recording OpenGL applications using Zink#

Zink makes use of VK_EXT_descriptor_buffer` when it is reported as supported. This extension is currently unsupported by PVRCarbon. To work around this you can use PVRCARBON_disable_extensions=VK_EXT_descriptor_buffer to prevent the extension from being reported as supported.