Jarcho / d2-rs

Diablo 2 mods and tools
Apache License 2.0
27 stars 5 forks source link

D2FPS will not allow Game.exe to end #1

Closed malvarenga123 closed 10 months ago

malvarenga123 commented 10 months ago

Both with D2GL or D2DX, when using D2FPS Game.exe won't close after you quit the game. You are forced to kill the process manually using task manager.

Log:

Attaching D2fps...
Loaded config:
  fps: 0
  bg-fps: 25
  features: [`menu fps`, `game fps`, `motion smoothing`, `arcane background`, `animation rate fixes`, `weather smoothing`]
  reapply-patches: true
  integrity-checks: true
Detected game version: v1.13c
Applied feature `menu fps`
Applied feature `game fps`
Applied feature `motion smoothing`
Applied feature `arcane background`
Applied feature `animation rate fixes`
Applied feature `weather smoothing`
Loaded modules:
  E:\Games\Diablo II\Game.exe (v1.0.13.60)
  E:\Games\Diablo II\Storm.dll (v1999.11.18.1)
  E:\Games\Diablo II\Fog.dll
  E:\Games\Diablo II\D2Win.dll
  E:\Games\Diablo II\D2sound.dll
  E:\Games\Diablo II\D2gfx.dll
  E:\Games\Diablo II\D2CMP.dll
  E:\Games\Diablo II\D2Lang.dll
  E:\Games\Diablo II\ijl11.dll (v1.1.2.16)
  E:\Games\Diablo II\D2MCPClient.dll
  E:\Games\Diablo II\D2Glide.dll
  E:\Games\Diablo II\smackw32.dll (v3.0.0.0)
  E:\Games\Diablo II\binkw32.dll (v3.0.0.0)
  E:\Games\Diablo II\glide3x.dll (v1.3.3.0)
  E:\Games\Diablo II\d2client.dll
  E:\Games\Diablo II\D2Common.dll
  E:\Games\Diablo II\D2Game.dll
  E:\Games\Diablo II\D2Net.dll
  E:\Games\Diablo II\d2fps.dll (v1.0.0.0)
Detected monitor fps: 60000/1001
Reapplying all patches

OS: Windows 7 x64

Let me know if you need more info.

Jarcho commented 10 months ago

I've never seen that happen before. Might be a win7 thing. I assume you've tried both d2gl and d2dx without f2fps loaded?

I'll upload a couple of different versions for you to try and see if I can narrow this down.

malvarenga123 commented 10 months ago

I assume you've tried both d2gl and d2dx without f2fps loaded?

I did, and Game.exe always closes normally without d2fps.

malvarenga123 commented 10 months ago

I don't know if it will help, but using D2GL there's an error in the log file:

Using D2FPS:

== D2GL v1.3.3 logging started. (2024/1/14) ==

[12:36:21][INFO] Renderer Api: Glide
[12:36:21][INFO] Diablo 2 LoD (English) version 1.13c detected.
[12:36:21][INFO] Windows version 6.1 (build: 7601) detected.
[12:36:21][INFO] Loading early DLLs.
[12:36:21][INFO] d2fps.dll loaded and stdcall _Init@0 function called.
[12:36:21][ERROR] Offset: d2win.dll, 100891(0x00018A1B), 0(0x00000000). Original bytes are not equal: 0x90909090 != 0x2881FF18
[12:36:21][ERROR] Offset: d2win.dll, 100963(0x00018A63), 0(0x00000000). Original bytes are not equal: 0x0000000F != 0x50FF15C8
[12:36:21][INFO] Game requested screen size: 640 x 480
[12:36:21][INFO] Window style switched to dark mode.
[12:36:21][INFO] Switched to windowed mode: 1600 x 900
[12:36:21][INFO] OpenGL: 4.6 (AMD Radeon R9 200 / HD 7900 Series | ATI Technologies Inc.)
[12:36:21][INFO] OpenGL: Shading Language: 4.6
[12:36:21][INFO] OpenGL: GL_MAX_TEXTURE_IMAGE_UNITS = 32
[12:36:21][INFO] OpenGL: GL_KHR_debug enabled!
[12:36:21][INFO] OpenGL: Independent blending available.
[12:36:21][ERROR] File (MPQ): "data\assets\atlases\eng.txt" could not opened!
[12:36:21][INFO] Loading late DLLs.
[12:36:21][INFO] SGD2FreeRes.dll loaded.
[12:36:22][INFO] Applying custom size.
[12:36:22][INFO] Game requested screen size: 800 x 600
[12:36:22][INFO] Game requested screen size: 640 x 480
[12:36:27][INFO] Applying custom size.
[12:36:27][INFO] Game requested screen size: 800 x 600
[12:36:31][INFO] Applying custom size.
[12:36:31][INFO] Game requested screen size: 1068 x 600
[12:36:43][INFO] Applying custom size.
[12:36:43][INFO] Game requested screen size: 800 x 600

