Renderdoc closes client application before main function without generating an error #1975
Labels
Bug
A crash, misbehaviour, or other problem
Need More Info
More information is needed from a user to work on this issue
Description
When I try to start my application using the Launch Application dialog in the Renderdoc UI, a console shows up and closes after a brief moment. After that my application is nowhere to be seen (terminated before entering main), and no capturing session is active. Using the Renderdoc v1.7 release, the log contains no information about an error (log v1_7.log). Attaching via "Inject to Process" is working as expected and creates a capturing session.
To investigate this bug further, I built the current version (unstable 1.9) of the repo: Doing the exact same thing with RenderDoc running from within Visual Studio debugger yields an error (log v1_9dev no breakpoints.log):
After some more debugging of RenderDoc I found that a port of 0 was passed to the socket connect function (win32_network.cpp:436) which makes no sense. I found that this value propagates through LiveCapture::m_RemoteIdent from a call to RENDERDOC_ExecuteAndInject (ReplayManager.cpp:400), which returns an ExecuteResult of
{status=Succeeded (0) ident=0 }
(which may be an internally inconsistent application state?). While chasing this value, I stepped through Process::InjectIntoProcess and by doing so, RenderDoc logged different error messages (log v1_9dev with breakpoints.log):So the timing of Process::InjectIntoProcess seems to be relevant for the error. At this point I called it quits because I don't really think I will be able to do much about possibly timing related issues in a foreign codebase.
I also compiled another dummy program (simple while loop with printf and sleep) to test that this is not an issue with my machine. This test application didn't experience any error, so it seems that this bug is triggered by my main application.
Steps to reproduce
To reproduce, simply try to start my application via the Launch Application Dialog, that I sent you via email to baldurk@baldurk.org. It should output a message on the console and close after 5 seconds, but will be instantly closed by renderdoc.
Environment
Versions are:
RenderDoc v1.7
RenderDoc v1.9 Windows 64-bit Development (efafd0b)
Windows 10 Education x64 v1903
Directx11
GTX 1070 Driver 451.48
I hope this is enough information to get you started.
The text was updated successfully, but these errors were encountered: