Imagination PowerVR SDK Blog

PVRTrace - ERROR: attempted to recursively load trace DLL.

pvrvframe
pvrtrace

#1

The output of VS2010:


PVRTrace: DllMain
PVRTrace: DLL_PROCESS_ATTACH.
PVRTrace: DLL_THREAD_ATTACH
PVRTrace: DllMain
PVRTrace: DLL_THREAD_ATTACH
PVRTrace: DllMain
PVRTrace: DLL_THREAD_ATTACH
PVRTrace: DllMain
PVRTrace: DLL_THREAD_ATTACH
PVRTrace: DllMain
PVRTrace: DLL_THREAD_ATTACH
PVRTrace: DllMain
Config file found: E:ImaginationPowerVRGraphicsSDKSDK_3.3ExamplesBeginner1_HelloAPIOGLES2BuildWindowsVC2010/pvrtraceconfig.json

Opening trace file 'OGLES2HelloAPI.exe.pvrt' for record recording.
'OGLES2HelloAPI.exe.pvrt' already exists so will be overwritten.
Recorder Version: 3.3@2850432
Loading host library 'libEGL.dll'
PVRTrace - ERROR: attempted to recursively load trace DLL.
PVRTrace: DllMain
PVRTrace: Trace finished.


The config file at E:ImaginationPowerVRGraphicsSDKSDK_3.3ExamplesBeginner1_HelloAPIOGLES2BuildWindowsVC2010pvrtraceconfig.json:

{
"Tracing": {
"OutputFilename": "%pname.pvrt",
"RecordData": true,
"StartFrame": 0,
"EndFrame": 100,
"ExitOnLastFrame": true,
"ClientBufferRecordFrequency": 0,
"SaveFrameBuffer": true
},
"Debug": {
"Level": 1
},
"Network": {
"Wait": true,
"Enabled": false,
"BufferSize": 256
},
"Host": {
"Es2LibraryPath": "libGLESv2.dll",
"Es1LibraryPath": "libGLES_CM.dll",
"EglLibraryPath": "libEGL.dll"
},
"Profiling": {
"SoftwareCounters": true,
"FunctionTimelineLevel": 0,
"Enabled": false,
"RenderstateOverride": true
}
}


PVRTrace.dll, libGLESv2.dll, libGLES_CM.dll and libEGL.dll are copied form E:ImaginationPowerVRGraphicsSDKPVRTraceRecorderWindows_x86_32 to $(OutDir) E:ImaginationPowerVRGraphicsSDKSDK_3.3ExamplesBeginner1_HelloAPIOGLES2BuildWindowsVC2010Debug(Where OGLES2HelloAPI.exe is located)

In the documentation at E:ImaginationPowerVRGraphicsSDKPVRTraceDocumentationPVRTrace.User Manual.pdf:

2.3.2. Windows
1. Copy: "libEGL.dll" , "libGLESv2.dll" (OpenGL ES 2.0 and 3.0),
"libGLES_CM.dll" , "libGLESv1_CM.dll" (OpenGL ES 1.1), and "PVRTrace.dll"
To: Executable folder
2. If a PVRTace configuration file does not exist, make one manually (see Section 2.4
Configuration).
3. Place "pvrtraceconfig.json" into the executable folder.
4. Update "pvrtraceconfig.json" so that EglLibraryPath, Es1LibraryPath and
Es2LibraryPath are set to the location of the systems graphics libraries (see Section 2.4).


What am I doing wrong? @Joe

#2

Hi,



It seems that you are pointing the PVRTrace libraries at the PVRTrace libraries. Instead, your pvrtraceconfig.json should point to host OpenGL ES libraries or emulation libraries (e.g. PVRVFrame).



One easy way to do this on Windows is to copy the PVRTrace libraries to your EXE’s directory, then copy the PVRVFrame OpenGL ES emulation libraries to a sub directory, e.g.



IntroducingPOD/

├── libEGL.dll

├── libGLES_CM.dll

├── libGLESv1_CM.dll

├── libGLESv2.dll

├── OGLES2IntroducingPOD.exe

├── PVRTrace.dll

├── pvrtraceconfig.json

└── PVRVFrameLibs

├──├── libEGL.dll

├──├── libGLES_CM.dll

├──└── libGLESv2.dll



For this to work, you will also have to modify the pvrtraceconfig.json Host library paths to point to the PVRVFrameLibs sub-directory:

{
"Tracing": {
"OutputFilename": "%pname.pvrt",
"RecordData": true,
"StartFrame": 0,
"EndFrame": 100,
"ExitOnLastFrame": true,
"ClientBufferRecordFrequency": 0,
"SaveFrameBuffer": true
},
"Debug": {
"Level": 1
},
"Network": {
"Wait": true,
"Enabled": false,
"BufferSize": 256
},
"Host": {
"Es2LibraryPath": "PVRVFrameLibs/libGLESv2.dll",
"Es1LibraryPath": "PVRVFrameLibs/libGLES_CM.dll",
"EglLibraryPath": "PVRVFrameLibs/libEGL.dll"
},
"Profiling": {
"SoftwareCounters": true,
"FunctionTimelineLevel": 0,
"Enabled": false,
"RenderstateOverride": true
}
}


With this folder structure and configuration file, I was able to successfully generate a file (OGLES2IntroducingPOD.exe.pvrt).

Regards,
Joe