Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quake 2 RTX dedicated server executable issues #86

Closed
j-boers-13 opened this issue Oct 9, 2020 · 3 comments
Closed

Quake 2 RTX dedicated server executable issues #86

j-boers-13 opened this issue Oct 9, 2020 · 3 comments

Comments

@j-boers-13
Copy link

I'm constantly getting crashes in dedicated server for co-op multiplayer

I am trying to play quake 2 RTX campaign on a dedicated server, but it crashes during gameplay after one or two levels, consistently and on two different systems.
The first system has a Nvidia RTX 2070 Super and a i7 7700k 16gb RAM. The same also happened on a Ryzen 3700X with a RTX 2080 Super 16gb RAM.

I followed the steps at this link:
https://www.nvidia.com/content/dam/en-zz/Solutions/geforce/news/quake-ii-rtx-june-6-release-date/Quake-II-RTX-Getting-Started.pdf

But i changed my server.cfg to be:

set password lol
set rcon_password test
set deathmatch 0
set dmflags "16776"
set coop 1
map base1

Perhaps there is an issue with this config file, below I will include the crash report.

Crash report:

Crash report generated Oct 9 2020, 14:10:41 UTC
by q2rtxded 1.3.0-711e686, built Dec 20 2019, 14:48:57

Windows version: 6.2 (build 9200) 

Loaded modules:
0x00007ff72d2b0000 0x00007ff72d558000 q2rtxded (version 1.3.0.0, symbols PDB)
0x00007fffbbe70000 0x00007fffbc065000 ntdll (version 6.2.19041.488, symbols export)
0x00007fffbb220000 0x00007fffbb2dd000 KERNEL32 (version 6.2.19041.292, symbols export)
0x00007fffb9b70000 0x00007fffb9e37000 KERNELBASE (version 6.2.19041.488, symbols export)
0x00007fffbb590000 0x00007fffbb5fb000 WS2_32 (version 6.2.19041.1, symbols export)
0x00007fffbb460000 0x00007fffbb584000 RPCRT4 (version 6.2.19041.508, symbols export)
0x00007fffba5c0000 0x00007fffba760000 USER32 (version 6.2.19041.488, symbols export)
0x00007fffb9ea0000 0x00007fffb9ec2000 win32u (version 6.2.19041.508, symbols export)
0x00007fffb9f50000 0x00007fffb9f7a000 GDI32 (version 6.2.19041.1, symbols export)
0x00007fffb9750000 0x00007fffb9859000 gdi32full (version 6.2.19041.508, symbols export)
0x00007fffb2a20000 0x00007fffb2a47000 WINMM (version 6.2.19041.1, symbols export)
0x00007fffb96b0000 0x00007fffb974d000 msvcp_win (version 6.2.19041.488, symbols export)
0x00007fffbb3b0000 0x00007fffbb44e000 msvcrt (version 7.0.19041.1, symbols export)
0x00007fffb9860000 0x00007fffb9960000 ucrtbase (version 6.2.19041.488, symbols export)
0x00007fffba3f0000 0x00007fffba519000 ole32 (version 6.2.19041.153, symbols export)
0x00007fffb9fe0000 0x00007fffba335000 combase (version 6.2.19041.508, symbols export)
0x00007fffba340000 0x00007fffba3ea000 ADVAPI32 (version 6.2.19041.1, symbols export)
0x00007fffbae10000 0x00007fffbaeab000 sechost (version 6.2.19041.388, symbols export)
0x00007fffbb6e0000 0x00007fffbbe21000 SHELL32 (version 6.2.19041.488, symbols export)
0x00007fffba760000 0x00007fffba790000 IMM32 (version 6.2.19041.1, symbols export)
0x00007fffb8da0000 0x00007fffb8e0a000 mswsock (version 6.2.19041.423, symbols export)
0x00007fff7a980000 0x00007fff7aae1000 gamex86_64 (version 1.3.0.0, symbols export)
0x00007fff94e80000 0x00007fff95064000 dbghelp (version 6.2.19041.488, symbols export)
0x00007fffb3220000 0x00007fffb322a000 version (version 6.2.19041.1, symbols export)
0x00007fffb9630000 0x00007fffb96af000 bcryptPrimitives (version 6.2.19041.264, symbols export)

Exception information:
Code: 0xc0000005
Address: 0x0000000000000000 (unknown)

Thread context:
RIP: 0x0000000000000000 RBP: 0x0000000000000100 RSP: 0x0000004e0d11ead8
RAX: 0x000001a5b5538360 RBX: 0x000001a5b54c6300 RCX: 0x000001a5b54c6300
RDX: 0x00007e59c5285498 RSI: 0x0000000000000000 RDI: 0x000001a5b5538360
R8 : 0xfffffffffffd7e60 R9 : 0x5e716473726d6e6c R10: 0xfefefefefefefeff
R11: 0x8080808080808080 R12: 0x0000004e0d11eca8 R13: 0x0000000000000001
R14: 0x000001a5b57dfd20 R15: 0x0000004e0d11ec9c

