Reproducable crash with d2lootfilter + d2dx
nelsonmenon opened this issue · 4 comments
oGkspAz posted in d2dx issue but I will post here:
"I currently run my Diablo II as such:
Basemod v1.13.8_2
Plugy v14.03
d2lootfilter v0.6b
D2DX v0.99.529 or SGD2FreeRes v3.0.2.3.
If both D2DX & d2lootfilter are loaded; as soon as I move my cursor over the Defence stat on the character screen, the game crashes. Without fail. Plain SGD2FreeRes does not do this, so I can only imagine it is on D2DX's side."
i reprocuded without basemod:
d2 1.14d
plugy 14.03
d2lootfilter 0.6b
and latest d2dx
the same to me
Similar issue.
d2 1.14d
d2lootfilter 0.6 alpha
Plugy (14.03 latest)
Diablo 2 "BaseMod" (https://www.moddb.com/mods/basemod) v1139 (v1.13.9 latest)
and d2dx (0.99 latest)
I load "PlugY.dll" and "d2lootfiler.dll" via Diablo BaseMod after loading "PlugY.dll"
From my "Basemod.ini" :
[ExtraDll1]
Enabled=0
LoadDll1=""
[ExtraDll2]
Enabled=1
LoadDll2="PlugY.dll"
[ExtraDll3]
Enabled=1
LoadDll3="d2lootfilter.dll"
When I load the "d2lootfilter.dll" via the above mentioned "BaseMod" Loader (Modded "Games.exe") it crash when I quit the D2 program. It does not crash while gaming. But when I quit the D2 program, it launches "BlizzardError.exe" error reporting program. Cause of error is "Access violation". The error occurs 100% always I quit D2 program with "d2lootfilter.dll" loaded even on quitting D2 without starting new game session. Fully reproducible.
I tried to load "d2lootfilter.dll" before "PlugY.dll" loading, same result.
I tired to run D2 without D2DX (Removing "glide3x.dll" of D2DX and without "Games.exe" -3dfx option), same result.
So it is not fault of D2DX.
When I disable LoadDll3="d2lootfilter.dll" in "Basemod.ini", the launching of "BlizzardError.exe" on quit is gone
So it is clash between the BaseMod Extra DLL loading/unloading and "d2lootfilter.dll"
When I load "d2lootfilter.dll" via "Plugy.exe" with "DllToLoad=d2lootfilter.dll" in "Plugy.ini, It has no problem. It works well. No error on quit.
But when I load "PlugY.dll" via BaseMod with "LoadDll2="PlugY.dll" in "BaseMod.ini" and let the "Plugy.dll" will load the "d2lootfilter.dll" (2 step DLL loading) with "DllToLoad=d2lootfilter.dll" in PlugY.ini, it works well while gaming, but Same error on quit occurred again. So it does not matter which program loads the "d2lootfilter.dll" DLL.
I tested with original (unedited) "item.fiter" file.
My guess is that "d2lootfilter.dll" does not reset itself to initial states (before reading "item.filter" file) when a gaming session is finished and player returns to main menu screen. Currently it seems that the filter data is read only once when DLL is loaded and never re-read between successive game sessions. So editing the filter file does not take effect until you quit D2 program and re-launch D2program again.
I think that, when a game session is finished and returns to main menu, DLL should forget the filter data and release memory used by the filter data. And when a new game session is started from main menu, DLL should re-read the "item.filter " file again at start of new session. Then editing filter data or "d2lootfilter.ini" file between game session will take affect every time when player start new game session. It will make switching item.filters file or changing filter level/ping level between game session easier.
There should some way to force DLL to re-read the filter file again while in middle of live session without ending the session. The time that D2 restores window state from minimized state to normal foreground window state is good time to check the filter file is modified (file modification time is changed) and if file is modified, force re-read the filter data. Minimizing D2 to icon and restoring it back to normal state should make modified filter file take effect. It will make writing and testing filter much easier. User time is expensive but CPU time is cheap.
PS: Crash dump file is attached
BlizzardError.zip
I think I solved my problem of error on D2 quit.
The error is caused by d2lootfillter.dll hooked WndProc() when it is attached, but did not restore it back when DLL is detached. I added new clean up routine that restores the hooked WndProc back to original when it is detached. Then the error on quit is gone. Satisfied.
BTW, why does DLL compiled in debug mode fails to load? The DLL compiled in release config works well.
Hitting tab to toggle my map while holding down my show loot key also causes instant game crash with d2dx + plugy + lootfilter :(