How to make renderdocui.exe and scripthookv run in parallel?

1k Views Asked by At

I can use renderdocui.exe in administrative mode (with hook into all children checked) to capture frames from GTAV (GTA5) and also I can separately use Script Hook V for modding in GTAV. When I use both by which I mean having the dll and necessary files of Script Hook V in the GTAV game directory (by Rockstar Games) and also use renderdocui.exe in capture mode to run GTAVLauncher.exe it fails. Please provide feedback how I can make them work simultaneously. This is as much information as I get debugging with Visual Studio:

unhandled exception at 0x00007ff7db204840 in gta5.exe : 0xc0000005 : access violation writing location 0x00many zeros0 game_win64_master.pdb contains debug information

This is the only log I get from Script Hook V:

// GTA V SCRIPT HOOK (build Dec 15 2016, v1.0.944.2)
//     (C) Alexander Blade 2015-2016
[15:31:01] INIT: Started
[15:31:01] INIT: Success, game version is VER_1_0_944_2_NOSTEAM
[15:31:01] INIT: Registering script 'NativeTrainer.asi' (0x00007FF9B082A3C0)
[15:31:56] INIT: Pool 1 extended
[15:31:56] INIT: Pool 2 extended
[15:31:56] INIT: Pool 3 extended
[15:31:56] INIT: Pool 4 extended
[15:32:01] INIT: GtaThread collection size 188
[15:32:01] INIT: wnd proc 0x00000000FFFF05E7
[15:32:01] INIT: IDXGISwapChain 0x00007FF986FAEB48 (0x00007FF986E31950)
[15:32:01] INIT: IDXGISwapChain set
[15:32:01] INIT: DX init started

And here's the log I get from renderdoc:

RENDERDOC:  [15:30:05]             core.cpp( 242) - Log     - RenderDoc v0.27 x64 (NO_GIT_COMMIT_HASH_DEFINED) loaded in replay application
RENDERDOC:  [15:30:31]    win32_process.cpp( 307) - Log     - Injecting renderdoc into process 8204
RENDERDOC:  [15:30:31]    remote_access.cpp( 389) - Log     - Got remote handshake: GTAVLauncher () [8204]
RENDERDOC:  [15:30:35]    remote_access.cpp( 558) - Log     - Got a new child process: 8128 38921
RENDERDOC:  [15:30:42]    remote_access.cpp( 558) - Log     - Got a new child process: 4116 38923
RENDERDOC:  [15:30:57]    remote_access.cpp( 558) - Log     - Got a new child process: 12464 38923
RENDERDOC:  [15:33:14]    win32_network.cpp( 169) - Warning - recv: 10054
RENDERDOC:  [15:33:17]    win32_network.cpp( 344) - Warning - Failed to connect to localhost:38920
RENDERDOC:  [15:33:20]    win32_network.cpp( 344) - Warning - Failed to connect to localhost:38920
RENDERDOC:  [15:33:23]    win32_network.cpp( 344) - Warning - Failed to connect to localhost:38921
RENDERDOC:  [15:33:26]    win32_network.cpp( 344) - Warning - Failed to connect to localhost:38921
RENDERDOC:  [15:33:29]    win32_network.cpp( 344) - Warning - Failed to connect to localhost:38921

As well here's the renderdoc_app_XX_YY.log in C:\Users\mona\AppData\Local\Temp:

