Recursive loading of PVRTrace.dll

Tagged: 

This topic contains 11 replies, has 2 voices, and was last updated by  Joe Davis 2 years, 3 months ago.

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #49197

    Jeff
    Member

    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:\<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:\<path to exe>\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
    }
    }

    #49198

    Joe Davis
    Member

    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

    #49200

    Jeff
    Member

    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:

    Loading host library ‘C:\path\to\executable\libEGL.dll’

    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:

    Failed to parse configuration: * Line 12, Column 1
    Missing ‘}’ or object member name

    #49201

    Joe Davis
    Member

    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.

    #49202

    Jeff
    Member

    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)

    Attachments:
    You must be logged in to view attached files.
    #49204

    Jeff
    Member

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

    <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

    #49206

    Jeff
    Member

    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.

    #49208

    Jeff
    Member

    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!

    #49215

    Jeff
    Member

    Potentially useful information:
    * Using only 3.5 VFrame libraries, everything runs fine
    * The “OutputFilename” option from the json appears to be ignored as well.

    “Tracing”:
    {
    “OutputFilename”: “%pname-%pid.pvrt”,

    Opening trace file ‘wxMapDrawerTest.exe.pvrtrace’ for recording.

    #49230

    Joe Davis
    Member

    >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

    Attachments:
    You must be logged in to view attached files.
    #49232

    Jeff
    Member

    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. 🙂 )

    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!

    #49237

    Joe Davis
    Member

    Glad you’ve got it working now 🙂

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

Viewing 12 posts - 1 through 12 (of 12 total)
You must be logged in to reply to this topic.