onnoj / DeusExEchelonRenderer

Fixed-Function Pipeline renderer for Deus Ex (2000), for use with Nvidia's RTX Remix
MIT License
100 stars 2 forks source link

Failed to initialize the low-level renderer. #2

Closed doctashay closed 5 months ago

doctashay commented 6 months ago

Specs: CPU: Intel Core i7 13700H GPU: NVIDIA RTX 4060 Mobile RAM: 32GB DDR5-5200 SSD: Samsung 970 Evo 1TB

Fresh GOG install of Deus Ex. Followed the instructions in the README:

I open DeusEx.exe and select the Echelon renderer. A small white window will open (maybe 800x600) and hang for about 30 seconds before closing with an error: "Failed to initialize the low-level renderer."

This is a laptop with NVIDIA Optimus so at first I was thinking it's defaulting to the Intel GPU but that doesn't seem to be the case, so I'm wondering if there are any other solutions to try. Thanks!

doctashay commented 6 months ago

Just a quick update that this issue persists in fullscreen, windowed or borderless fullscreen.

I am able to get into game with various combinations of the other renderers, although for some configurations, borderless fullscreen is broken.

onnoj commented 6 months ago

Hi, that's unfortunate. Does it create any d3d9.log and DeusEx_d3d9.log files? If so, can you attach them to your report?

