Closed djdeath closed 5 years ago
Please note that RenderDoc is intended for capturing your own software as part of your development process.
Capturing third party software is quite outside of the scope of the tool for many reasons, including not knowing what kind of operations and API misuse the programs may be doing, as well as running into anti-hooking mechanisms.
If you're trying to figure out if RenderDoc is working at all on your Linux system, I recommend capturing executables you control that are using core profile OpenGL or Vulkan and has source code available for troubleshooting.
I would like to argue it's part of my dev process as I'm working on the Mesa 3D i965/anv drivers (both open source projects) and I'm interested to see if renderdoc can be a good tool to reproduce potential driver issues.
I managed to capture from other app, so might be one of the thing you mentioned. Although trying other things like Firefox for instance, seems to disable WebGL support in there.
As @zao mentions, I do not support or condone capturing copyrighted third party programs for any reason.
I can't say why Firefox disabled WebGL support, it may be that they require some extensions or other support that RenderDoc doesn't handle.
If you find or make a free program that this repros with then I can investigate, although I suspect it may be something systemic which won't be so easy for me to reproduce.
If you want to debug yourself, then you'd need to figure out why the glXGetProcAddress
function pointer in the GLX
dispatch table ended up pointing to renderdoc's version, as it should point onwards to the 'real' function. That's why this ends up with an infinite recursion. This is how things are expected to work, so if you want to debug you can see where things diverged from this path:
CheckLoadedLibraries()
, we iterate over the list of registered libraries to hook. This is e.g. libGL.so
, libGL.so.1
, as well as the weird libGLX.so
variant. These are all the libraries passed to LibraryHooks::RegisterLibraryHook
.glXGetProcAddress
is a registered function hook, if it's found in the library handle then we store the function pointer into GLX.glXGetProcAddress
. If multiple instances are found the first one 'wins' but we assume they are all equivalently good.
So at this point, the library handle should not ever be pointing to librenderdoc.so
so GLX.glXGetProcAddress
should either end up with NULL
if no matching function is found, or point to the real function.GLXHooked
in the callstacks you pasted.GLXHooked
then uses dlsym
(via Process::GetFunctionAddress
) to fetch any of the non-hooked functions that we might need in the GLX
dispatch table, with GLX_NONHOOKED_SYMBOLS
. This is irrelevant for our purposes.GLX.glXGetProcAddressARB
preferably or else GLX.glXGetProcAddress
to fetch any NULL function pointers that we have. This step will fill out any functions like glXCreateContextAttribsARB
that may not ever be directly exported by a library.GLX.glXGetProcAddress
to fetch their function pointers.So somehow in your case, GLX.glXGetProcAddress
ended up pointing to renderdoc's version. But it should always be fetched by dlsym
on a libGL.so
or equivalent handle in step 2. If you figure out why that went wrong,
Closing this issue due to lack of information to be able to investigate on a supported use-case. If you're able to provide more information feel free to comment here and I can open it up again.
Description
Trying to capture a game frame, I'm launching the game with :
The command crashes with an endless backtrace of glXGetProcAddress (trying with MadMax from steam) :
Trying with CSGO is a somewhat similar backtrace :
Repro steps
Just launch one of the 2 games mentioned above with :
Or from Steam, from the library, right click in the game's name, "set launch options" and write the following :
Environment
Renderdoc build from master at : commit 814e1d1b134583aebeebd54167f631bb7d6132e9 (origin/v1.x, origin/HEAD) Author: baldurk baldurk@baldurk.org Date: Thu Oct 25 18:45:20 2018 +0100
Don't pass std::string through StringFormat
Operating System: Debian Linux 64bits
API: OpenGL (with an Intel i965 driver from Mesa3D) at the following revision :
commit cbd44686952b4275d654bcb3555111b412b8c8f4 (origin/master) Author: Jason Ekstrand jason.ekstrand@intel.com Date: Fri Oct 26 13:36:01 2018 -0500