Imagination PowerVR SDK Blog

Recursive loading of PVRTrace.dll

pvrvframe
pvrtrace
pvrhub

#1

Utilizing Windows_x86_32 versions of PVRTrace and PVRVFrame, I get a recursive load issue for the PVRTrace.dll.

Execution seems to ignore “Host”: “EglLibraryPath” values from the pvrtraceconfig.json file.

Execution output
Running "C:/<path to exe>/wxMapDrawerTest.exe "
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

PVRTrace: DLL_THREAD_ATTACH

PVRTrace: DllMain

PVRTrace: DLL_THREAD_ATTACH

PVRTrace: DllMain

PVRTrace: DLL_THREAD_ATTACH

Config file found: C:&lt;path to exe>/pvrtraceconfig.json

PVRTrace has disabled support for shader/program binaries in the API. This can be changed by setting DisableBinaries to false in the config.
Opening trace file ‘wxMapDrawerTest.exe.pvrtrace’ for recording.
Recorder Version: 3.5@3533642
Loading host library 'C:[b]<path to exe>[/b]\libEGL.dll’
FATAL ERROR: PVRTrace - ERROR: attempted to recursively load trace DLL.

[Finished in 0.1s with exit code 4294967295]

pvrtraceconfig.json contents
{
“Host”:
{
“Es2LibraryPath”: “c:\<path to VFrame lib>\libGLESv2.dll”,
“EglLibraryPath”: “c:\<path to VFrame lib>\libEGL.dll”
},

“Debug”:
{
“Level”:0
},

“Tracing”:
{
“OutputFilename”: “%pname-%pid.pvrt”,
“StartFrame”: 0,
“EndFrame”: 200,

"RecordData": true,
"ExitOnLastFrame": false,
"ClientBufferRecordFrequency": 0,
"SaveFrameBuffer": false,
"UseCompression": true,
"AppendTraceVersion": true

},

“Profiling”:
{
“Enabled”: false,
“SoftwareCounters”: true,
“FunctionTimelineLevel”: 1,
“RenderstateOverride”: true
},

“Network”:
{
“Enabled”: false,
“Wait”: false,
“BufferSize”: 256
}
}


#2

Hi Jeff,

Can you try following the steps in our “5 easy steps to add PVRTrace libraries to your own OpenGL ES application” blog post and compare it against your configuration?

This error should only occur if the tool has been unable to identify the location of the host OpenGL ES libraries. I’ve noticed your configuration doesn’t set the Es1LibraryPath flag. Even if you’re not using ES 1.x, can you try setting this flag to see if it resolves the issue?

Joe


#3

I created a PVRVFrameLibs directory in the executable folder, placed the VFrame libs there, and changed the pvrtraceconfig.json file to what is in the “5 steps” page. I have the same results:
[blockquote]Loading host library ‘C:[b]path\to\executable[/b]\libEGL.dll’[/blockquote]

I know PVRTrace.dll is attempting to parse the json file. I accidentally left an extra comma in the file and got the following dialog box:
[blockquote]Failed to parse configuration: * Line 12, Column 1
Missing ‘}’ or object member name[/blockquote]


#4

Hi Jeff,

I’ve noticed that, at least in the config you’ve copied above, you are using ‘“’ and ‘”’ instead of ‘"’ (overview of the differences between them here). It’s possible that the incorrect quotation characters are preventing the PVRTrace libraries from correctly parsing the file.


#5

Attached you can find a less aggressive change to the pvrtraceconfig.json file that uses an executable relative subfolder to contain the VFrame libraries. (.txt added to make it a valid attachment)


#6

I will look into the quotes.

Looking at your post, I smiled because I know there can be a difference, but I can’t see it in what you’ve typed. :slight_smile:

<edit>Ah! you put single quotes around the directional double quotes. I see it now.
I need to check the source file. In the editor I’m currently using, directional quotes might be displayed and non-directional


#7

I just used a hex editor to check on the quotations. They are ‘0x22’, normal 8-bit ascii for quotes. Feel free to verify on the attached file.

I’m guessing the forums text entry tool auto converted to directional quotes.


#8

If it helps at all, the *.json file is the same file that we used for 3.4 SDK VFrame and Trace work.

<edit>Whoops, I just realized I didn’t state that we’re attempting to upgrade from 3.4 SDK to 3.5 SDK in the initial post.
My apologies!


#9

Potentially useful information:

  • Using only 3.5 VFrame libraries, everything runs fine
  • The “OutputFilename” option from the json appears to be ignored as well.
    [blockquote]“Tracing”:
    {
    “OutputFilename”: “%pname-%pid.pvrt”,[/blockquote]
    [blockquote]Opening trace file ‘wxMapDrawerTest.exe.pvrtrace’ for recording.[/blockquote]

#10

>I just realized I didn’t state that we’re attempting to upgrade from 3.4 SDK to 3.5 SDK in the initial post.
Ah. You’ve reminded me there’s something pretty important I haven’t mentioned. For the 3.5 SDK, we changed the structure of the config file. One of the big reasons for the change was so process specific options can be added to the config along side the global options. You can find more about the new format in the PVRTrace User Manual. (our website is undergoing maintenance today, so you may have problems with that online doc. You can also find it in the SDK download)

I’ve attached a simple config file that worked for me (Trace libs in the same dir as the EXE, PVRVFrame libs in a PVRVFrame/ sub-directory).

Sorry for not spotting this sooner. I rely on the PVRHub Android config tool to do my setup too much :S


#11

Adding the “*” container, and the “Enabled” option worked! Thank you.

Looking at the main user manual, the need for these isn’t very well explained. I did see an example of “*” use in the Unrooted Android document.
You may want to add a small example with explanations in the main user manual.
(Please don’t ask about the condition of my documentation. At least you have some. :slight_smile: )

Another idea is to add a “version spec” to the config format. That way the json parsing can warn when something doesn’t look right.

Anyways, thanks again!


#12

Glad you’ve got it working now :slight_smile:

I’ve filed a feature request for default configs to include a version number (BRN56495) and another for the documentation to explain how to set flags globally and per-process (BRN56497).