Could you also try to temporarily rename d3d9.dll (in the DeusEx's system folder), and then start the game in windowed mode? This should start without RTX enabled, at least that would give an indication where to look for.

I'll probably have to extend the d3d device initialization code a bit, it's missing some boilerplate code to handle with different supported texture and buffer formats and what not, and could probably have some more error logging to see what's up. I won't have time to do so until next week, though.

MamiyaOtaru commented 6 months ago

d3d9.log same issue here. there's my log

Crash dump too, call stack

[Inline Frame] DeusExEchelonRenderer.DLL!std::_Tree_unchecked_const_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<unsigned short const ,unsigned int64>>>,std::_Iterator_base0>::operator++() Line 52 C++ [Inline Frame] DeusExEchelonRenderer.DLL!std::_Tree_unchecked_iterator<std::_Tree_val<std::_Tree_simple_types<std::pair<unsigned short const ,unsigned int64>>>>::operator++() Line 142 C++ DeusExEchelonRenderer.DLL!PLH::VFuncSwapHook::unHook() Line 48 C++ [External Code]

AFAICS that's called from DynamicItemFilter.UninstallFDynamicItemFilterHacks, from UD3D9FPRenderDevice::Exit in uefacade

like that crash being dumped is on exit, after it's already failed to load. That is to say seems like the crash is not related to the failure to load but happens after that, possibly still something that could be fixed in the event the load fails

doctashay commented 6 months ago

Hey there, thanks for the reply.

I went ahead and tried some different steps now that I am back at home on a different computer.

Here are the specs of the different machine I have just used:

CPU: AMD Ryzen 7 5800x GPU: NVIDIA RTX 3070 RAM: 32GB DDR4-3600 SSD: Samsung 980 1TB

Just to clarify, this issue happens on a completely unmodded version of Deus Ex (no GMDX or any other types of changes)

I can confirm (at least on this current machine) that re-naming d3d9.dll and re-launching with Echelon renderer in Windowed mode does allow the game to boot.

edit: Sorry - another clarifying note. I have also tried using the debug and release builds of rtx-remix as made available here: https://github.com/NVIDIAGameWorks/rtx-remix/releases - Both debug and release produce the same results.

Here are the results of my d3d9.log:


[11:33:02.047] info:  Trying to open config file: C:\GOG Games\Deus Ex GOTY\System\.trex\bridge.conf
[11:33:02.052] info:  ==================
[11:33:02.056] info:  NVIDIA RTX Remix Bridge Client
[11:33:02.061] info:  ==================
[11:33:02.066] info:  Version: remix-0.4.1+856260f4
[11:33:02.071] info:  Loaded d3d9.dll from C:\GOG Games\Deus Ex GOTY\System\deusex.exe
[11:33:02.167] info:  DirectInput8 hook attached.
[11:33:02.185] info:  DirectInput hook attached.
[11:33:02.186] info:  Initializing new shared memory object.
[11:33:02.189] info:  Initializing new shared memory object.
[11:33:02.192] info:  Initializing new shared memory object.
[11:33:02.225] info:  Initializing new shared memory object.
[11:33:02.281] info:  Launching server with GUID 9b3d8929-6624-401e-97fb-9cac5e51277f
[11:33:02.282] err:   RegisterExitCallback() failed with error code 87
[11:33:02.282] info:  Process set as DPI aware
[11:33:02.282] info:  Sending SYN command, waiting for ACK from server...
[11:33:35.300] err:   Timeout. Connection not established to server.
[11:33:35.300] err:   Are you sure the server was invoked by this application and is running?
[11:33:35.300] info:  Creating a NON thread-safe D3D9 device.
[11:33:36.300] err:   ...server-side D3D9 device creation failed with: no response from server.
[11:33:36.808] info:  Creating a NON thread-safe D3D9 device.
[11:33:37.800] err:   ...server-side D3D9 device creation failed with: no response from server.
[11:33:38.302] info:  Creating a NON thread-safe D3D9 device.
[11:33:39.300] err:   ...server-side D3D9 device creation failed with: no response from server.
[11:33:39.802] info:  Creating a NON thread-safe D3D9 device.
[11:33:40.800] err:   ...server-side D3D9 device creation failed with: no response from server.
[11:33:41.305] info:  Creating a NON thread-safe D3D9 device.
[11:33:42.300] err:   ...server-side D3D9 device creation failed with: no response from server.

edit: formatting
doctashay commented 6 months ago

Sorry but an additional comment here because I think this might have been user error.

In both of my development environments, I made the mistake of not including the .trex folder from the RTX Remix archive. I made the mistake of thinking this was some metadata file not necessary for remix to work, but after including the .trex folder, I received audio in game and a warning about a debug exception (I didn't screenshot it, but it was something like "HRESULT = success"

After replacing my RTX Remix binaries with release versions, I am now able to boot into game successfully. I have not tested this on my other machine, but since I was setting up the environments in the same way, it is likely that omitting the .trex folder was the issue.

TL;DR: MAKE SURE TO COPY THE .trex FOLDER FROM THE RTX REMIX BINARY OTHERWISE IT WON'T WORK

MamiyaOtaru commented 6 months ago

I do have the .trex folder in there. Which version of remix did you switch to (URL for my dumb self pls) would love to see if I can replicate

doctashay commented 6 months ago

I do have the .trex folder in there. Which version of remix did you switch to (URL for my dumb self pls) would love to see if I can replicate

I used the RTX Remix archive at this link:

https://github.com/NVIDIAGameWorks/rtx-remix/releases/download/remix-0.4.1/remix-0.4.1-release.zip

The only thing I did was make sure the .trex folder from this release was in the System folder, just like the rest of the files from this repo and Deus Exe. Immediately after adding it, the game began to boot.

I am now back on my laptop (thanks to night shift free time!) and I can confirm that moving the .trex folder from this archive into the System folder resolved my issue on this machine as well.

It's worth mentioning that, compared to my other machine, all display modes (windowed, fullscreen, borderless) are now working properly. On my other machine, adding the .trex folder solved the booting issues, but did not solve the issues with fullscreen borderless, which still does not work properly.

Probably not incredibly helpful since this is just waiting for an ack from the game, but here is my updated d3d9.log:

[00:35:40.581] info:  Trying to open config file: C:\GOG Games\Deus Ex GOTY\System\.trex\bridge.conf
[00:35:40.581] info:  ==================
[00:35:40.581] info:  NVIDIA RTX Remix Bridge Client
[00:35:40.581] info:  ==================
[00:35:40.583] info:  Version: remix-0.4.1+856260f4
[00:35:40.583] info:  Loaded d3d9.dll from C:\GOG Games\Deus Ex GOTY\System\deusex.exe
[00:35:40.668] info:  DirectInput8 hook attached.
[00:35:40.676] info:  DirectInput hook attached.
[00:35:40.676] info:  Initializing new shared memory object.
[00:35:40.677] info:  Initializing new shared memory object.
[00:35:40.679] info:  Initializing new shared memory object.
[00:35:40.709] info:  Initializing new shared memory object.
[00:35:40.755] info:  Launching server with GUID eab463d8-1091-4ffc-b597-4ab867206be9
[00:35:40.760] info:  Process set as DPI aware
[00:35:40.761] info:  Sending SYN command, waiting for ACK from server...
[00:35:41.059] info:  Ack received! Handshake completed! Telling server to continue waiting for commands...
[00:35:41.059] info:  Creating a NON thread-safe D3D9 device.
[00:35:42.363] info:  Client window became active, reenabling timeouts for bridge client...
[00:35:42.541] info:  Message channel UWM_REMIX_BRIDGE_REGISTER_THREADPROC_MSG handshake complete.
[00:35:42.543] info:  Remix UI deactivated.
[00:35:46.271] info:  Client window became inactive, disabling timeouts for bridge client...
[00:35:46.406] info:  About to unload bridge client.
[00:35:46.407] info:  Sending Terminate command to server...
[00:35:46.423] info:  Server notified that it has cleanly terminated. Cleaning up.
[00:35:46.617] info:  Most recent Device Queue commands sent from Client
[00:35:46.617] info:  Command sent: Terminate
[00:35:46.617] info:  Command sent: IDirect3DVertexBuffer9_Destroy
[00:35:46.617] info:  Command sent: IDirect3DVertexBuffer9_Destroy
[00:35:46.617] info:  Command sent: IDirect3DVertexBuffer9_Destroy
[00:35:46.617] info:  Command sent: IDirect3DVertexBuffer9_Destroy
[00:35:46.617] info:  Command sent: IDirect3DVertexBuffer9_Destroy
[00:35:46.617] info:  Command sent: IDirect3DVertexBuffer9_Destroy
[00:35:46.617] info:  Command sent: IDirect3DVertexBuffer9_Destroy
[00:35:46.617] info:  Command sent: IDirect3DVertexBuffer9_Destroy
[00:35:46.617] info:  Command sent: IDirect3DVertexBuffer9_Destroy
[00:35:46.617] info:  Most recent Device Queue commands received by Server
[00:35:46.617] info:  Command received: Terminate
[00:35:46.617] info:  Command received: IDirect3DVertexBuffer9_Destroy
[00:35:46.618] info:  Command received: IDirect3DVertexBuffer9_Destroy
[00:35:46.618] info:  Command received: IDirect3DVertexBuffer9_Destroy
[00:35:46.618] info:  Command received: IDirect3DVertexBuffer9_Destroy
[00:35:46.618] info:  Command received: IDirect3DVertexBuffer9_Destroy
[00:35:46.618] info:  Command received: IDirect3DVertexBuffer9_Destroy
[00:35:46.618] info:  Command received: IDirect3DVertexBuffer9_Destroy
[00:35:46.618] info:  Command received: IDirect3DVertexBuffer9_Destroy
[00:35:46.618] info:  Command received: IDirect3DVertexBuffer9_Destroy
[00:35:46.618] info:  Most recent Module Queue commands sent from Client
[00:35:46.618] info:  Command sent: IDirect3D9Ex_CreateDevice
[00:35:46.618] info:  Most recent Module Queue commands received by Server
[00:35:46.618] info:  Command received: IDirect3D9Ex_CreateDevice
[00:35:46.619] info:  Shutdown cleanup successful, exiting now!
[00:35:46.619] info:  DirectInput8 hook detached.
[00:35:46.619] info:  DirectInput hook detached.
[00:35:46.619] info:  [Uptime]: 5s
onnoj commented 5 months ago

Closing the issue, as it was caused by a missing .trex file. @MamiyaOtaru, please create a new issue if you still have the problem with the latest version.