UE4Editor under Nsight Graphics (Solved)

I am trying to run UE4Editor under Nsight Graphics but the editor keeps crashing when dlopen’ing the nvidia-glcore library:

Thread 1 "UE4Editor-Linux" received signal SIGSEGV, Segmentation fault.
-----------------------------------------------------------------------------------------------------------------------[regs]
  RAX: 0x00007FFDC2919000  RBX: 0x00007FFDC2B70C58  RBP: 0x0000000000000020  RSP: 0x00007FFFFFFF9A58  o d I t s Z a P c 
  RDI: 0x00007FFDC2919000  RSI: 0x00007FFFFFFF9A70  RDX: 0x0000000000000020  RCX: 0x0000000000000001  RIP: 0x00007FFFE4FF7AFA
  R8 : 0x00007FFDC2B87558  R9 : 0x0000000000000000  R10: 0x00007FFFF7FFD040  R11: 0x00007FFDCD2FDB60  R12: 0x00007FFFFFFF9A70
  R13: 0x0000000000000001  R14: 0x00007FFDC2919000  R15: 0x0000000000000020
  CS: 0033  DS: 0000  ES: 0000  FS: 0000  GS: 0000  SS: 002B				
-----------------------------------------------------------------------------------------------------------------------[code]
=> 0x7fffe4ff7afa <__memmove_avx_unaligned+330>:	vmovdqu XMMWORD PTR [rdi],xmm0
   0x7fffe4ff7afe <__memmove_avx_unaligned+334>:	vmovdqu XMMWORD PTR [rdi+0x10],xmm1
   0x7fffe4ff7b03 <__memmove_avx_unaligned+339>:	vmovdqu XMMWORD PTR [rdi+rdx*1-0x20],xmm6
   0x7fffe4ff7b09 <__memmove_avx_unaligned+345>:	vmovdqu XMMWORD PTR [rdi+rdx*1-0x10],xmm7
   0x7fffe4ff7b0f <__memmove_avx_unaligned+351>:	ret    
   0x7fffe4ff7b10 <__memmove_avx_unaligned+352>:	vmovdqu xmm0,XMMWORD PTR [rsi]
   0x7fffe4ff7b14 <__memmove_avx_unaligned+356>:	vmovdqu xmm7,XMMWORD PTR [rsi+rdx*1-0x10]
   0x7fffe4ff7b1a <__memmove_avx_unaligned+362>:	vmovdqu XMMWORD PTR [rdi],xmm0