Stack trace:
0: 0x0000000000000000 0x0000000000000000 0x0000004e0d11eca8 0x00007fff7a9daa8c 0x0000000000000000
1: 0x0000000000000001 0x0000000000000010 0x0000000000000000 0x0000000000000000 gamex86_64!0x00007fff7a98af4d
2: 0x000001a5b5538360 0x0000000000000000 0x0000000000000000 0x000001a5b54c6300 gamex86_64!0x00007fff7a990c27
3: 0x0000004e00000000 0x000001a5b5538360 0x000001a5b5538360 0x0000004e0d11ef50 gamex86_64!0x00007fff7a9912cd
4: 0x0000000042080000 0x0000000000000000 0x0000000000000000 0x0000000000000000 gamex86_64!0x00007fff7a9b3385
5: 0x000001a5b5538360 0x0000000000000000 0x0000000000000000 0x0000000000000000 gamex86_64!0x00007fff7a9b3da4
6: 0x000001a5b5538360 0x0000004e0d11efa9 0x000000000000002a 0x0000000000000000 gamex86_64!0x00007fff7a9a2aa9
7: 0x000001a5b55371e0 0x000001a5b54aa060 0x00007fff7aaaf1e0 0x0000000000000000 gamex86_64!0x00007fff7a9c7c57
8: 0x000001a5b54aa060 0x0000000000000000 0x0000000000000000 0x00003e601fbde325 gamex86_64!0x00007fff7a9a31f0
9: 0x00007ff72d2f1060 0x00007fff7a9a493b 0x0000000000000000 0x0000000000000000 gamex86_64!0x00007fff7a9a6154
10: 0x000001a5b5538360 0x0000000000000208 0x000000000000ffff 0x000000000000018c gamex86_64!0x00007fff7a9a4dfb
11: 0x000001a5b57700a0 0x000000000000004e 0x0000000000000000 0x0000000000000000 gamex86_64!0x00007fff7a99b284
12: 0x0000000000000000 0x0000000000000000 0x000001a5b3adb380 0x0000000000000000 q2rtxded!SV_Frame+0x000001f1
13: 0x0000000000000003 0x000001a5b3adb380 0x0000000000000003 0x0000000000000000 q2rtxded!Qcommon_Frame+0x000000dd
14: 0x00007ff72d43f82c 0x0000000000000000 0x0000000000000000 0x0000000000000000 q2rtxded!main+0x000000c5
15: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 q2rtxded!__scrt_common_main_seh+0x0000010c
16: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 KERNEL32!0x00007fffbb236fd4
17: 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 ntdll!0x00007fffbbebcec1
apanteleev added a commit that referenced this issue Oct 10, 2020
Under the right conditions - cooperative game, friendly fire disabled through dmflags - a soldier accidentally shooting a corpse (misc_deadsoldier) caused that corpse to try and fight back. But corpses don't have any AI functions assigned, so that caused the server to execute code at null address.

More technically, the T_Damage function is called with targ=dead and attacker=monster. The "friendly fire avoidance" code sets damage=0. Then the "do the damage" code is skipped because of that, and the function continues to execute assuming that the target is alive, and calls M_ReactToDamage on it. That function calls FoundTarget and HuntTarget, and the latter crashes.

I'm not entirely certain that this is the right way to fix this, or skipping the call to T_Damage on zero damage would be better. That would prevent pointless monster infights in no-friendly-fire mode. Or is it better to still allow monster infights when friendly fire is disabled?
@apanteleev
Copy link
Collaborator

Fixed in 4132eed.

See the notes to the commit - looks like you've found a very specific combination of settings to hit this bug, which was probably there since the original Q2.

The change that I made prevents the crash, but it's still unclear what should be done with monster infighting in coop with no friendly fire. Currently, monsters can just be stuck in a loop shooting each other with no damage.

@j-boers-13
Copy link
Author

Interesting, after doing more testing it seems as though the original game (through steam) also has this issue, so just hosting through quake 2 without the RTX server executable, it still crashes. I have also tried a few other dmflags, which seem to have the same issue.

Thanks for the quick response, hope this extra info could be of use in the future

I'll definitely test this commit, will it be available through steam, nvidia website, or just through GH?

@apanteleev
Copy link
Collaborator

For now, just through github. But here's a binary game DLL for you with the fix, it should work with the official 1.3.0 release:

gamex86_64.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants