Closed wbarnesSamsung closed 3 years ago
Due to Android being a unstable and unreliable platform I don't support python scripting with Android, only using the UI itself. The scripting may work, but I can't help if it breaks. If you can reproduce this bug without Android I can look into it, or if you investigate and find a bug then any fixes are welcome.
Can you post that info as part of the the bug filing information or similar to not waste others time?
I could perhaps add a note to the documentation, but it doesn't seem that bad since this is a very niche use case and it doesn't waste anyone's time to have an issue closed with an explanation. I would also expect anyone working with android to expect things to be intermittently broken and partially working since that is typical for the platform.
I want to push back on that thinking. Filing the issue in the first place took time. Time I could have spent debugging the issue. I wouldn't have filed the issue if I knew it was an unsupported feature, though I am not surprised. It disincentivizes adding detailed issues up front, as they may be summarily dismissed. Please add a note somewhere.
Description
I have a python script that uses renderdoc to dump a texture on an android device given a renderdoc file. The script baseline is mostly taken from https://renderdoc.org/docs/python_api/examples/renderdoc/remote_capture.html and https://renderdoc.org/docs/python_api/examples/renderdoc/save_texture.html The script has conditionals to support all OS, but all differences are in the opening and closing of the capture.
The script complete without crash or critical error. Opening, parsing, and closing the capture is successful without issue. However,
controller.SaveTexture()
fails aka returns false Adding breakpoints to and diving into the renderdoc code the internal RDC error is:RDCERR("Couldn't get Live ID for %s getting texture data", ToStr(sd.resourceId).c_str());
inbool ReplayController::SaveTexture(const TextureSave &saveData, const char *path)
Thesd.resourceId
is the correct value. InResourceId ReplayProxy::Proxied_GetLiveID(ParamSerialiser ¶mser, ReturnSerialiser &retser, ResourceId id)
m_LiveIDs
is effectively empty (0 only)m_LocalTextures
is actually emptyif(paramser.IsErrored() || retser.IsErrored() || m_IsErrored)
are all true. I stopped being able to easily follow the debug here.Saving the same resource via renderdoc gui instead of the python library works without issue. The same SaveTexture in same script works just fine in a Windows replay. This seems to be an issue for all Android rdc files and resources.
Steps to reproduce
Will send an rdc to baldurk@baldurk.org If necessary I can recreate a trimmed down version of the script by cobbling together the replay portion of https://renderdoc.org/docs/python_api/examples/renderdoc/remote_capture.html and https://renderdoc.org/docs/python_api/examples/renderdoc/save_texture.html.
The connection to Android type I used was adb.
protocol_to_use = 'adb'
Rough outline: Take https://renderdoc.org/docs/python_api/examples/renderdoc/save_texture.html
Replace def loadCapture(filename): code with something like
then replace
cap.Shutdown()
withremote.ShutdownServerAndConnection()
Environment
Tested on a Pixel 4.