-----------------------------------------------------------------------------------------------------------------------------
__memmove_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:118
118	../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S: No such file or directory.
gdb$ bt
#0  __memmove_avx_unaligned () at ../sysdeps/x86_64/multiarch/memcpy-avx-unaligned.S:118
#1  0x00007ffdcd2fdb29 in ?? () from /usr/lib/nvidia-396/libnvidia-glcore.so.396.44
#2  0x00007ffdcd2fdc5a in ?? () from /usr/lib/nvidia-396/libnvidia-glcore.so.396.44
#3  0x00007ffdc289e6a2 in ?? () from /usr/lib/nvidia-396/libGL.so.1
#4  0x00007ffff7de767a in call_init (l=0x4fecb0, argc=argc@entry=0x2, argv=argv@entry=0x7fffffffdaf8, env=env@entry=0x3a40d0) at dl-init.c:58
#5  0x00007ffff7de77cb in call_init (env=0x3a40d0, argv=0x7fffffffdaf8, argc=0x2, l=<optimised out>) at dl-init.c:30
#6  _dl_init (main_map=main_map@entry=0x4fecb0, argc=0x2, argv=0x7fffffffdaf8, env=0x3a40d0) at dl-init.c:120
#7  0x00007ffff7dec8e2 in dl_open_worker (a=a@entry=0x7fffffffa240) at dl-open.c:575
#8  0x00007ffff7de7564 in _dl_catch_error (objname=objname@entry=0x7fffffffa230, errstring=errstring@entry=0x7fffffffa238, mallocedp=mallocedp@entry=0x7fffffffa22f, operate=operate@entry=0x7ffff7dec4d0 <dl_open_worker>, args=args@entry=0x7fffffffa240) at dl-error.c:187
#9  0x00007ffff7debda9 in _dl_open (file=0x7fffeb959912 "libGL.so.1", mode=0x80000102, caller_dlopen=0x7ffff67863bb <dlopen+107>, nsid=0xfffffffffffffffe, argc=<optimised out>, argv=<optimised out>, env=0x3a40d0) at dl-open.c:660
#10 0x00007fffe4a90f09 in dlopen_doit (a=a@entry=0x7fffffffa470) at dlopen.c:66
#11 0x00007ffff7de7564 in _dl_catch_error (objname=0x320830, errstring=0x320838, mallocedp=0x320828, operate=0x7fffe4a90eb0 <dlopen_doit>, args=0x7fffffffa470) at dl-error.c:187
#12 0x00007fffe4a91571 in _dlerror_run (operate=operate@entry=0x7fffe4a90eb0 <dlopen_doit>, args=args@entry=0x7fffffffa470) at dlerror.c:163
#13 0x00007fffe4a90fa1 in __dlopen (file=<optimised out>, mode=<optimised out>) at dlopen.c:87
#14 0x00007ffff67863bb in dlopen () from /usr/local/NVIDIA-Nsight-Graphics_2018.4.1.18237/target/linux-desktop-nomad-glx-x64/libNvda.Graphics.Interception.so
#15 0x00007fffeb894ce9 in X11_GL_LoadLibrary (_this=0x4e1e50, path=0x7fffeb959912 "libGL.so.1") at /home/bschaefer/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/src/video/x11/SDL_x11opengl.c:164
#16 0x00007fffeb81c604 in SDL_GL_LoadLibrary_REAL (path=0x0) at /home/bschaefer/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/src/video/SDL_video.c:2947
#17 0x00007fffeb81876d in SDL_CreateWindow_REAL (title=0x7fffeb94be9e "OpenGL test", x=0xffffffe0, y=0xffffffe0, w=0x20, h=0x20, flags=0xa) at /home/bschaefer/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/src/video/SDL_video.c:1409
#18 0x00007fffeb815a31 in ShouldUseTextureFramebuffer () at /home/bschaefer/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/src/video/SDL_video.c:228
#19 0x00007fffeb816754 in SDL_VideoInit_REAL (driver_name=0x0) at /home/bschaefer/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/src/video/SDL_video.c:562
#20 0x00007fffeb839d04 in SDL_InitSubSystem_REAL (flags=0x107221) at /home/bschaefer/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/src/SDL.c:170
#21 0x00007fffeb839e0e in SDL_Init_REAL (flags=0x107221) at /home/bschaefer/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/src/SDL.c:241
#22 0x00007fffeb7c4894 in SDL_Init (a=0x107221) at /home/bschaefer/UnrealEngine/Engine/Source/ThirdParty/SDL2/SDL-gui-backend/src/dynapi/SDL_dynapi_procs.h:83
#23 0x00007fffeb789c23 in FLinuxPlatformApplicationMisc::InitSDL () at /home2/danyd/C++/UnrealEngine/Engine/Source/Runtime/ApplicationCore/Private/Linux/LinuxPlatformApplicationMisc.cpp:283
#24 0x00007fffeb787f31 in FDisplayMetrics::GetDisplayMetrics (OutDisplayMetrics=...) at /home2/danyd/C++/UnrealEngine/Engine/Source/Runtime/ApplicationCore/Private/Linux/LinuxApplication.cpp:1427
#25 0x00007ffff039a783 in UGameEngine::DetermineGameWindowResolution (ResolutionX=@0x7fffffffb58c: 0x690, ResolutionY=@0x7fffffffb588: 0x41a, WindowMode=@0x7fffffffb584: EWindowMode::WindowedFullscreen, bUseWorkAreaForWindowed=0x0) at /home2/danyd/C++/UnrealEngine/Engine/Source/Runtime/Engine/Private/GameEngine.cpp:307
#26 0x00007ffff039a62e in UGameEngine::ConditionallyOverrideSettings (ResolutionX=@0x7fffffffb58c: 0x690, ResolutionY=@0x7fffffffb588: 0x41a, WindowMode=@0x7fffffffb584: EWindowMode::WindowedFullscreen) at /home2/danyd/C++/UnrealEngine/Engine/Source/Runtime/Engine/Private/GameEngine.cpp:288
#27 0x00007ffff043e103 in UGameUserSettings::RequestResolutionChange (InResolutionX=0x690, InResolutionY=0x41a, InWindowMode=EWindowMode::WindowedFullscreen, bInDoOverrides=0x1) at /home2/danyd/C++/UnrealEngine/Engine/Source/Runtime/Engine/Private/GameUserSettings.cpp:559
#28 0x00007ffff043eca6 in UGameUserSettings::PreloadResolutionSettings () at /home2/danyd/C++/UnrealEngine/Engine/Source/Runtime/Engine/Private/GameUserSettings.cpp:640
#29 0x00000000002698ae in FEngineLoop::PreInit (this=0x2af3e0 <GEngineLoop>, CmdLine=0x7ffdce5b9880 L" \"/home2/danyd/work/Game/Final 4.20/Final.uproject\"") at /home2/danyd/C++/UnrealEngine/Engine/Source/Runtime/Launch/Private/LaunchEngineLoop.cpp:1571
#30 0x0000000000266422 in EnginePreInit (CmdLine=0x7ffdce5b9880 L" \"/home2/danyd/work/Game/Final 4.20/Final.uproject\"") at /home2/danyd/C++/UnrealEngine/Engine/Source/Runtime/Launch/Private/Launch.cpp:42
#31 0x0000000000273185 in GuardedMain (CmdLine=0x7ffdce5b9880 L" \"/home2/danyd/work/Game/Final 4.20/Final.uproject\"") at /home2/danyd/C++/UnrealEngine/Engine/Source/Runtime/Launch/Private/Launch.cpp:127
#32 0x00007fffe5482956 in CommonUnixMain (argc=0x2, argv=0x7fffffffdaf8, RealMain=0x273160 <GuardedMain(wchar_t const*)>) at /home2/danyd/C++/UnrealEngine/Engine/Source/Runtime/Unix/UnixCommonStartup/Private/UnixCommonStartup.cpp:241
#33 0x000000000027dd5c in main (argc=0x2, argv=0x7fffffffdaf8) at /home2/danyd/C++/UnrealEngine/Engine/Source/Runtime/Launch/Private/Unix/LaunchUnix.cpp:25

