baldurk / renderdoc

RenderDoc is a stand-alone graphics debugging tool.
https://renderdoc.org
MIT License
8.6k stars 1.3k forks source link

Frame Replay Error on [smartisan os 105] with RenderDoc [1.33] #3340

Closed enchanEnchan closed 1 month ago

enchanEnchan commented 1 month ago

Description

When attempting to replay a captured frame using RenderDoc on my [smartisan os 105], I encountered an error. The application displays an error message: "Error opening capture." This issue is reproducible and I am able to provide detailed information and steps to reproduce it.

Steps to reproduce

Launch RenderDoc version [1.33] on [smartisan os 105] running [android 7.1.1]. Capture a frame from the application in question. Attempt to replay the captured frame. Encounter the error message "Error opening capture." Expected outcome: The frame should be replayed successfully without any errors.

Actual outcome: An error message is displayed and the capture cannot be opened for replay.

Environment

RenderDoc version: [1.33] Operating System: [android 7.1.1] Graphics API: [OpenGLES] Device Model: [smartisan os 105] Processor: [Qualcomm Technologies, Inc SDM660]

I have ensured that the application has the necessary permissions. The file path is correct, and the capture file is not corrupted. I have restarted the device and attempted to replay the capture again. The issue persists despite these troubleshooting steps. If possible, I can provide a capture file or any additional logs that may help in diagnosing the issue. Below is a file that I have captured by renderdoc, you can remove the .txt extension to restore it. test.rdc.txt

335951457-e4e7e21e-c00a-41b4-b287-ff2e798b08fe

baldurk commented 1 month ago

After the capture fails to load can you please go to Help -> Send Error Report and include both the capture and a reference to this issue so that further debugging information can be obtained.

Also do you have a different Android device you can test this on with the same program? Most Android bugs are caused by broken devices, not RenderDoc bugs.

enchanEnchan commented 1 month ago

Hello, I have uploaded my error report. Currently, I don't have any other Android devices available for testing at the moment. Your work is greatly appreciated, and I look forward to any insights or assistance you can provide in resolving this issue. Thank you for your dedication to maintaining and improving the RenderDoc tool. https://renderdoc.org/bugreporter/report/H79PGcsI3tK1A

baldurk commented 1 month ago

Can you share your application, either here or privately? Looking at the log and the capture you sent, the problem is that the capture is corrupted in a way that either suggests your device is extremely broken or there is memory corruption/trampling happening (which is unlikely to produce the same effect each time consistently).

enchanEnchan commented 1 month ago

Thank you for your response.

I suspect the issue might be with my device, as I encounter this error when capturing frames from any application using RenderDoc. Interestingly, capturing frames with the Snapdragon Profiler works without any issues. Is there a way to pinpoint what might be going wrong with my device when using RenderDoc?

I appreciate any guidance you can provide.

Best regards,

baldurk commented 1 month ago

The corruption indicates that something has interfered with RenderDoc's code somehow causing an incorrect function call to be serialised. As far as I can tell this could only be caused by a broken implementation of a system library, something external interfering with function hooking, or memory corruption.

Since many or even most Android devices are broken in some way, and memory corruption is highly unlikely to coincidentally cause this serialisation to flip to a different function especially in multiple different applications, my best guess is that the Android device has a broken system library or external interference that's causing RenderDoc to fail.

Unfortunately I don't think there's anything I can do. The most would be to give you a special build with logging to try and narrow down in what way your device is broken, but something as bad as this is unlikely to be feasible to work around and would be quite difficult to investigate. Sadly some Android devices are too broken to work with RenderDoc unfortunately. I can't comment on any other tools, particularly Qualcomm tools may work in a very different way using driver internals.