Staredit Network > Forums > Technology & Computers > Topic: WarCraft 3: Fatal error when loading DLL file ONLY in Windows XP
WarCraft 3: Fatal error when loading DLL file ONLY in Windows XP
Sep 17 2015, 9:59 am
By: iCCup.xboi209  

Sep 17 2015, 9:59 am iCCup.xboi209 Post #1



I've been stumped for a while on this problem now and have thoroughly tested this issue so I'll reward 350 minerals to whoever can solve this.

I'm writing a DLL called CheckRevision(the file is named IX86Ver1.dll which is embedded in a signed MPQ file; that MPQ file is sent to the clients) which is downloaded and loaded by Battle.net clients when connecting to a server. The data returned by CheckRevision is information about the client(exe) which is detailed in the documentation of packet 0x51. This data includes the last modified time of the client; the call to Filesystem's last_write_time() function is where a fatal error is thrown on Windows XP(SP 3), but (the SAME binary file) executes successfully in Windows Vista, Windows 7, Windows 8, and Windows 10.

The DLL is compiled using Visual Studio 2015 with the Platform Toolset option set to Visual Studio 2015 - Windows XP (v140_xp).

Disturbingly, the DLL file does not seem to be the problem at all. I've wrote a simple exe program that loads the DLL and calls the CheckRevision function from it successfully. In conclusion, it seems that there is probably faulty code in the calling program, WarCraft 3, but why is it only faulty for Windows XP but not any other versions of Windows? But wait, how is there faulty code in WarCraft 3 when a fatal error is thrown at the call to last_write_time() which is located in CheckRevision?

Screenshot of the error message: http://i.imgur.com/5pqPpN3.png
Source of DLL: https://bpaste.net/show/25e6b36b0351
Source of test program: https://bpaste.net/show/1d9a10ba54ec

Attachments:
lastwritetime.7z
Hits: 1 Size: 952.98kb

Post has been edited 4 time(s), last time on Sep 17 2015, 6:07 pm by iCCup.xboi209.



None.

Sep 17 2015, 7:41 pm Neiv Post #2



You could compile dll using mingw and see how they work. (Even though it really doesn't tell too much)

If you can install stuff on the XP machine you use, try using Application Verifier, as it can detect heap buffer overflows and other misc issues in Warcraft 3 exe. Dr. Memory is another similar tool, though I don't know if it works at all here. Also at least AMD video drivers are so buggy that Application Verifier may give complaints unrelated to issue, but they can just be ignored.

Otherwise have fun debugging



None.

Sep 17 2015, 8:28 pm iCCup.xboi209 Post #3



I'm using TR2's filesystem which mingw doesn't have and I suck at compiling Boost Filesystem :(




Sep 17 2015, 9:14 pm Neiv Post #4



Oh..

Anyways, last_write_time is really simple function, so the crash should be easy to solve with a debugger. Not sure if you can use vs 2015 debugger on xp, but any debugger should give some information on the crash. Especially as the crash locations seems not to be in system dlls?



None.

Options
  Back to forum
Please log in to reply to this topic or to report it.
Members in this topic: None.
[01:56 am]
Oh_Man -- cool bit of history, spellsword creator talking about the history of EUD ^
[09:24 pm]
Moose -- denis
[05:00 pm]
lil-Inferno -- benis
[10:41 am]
v9bettel -- Nice
[2024-4-19. : 1:39 am]
Ultraviolet -- no u elky skeleton guy, I'll use em better
[2024-4-18. : 10:50 pm]
Vrael -- Ultraviolet
Ultraviolet shouted: How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
hey cut it out I'm getting all the minerals
[2024-4-18. : 10:11 pm]
Ultraviolet -- :P
[2024-4-18. : 10:11 pm]
Ultraviolet -- How about you all send me your minerals instead of washing them into the gambling void? I'm saving up for a new name color and/or glow
[2024-4-17. : 11:50 pm]
O)FaRTy1billion[MM] -- nice, now i have more than enough
Please log in to shout.


Members Online: Zycorax, jun3hong, Oh_Man, Ultraviolet