I run with LD_PRELOAD set to /usr/local/NVIDIA-Nsight-Graphics_2018.4.1.18237/target/linux-desktop-nomad-glx-x64/libNvda.Graphics.Interception.so

Has anyone managed to run UE4Editor 4.20.1 under Nsight Graphics 2018.4.1.18237 with any success?

Any hints as to what I might be doing wrong?

TIA

Cheers
Dan

Hi,

Could you please provide more information:

  • OS
  • Driver
  • GPU model

Can you also try launching the application directly in Nsight Graphics without setting LD_PRELOAD?

Hi,

Thanks for your prompt reply.

OS: Ubuntu 16.04LTS. Always up to date with latest supported software
Driver: NVIDIA binary driver - version 396.44 from nvidia-396 (proprietary)
GPU model: GeForce GTX 950

I did try launching the application via Nsight Graphics without setting LD_PRELOAD, that’s how I worked out what LD_PRELOAD (and LD_LIBRARY_PATH) should be.

Identical failed results.

I’ve tried Nsight Graphics 1.2 and 2018.4 as well as Linux Graphics Debugger version 2.3. They all fail in similar ways.

Hi,

I tried latest UE4Editor 4.20.2, launch and capture work fine on Nsight Graphics 2018.4.
My environment:
Ubuntu 16.04LTS, GT 1030, 390.67

I guess the issue is driver related, could you please try removing your proprietary driver and install the latest Linux driver downloaded from Nvidia official website? (*.run file)

Thanks.

Thanks very much codym_nv, that was the problem.

Among the downloads for the NVIDIA Nsight Graphics 2018.4 there is a “Generic [390.77 Linux]” .run file.

I used the instructions found at [url]software installation - how to install NVIDIA.run on Mint 18.3? - Unix & Linux Stack Exchange which though meant to be specific to Mint 18.3, worked perfectly for Ubuntu 16.04LTS

While running NVIDIA-Linux-x86_64-390.77.run, it detected that I had nvidia-390 installed through the package manager at which point it gave me the option to abort the installation and indicated how to remove the existing nvidia-390 drivers.

I aborted the installation, uninstalled the nvidia-390, nvidia-modprobe and nvidia-settings packages as indicated, then restarted NVIDIA-Linux-x86_64-390.77.run, followed the various steps and then I rebooted.

All working well now and I can run UE4Editor under Nsight Graphics.

Cheers
Dan