C++ Capture: Target may already have exited.

System info: Debian Unstable 4.19.20-1 (2019-02-12) x86_64

Nsight Graphics version: 2019.2.1.0 (Build 26129631)

I’m hitting a minor issue - I’m unable to connect to a C++ Capture. Many thanks for helping me resolve the issue over in the other post.

Steps to reproduce:

  1. git clone GitHub - ndsol/VolcanoSamples: Volcano sample code to get started with Vulkan. Keep it simple, short and sweet.
  2. cd VolcanoSamples
  3. ./build.cmd

(wait a while, it will clone and build the vulkan loader in out/Debug)

  1. export LD_LIBRARY_PATH=$PWD/out/Debug

(Required to point NVIDIA Nsight to the correct Vulkan loader. Otherwise Nsight will use a different vulkan loader.)

  1. cd ~/nvidia-nsight/host/linux-desktop-nomad-x64
  2. ./nv-nsight-gfx
  3. Connect
  4. Select application executable: $(git repo)/out/Debug/01glfw
  5. Working directory: $(git repo)
  6. Change Activity to “Generate C++ Capture”
  7. Additional Options > Vulkan is set to the defaults:
  • Force validation: No
  • Enable Coherent Buffer Collection: Yes
  • Enable Revision Zero Data Collection: Yes
  • Allow Unsafe pNext Values: No
  • Use Safe Object Lookup: Auto
  • C++ Capture Object Set: Only Active
  • Reserve Heap Space: 0
  • Unweave Threads: No
  1. Click Launch
  2. Hit Ctrl+Z, Space to capture a frame
  3. Export of C++ Capture is complete (100%). Hit OK.
  4. Tool Chain is the default: Linux Desktop gcc
  5. Click the Terminate button at the top to stop the running application
  6. No errors in the console where nv-nsight-gfx was launched back in Step #6
  7. Click Build
  8. Build completes successfully. Here’s the Build Log:
mkdir -p int && cd int && cmake -G Unix\ Makefiles -DNV_INSTALL_FOLDER=bin .. && cmake --build . --config Release --target install -- -j13
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Building 64-bit app.
-- Configuring done
-- Generating done
-- Build files have been written to: CppCaptures/01glfw__2019_05_01__19_02_33/int
Scanning dependencies of target cppcap
[  4%] Building CXX object CMakeFiles/cppcap.dir/FrameReset00.cpp.o
[ 13%] Building CXX object CMakeFiles/cppcap.dir/Frame0Part00.cpp.o
[ 13%] Building CXX object CMakeFiles/cppcap.dir/CommandList00.cpp.o
[ 17%] Building CXX object CMakeFiles/cppcap.dir/Application.cpp.o
[ 21%] Building CXX object CMakeFiles/cppcap.dir/FrameSetup00.cpp.o
[ 26%] Building CXX object CMakeFiles/cppcap.dir/Helpers.cpp.o
[ 30%] Building CXX object CMakeFiles/cppcap.dir/ReadOnlyDatabase.cpp.o
[ 34%] Building CXX object CMakeFiles/cppcap.dir/PerfMarkersSetup.cpp.o
[ 39%] Building CXX object CMakeFiles/cppcap.dir/Main.cpp.o
[ 43%] Building CXX object CMakeFiles/cppcap.dir/ThreadPool.cpp.o
[ 47%] Building CXX object CMakeFiles/cppcap.dir/Resources00.cpp.o
[ 52%] Building CXX object CMakeFiles/cppcap.dir/ReplayProcedures.cpp.o
[ 56%] Building CXX object CMakeFiles/cppcap.dir/PerfMarkersReset.cpp.o
[ 60%] Building CXX object CMakeFiles/cppcap.dir/Threading.cpp.o
[ 65%] Building CXX object CMakeFiles/cppcap.dir/VulkanAllocator.cpp.o
[ 69%] Building CXX object CMakeFiles/cppcap.dir/VulkanBootstrap.cpp.o
[ 73%] Building CXX object CMakeFiles/cppcap.dir/VulkanReplay.cpp.o
[ 78%] Building CXX object CMakeFiles/cppcap.dir/WinResourcesReset.cpp.o
[ 82%] Building CXX object CMakeFiles/cppcap.dir/WinResourcesSetup.cpp.o
[ 86%] Building CXX object CMakeFiles/cppcap.dir/function_overrides.cpp.o
[ 91%] Building CXX object CMakeFiles/cppcap.dir/WindowSystem_Xcb.cpp.o
[ 95%] Building CXX object CMakeFiles/cppcap.dir/LinuxApplication.cpp.o
[100%] Linking CXX executable 01glfw__2019_05_01__19_02_33
[100%] Built target cppcap
Install the project...
-- Install configuration: ""
-- Installing: 01glfw__2019_05_01__19_02_33/bin/01glfw__2019_05_01__19_02_33
  1. Click Execute
  2. The captured frame displays ok
  3. Close the window of the frame-capture
  4. Click “Connect…”
  5. Click Activity > Frame Profiler
  6. Click Launch

It starts running, attempting to connect, then a dialog pops up:

Connection Error

Connection error detected communicating with target application.

Shutting down connection.

Hey Cord,

Thanks for reaching out again! Sorry you ran into another issue.

Thanks for the great repro steps as well!

We will try to get a repro and let you know once we have reproduced the issue!

Thanks,
Seth

---- Internal Reference ----
DG-5000

Hey Cord,

Good news! we were able to fix this issue!

The fix will be available in our 2019.3 release at the end of the month.

In the interim, we do have a workaround: comment out all lines of “VulkanReplay_SetDebugUtilsObjectNameEXT”.

Thanks again for the great bug report!

Cheers,
Seth

Thanks, Seth. Since I’m lazy I just located the definition of VulkanReplay_SetDebugUtilsObjectNameEXT in VulkanReplay.cpp and deleted its contents. I replaced it with ‘return VK_SUCCESS;’.

I’m happily generating C++ captures now. Thanks again.

Wonderful.:) Glad the workaround is working for you!

The proper fix will be out soon…