![]() |
|
#1
|
|||
|
I recently got a new machine running the Nvidia 570 driver (latest driver versions were not any more stable). I was having issues with frequent graphics freeze during game and also crashes while zoning.
That was about two months ago. I found one change which fixed all crashes, and after applying the following fix, I have not had a single crash since then. So, I'm sure this fixed the problem for me. I traced the crash down to the way EQ loads textures into VRAM. The eqgame.exe executable was compiled without the large-address-aware bit set, so as a 32-bit application it gets 2GB of virtual address space. Zoning loads a large burst of textures, fragmenting that address space, until the point where small allocations fail due to a lack of contiguous blocks of memory. Some drivers (like Intel) allow memory oversubscription and transparently page that into system RAM, whereas the Nvidia driver is allocating real VRAM constrained within the small address space. So, to fix the problem, I patched the binary to be large-address-aware, providing more addressable VRAM space for textures. Obviously, keep a backup of your original eqgame.exe before modifying it. I am running Xubuntu 24.04, but this fix should apply to any OS (since VRAM allocation is handled at the driver level). Solution: Code:
###################################################
# Getting EQ Working under nvidia-driver-570-open #
###################################################
(1) Create Large-Address-Aware EXE patch script (patch_exe_large_address_aware.py)
#!/usr/bin/env python
import sys, mmap, struct
fpath = sys.argv[1]
with open(fpath, "r+b") as f:
mm = mmap.mmap(f.fileno(), 0)
pe = struct.unpack_from("<I", mm, 0x3C)[0]
off = pe + 4 + 18
flags = struct.unpack_from("<H", mm, off)[0]
flags |= 0x20
struct.pack_into("<H", mm, off, flags)
mm.flush()
mm.close()
(2) Patch eqgame.exe to set the Large-Address aware flag
cp EverQuest/eqgame.exe EverQuest/eqgame.exe.orig_large_address_unaware
./patch_exe_large_address_aware.py EverQuest/eqgame.exe
# Check. Requires llvm
llvm-readobj --file-headers EverQuest/eqgame.exe | grep IMAGE_FILE_LARGE_ADDRESS_AWARE
(3) Check hashes
$ md5sum EverQuest/eqgame.exe.orig_large_address_unaware
a9de1b8cc5c451b32084656fcacf1103 EverQuest/eqgame.exe.orig_large_address_unaware
$ md5sum EverQuest/eqgame.exe
877af338054ae70b5bbbbf96953affdc EverQuest/eqgame.exe
- Memory fragmentation causes during-gameplay screen freezes and zoning crashes with some drivers - Patching the executable file to enable the large-address aware bit makes more VRAM available for those textures - I went from crashing 1 out of 3 times zoning (or graphics freeze every hour or two) down to zero crashes/freezes in two months. I didn't make any other changes, so i know this is the change that fixed it. Just wanted to share. Hope that helps someone. Ruien | ||
|
Last edited by Ruien; 05-05-2026 at 01:36 PM..
| |||
![]() |
|
|