Without D2FPS:

== D2GL v1.3.3 logging started. (2024/1/14) ==

[12:37:56][INFO] Renderer Api: Glide
[12:37:56][INFO] Diablo 2 LoD (English) version 1.13c detected.
[12:37:56][INFO] Windows version 6.1 (build: 7601) detected.
[12:37:56][INFO] Loading early DLLs.
[12:37:56][INFO] SGD2FreeDisplayFix.dll loaded.
[12:37:56][INFO] Game requested screen size: 640 x 480
[12:37:56][INFO] Window style switched to dark mode.
[12:37:56][INFO] Switched to windowed mode: 1600 x 900
[12:37:57][INFO] OpenGL: 4.6 (AMD Radeon R9 200 / HD 7900 Series | ATI Technologies Inc.)
[12:37:57][INFO] OpenGL: Shading Language: 4.6
[12:37:57][INFO] OpenGL: GL_MAX_TEXTURE_IMAGE_UNITS = 32
[12:37:57][INFO] OpenGL: GL_KHR_debug enabled!
[12:37:57][INFO] OpenGL: Independent blending available.
[12:37:57][ERROR] File (MPQ): "data\assets\atlases\eng.txt" could not opened!
[12:37:57][INFO] Loading late DLLs.
[12:37:57][INFO] SGD2FreeRes.dll loaded.
[12:37:57][INFO] Applying custom size.
[12:37:57][INFO] Game requested screen size: 800 x 600
[12:37:57][INFO] Game requested screen size: 640 x 480
[12:37:59][INFO] Applying custom size.
[12:37:59][INFO] Game requested screen size: 800 x 600
[12:38:02][INFO] Applying custom size.
[12:38:02][INFO] Game requested screen size: 1068 x 600
[12:38:12][INFO] Applying custom size.
[12:38:12][INFO] Game requested screen size: 800 x 600

On both cases, the regular log is just this:

12:36:20.963  ------------------------------------------------------
12:36:20.963  2024-01-14 12:36:20
12:36:20.963  Diablo II running under Windows XP (Version 6.010)
12:36:20.963  Vendor:  Intel
12:36:20.963  Version: Pentium III (no brand) (Type 0, Family 6, Model E, Stepping 3, Brand 0)
12:36:20.966  Speed: Approx. 3311 MHz
12:36:20.966  Total Physical Memory: 4096.00MB
12:36:20.966  Application Path: E:\Games\Diablo II
12:36:20.971  Local IP: 192.168.0.2
12:36:20.971  Computer name: COREi5
12:36:20.971  ------------------------------------------------------
12:36:20.971  
12:36:20.971  imagehlp.dll loaded for better stack crawls.
Jarcho commented 10 months ago

I don't know if it will help, but using D2GL there's an error in the log file:

That's d2gl failing to apply it's own menu fps patch. That should fail if d2fps is enabled.

Jarcho commented 10 months ago

A couple of test builds. All of them will show a message box will show a message box right before the library is detached assuming nothing goes wrong. Can you let me know which ones show the message box and if any of them actually shut down?

d2fps-test.zip

malvarenga123 commented 10 months ago

I tested all 3 and the nolog one is the only one that displays the "Detached" error box after exiting and Game.exe will close after clicking OK on the message box. nopin and msg versions won't display anything after exiting and Game.exe has to be closed manually.

Jarcho commented 10 months ago

Ok. Three more to test to narrow down exactly what causes it.

d2fps-test2.zip

malvarenga123 commented 10 months ago

nosend: "Detached" message. Game.exe closes by itself sleep: No message. Game.exe does not close trysend: No message. Game.exe does not close

Jarcho commented 10 months ago

Fixed with f88018e.