RENDERDOC:  [15:30:57]             core.cpp( 245) - Log     - RenderDoc v0.27 x64 (NO_GIT_COMMIT_HASH_DEFINED) capturing application
RENDERDOC:  [15:30:57]   win32_libentry.cpp(  70) - Log     - Loading into C:\Program Files\Rockstar Games\Grand Theft Auto V\GTA5.exe
RENDERDOC:  [15:30:57]            hooks.cpp(  49) - Log     - Loaded and hooked into kernel32.dll, PID 12464
RENDERDOC:  [15:30:57]            hooks.cpp(  49) - Log     - Loaded and hooked into opengl32.dll, PID 12464
RENDERDOC:  [15:30:57]            hooks.cpp(  49) - Log     - Loaded and hooked into d3d11.dll, PID 12464
RENDERDOC:  [15:30:57]            hooks.cpp(  49) - Log     - Loaded and hooked into dxgi.dll, PID 12464
RENDERDOC:  [15:30:57]            hooks.cpp(  49) - Log     - Loaded and hooked into d3d9.dll, PID 12464
RENDERDOC:  [15:31:01]    win32_network.cpp(  90) - Warning - accept: 10038
RENDERDOC:  [15:31:01]    remote_access.cpp( 250) - Error   - Error in accept - shutting down server
RENDERDOC:  [15:31:01]     dxgi_wrapped.cpp( 563) - Warning - Querying IDXGIObject for interface: GUID {7abb6563-02bc-47c4-8ef9-acc4795edbcf}
RENDERDOC:  [15:31:01]     dxgi_wrapped.cpp( 563) - Warning - Querying IDXGIObject for interface: GUID {7abb6563-02bc-47c4-8ef9-acc4795edbcf}
RENDERDOC:  [15:31:02]     dxgi_wrapped.cpp( 563) - Warning - Querying IDXGIObject for interface: GUID {7abb6563-02bc-47c4-8ef9-acc4795edbcf}
RENDERDOC:  [15:31:05]    win32_process.cpp( 307) - Log     - Injecting renderdoc into process 9420
RENDERDOC:  [15:31:07]     dxgi_wrapped.cpp( 563) - Warning - Querying IDXGIObject for interface: GUID {79d2046c-22ef-451b-9e74-2245d9c760ea}
RENDERDOC:  [15:31:07]     dxgi_wrapped.cpp( 563) - Warning - Querying IDXGIObject for interface: GUID {79d2046c-22ef-451b-9e74-2245d9c760ea}
RENDERDOC:  [15:31:07]     dxgi_wrapped.cpp( 563) - Warning - Querying IDXGIObject for interface: GUID {79d2046c-22ef-451b-9e74-2245d9c760ea}
RENDERDOC:  [15:31:07]     dxgi_wrapped.cpp( 563) - Warning - Querying IDXGIObject for interface: GUID {79d2046c-22ef-451b-9e74-2245d9c760ea}
RENDERDOC:  [15:31:07]     dxgi_wrapped.cpp( 563) - Warning - Querying IDXGIObject for interface: GUID {79d2046c-22ef-451b-9e74-2245d9c760ea}
RENDERDOC:  [15:31:07]     dxgi_wrapped.cpp( 563) - Warning - Querying IDXGIObject for interface: GUID {79d2046c-22ef-451b-9e74-2245d9c760ea}
RENDERDOC:  [15:31:07]     dxgi_wrapped.cpp( 563) - Warning - Querying IDXGIObject for interface: GUID {79d2046c-22ef-451b-9e74-2245d9c760ea}
RENDERDOC:  [15:31:07]     dxgi_wrapped.cpp( 563) - Warning - Querying IDXGIObject for interface: GUID {79d2046c-22ef-451b-9e74-2245d9c760ea}
RENDERDOC:  [15:31:07]     dxgi_wrapped.cpp( 563) - Warning - Querying IDXGIObject for interface: GUID {79d2046c-22ef-451b-9e74-2245d9c760ea}
RENDERDOC:  [15:31:07]     dxgi_wrapped.cpp( 563) - Warning - Querying IDXGIObject for interface: GUID {79d2046c-22ef-451b-9e74-2245d9c760ea}

*Important: This works perfectly for the latest version of renderdoc but not for the version I am using. Any feedback is highly appreciated.

Here's the information from launcher.log in C:\Users\mona\Documents\Rockstar Games\GTA V:

[2017-03-29 18:49:49.168] [DISPLAY] Using DPI 96
[2017-03-29 18:49:49.468] [DISPLAY] File version 10000:3f30001 (for C:\Program Files\Rockstar Games\Grand Theft Auto V\GTA5.exe)
[2017-03-29 18:49:49.778] [DISPLAY] File version 10002:10004 (for C:\Program Files\Rockstar Games\Social Club\socialclub.dll)
[2017-03-29 18:49:50.074] [DISPLAY] File version 10000:3cf0001 (for C:\Program Files\Rockstar Games\Grand Theft Auto V\GTAVLauncher.exe)
[2017-03-29 18:49:50.133] [DISPLAY] Version: 1.0.231.0|1.0.1011.1|1.2.1.4|1.0.975.1|FFP
[2017-03-29 18:49:50.706] [DISPLAY] OS version: Major: 6, Minor: 2, Build: 9200, Platform: 2
[2017-03-29 18:49:50.945] [DISPLAY] File version 10000:3 (for C:\Program Files\Rockstar Games\Grand Theft Auto V\PlayGTAV.exe)
[2017-03-29 18:49:52.184] [DISPLAY] File version 10000:3f30001 (for C:\Program Files\Rockstar Games\Grand Theft Auto V\GTA5.exe)
[2017-03-29 18:49:52.584] [DISPLAY] Opened options file.
[2017-03-29 18:49:52.934] [DISPLAY] File version 10002:10004 (for C:\Program Files\Rockstar Games\Social Club\socialclub.dll)
[2017-03-29 18:49:53.119] [DISPLAY] Social Club initializing...
[2017-03-29 18:49:57.889] [DISPLAY] Attempting to create device...
[2017-03-29 18:49:57.902] [DISPLAY] Attempting to initialise DX9 COM object...
[2017-03-29 18:49:59.017] [DISPLAY] Window size: 690 x 496
[2017-03-29 18:49:59.366] [DISPLAY] Successfully created DX Device!
[2017-03-29 18:50:02.221] [DISPLAY] Geo: US
[2017-03-29 18:50:17.241] [DISPLAY] File version 10000:3f30001 (for C:\Program Files\Rockstar Games\Grand Theft Auto V\GTA5.exe)
[2017-03-29 18:50:28.501] [DISPLAY] In-place download is up-to-date.
[2017-03-29 18:50:29.230] [DISPLAY] Launching game...
[2017-03-29 18:50:29.246] [DISPLAY] (path: C:\Program Files\Rockstar Games\Grand Theft Auto V\GTA5.exe cmdline: "C:\Program Files\Rockstar Games\Grand Theft Auto V\GTA5.exe")
[2017-03-29 18:52:37.162] [WARNING] Device lost.
[2017-03-29 18:52:39.975] [DISPLAY] Reset succeeded.
[2017-03-29 19:01:27.477] [ ERROR ] GameComm: ReadFile failed.
[2017-03-29 19:01:27.840] [DISPLAY] Game exited with code 0xc0000005
[2017-03-29 19:01:27.840] [ ERROR ] Unable to stat out-file!
[2017-03-29 19:01:27.848] [ ERROR ] ************************************************************************
[2017-03-29 19:01:27.848] [ ERROR ] * Setting error condition
[2017-03-29 19:01:27.852] [ ERROR ] * Category:  1 (ERROR_CATEGORY_LAUNCHER)
[2017-03-29 19:01:27.852] [ ERROR ] * Code:     107 (LAUNCHER_ERR_GAME_CRASHED)
[2017-03-29 19:01:27.852] [ ERROR ] * Extra:     
[2017-03-29 19:01:27.852] [ ERROR ] * Localised: Launcher error.  Code: 107 
[2017-03-29 19:01:27.852] [ ERROR ] ************************************************************************
[2017-03-29 19:01:27.868] [ ERROR ] Unable to read out-file!
[2017-03-29 19:01:27.880] [ ERROR ] ************************************************************************
[2017-03-29 19:01:27.880] [ ERROR ] * Setting error condition
[2017-03-29 19:01:27.880] [ ERROR ] * Category:  5 (ERROR_CATEGORY_EXIT_CODE)
[2017-03-29 19:01:27.884] [ ERROR ] * Code:     -1073741819 (c0000005)
[2017-03-29 19:01:27.884] [ ERROR ] * Extra:     
[2017-03-29 19:01:27.884] [ ERROR ] * Localised: Grand Theft Auto V exited unexpectedly.  

Please click Retry below to enter the game again, or click Safe Mode to launch the game with reduced graphics settings.  

If you continue to have problems playing the game, please contact Rockstar Games Customer Service at http://support.rockstargames.com
[2017-03-29 19:01:27.884] [ ERROR ] ************************************************************************
[2017-03-29 19:01:27.903] [ ERROR ] Exit code 0xc0000005 indicates a game crash (STATUS_ACCESS_VIOLATION)
[2017-03-29 19:01:27.920] [ ERROR ] Unable to clear in-file and out-file!
[2017-03-29 19:01:41.501] [DISPLAY] Uninitializing.
0

There are 0 best solutions below