I picked up a copy of Titan Quest + Titan Quest: Immortal Throne on the current Steam weekend deal, only to find that I couldn’t attempt to refresh the games list for internet games without getting a nice exception dialog.
Assertion failed!Program: ...ps\common\titan quest immortal throne\Tqit.exe
File: .\common\gsPlatformSocket.c
Line: 236Expression: theSocket != INVALID_SOCKET
I researched this to find that it seems to be a common issue on Vista SP1, someone had suspected that Titan Quest was creating a raw socket for some reason. That is in fact what it’s doing. Since I am not running the game in administrator mode, the socket creation fails.
Since I don’t really like the idea of running Steam and TQ:IT in administrator mode, I looked for a better fix.
It makes a call to socket(AF_INET, SOCK_RAW, IPPROTO_ICMP) in Engine.dll. I modified Engine.dll to make it call socket(AF_INET, SOCK_DGRAM, IPPROTO_TCP) instead. I suspect this breaks the ping display in the game list now, but it appears to run just fine now without any exceptions.
It’s a two byte fix for Engine.dll, assuming the latest version of Engine.dll for TQ:IT on Steam now (md5 of cf00e85ff32629e4ad7859765722517b), you will want to change offset 0x164A0F to 0x11 (from 0x01), and offset 0x164A11 to 0x02 (from 0x03).
Tags: Hacking
Fantastic!
Just got this game on steam and Windows 7 was crashing with it.
The md5sum still matches today (14/10/09) and your mods worked beautifully!
Thanks!
What is the best way to edit dll files? I have windows xp and I am hoping this fixes my online connection trouble. It started giving me an “unable to connect to server” message every time I try to play online.
Just had this problem with Titan Quest and Windows 7 – the fix still works.
Get notepad++ with the ‘hex editor’ plugin. Open up the Engine.dll file and navigate to address 164A00, then count along to F (last one in row, has the value ’01′ – counting in hex goes 0123456789ABCDEF). Change that to 11. Go to the next row and find the address 164A11 and change the 02 to 03 (it’s the only 02 around there).
I’ve put a .zip of the edited file over on mediafire: http://www.mediafire.com/?txjqymyzymj
Thanks, all. Torn’s file worked beautifully for the copy I got from Direct2Drive.
Yeah, this works outstanding. I bought the Titan Gold pack at the Steam Store and i got this problem, until i used Torn’s file.
Amazing.
Thanks a lot man.
I’m on Windows 7 and have a GeForce GTX 260, Directx11, and when I try to start up TQ via STEAM, all I get is flickering black screen and a dialog box that says, “Couldn’t initialize graphics engine.” Is there a fix or hack for this problem/issue? Thanks.
Nice work Rick! This fix will be included in my next TQ Defiler under your name.
Soul
its not working… where do i copy the enigne? into the steamapps/common/TQ folder? not wokring… :S
Hey all, please note that the downloaded file is NOT the engine.dll for the fan patch. If you use the fan patch you will need to make sure your friends use the same engine.dll file. So edit your own if you have the fan patch (which you should, it rules) or share the one above with your friends.
This is the correct path for it:
C:\Program Files\Steam\steamapps\common\titan quest immortal throne
Awesome work Rick, and thanks for the finished file, Torn.
Torn’s file works. Thanks!