GetQueuedCompletionStatus Errors in GS & CS (Remake of Gembrid's Guide)
This is a remake of Gemrid's guide. I thought it would be a good idea to explain this problem in more detail with lots of screenshots, so that beginners can understand better, as it can be a little confusing.
For more information on these errors, you can see Gembrid's guide here.
So let's get started. The error you are experiencing is as follows:
After a few hours of your server being online, your game server and/or connect server show the error: "GetQueuedCompletionStatus". This, in some cases, stops the users connecting to your server - they get stuck at the login screen. In other cases, the server select button disappears and users cannot click on the button to connect to your server.
In order to remove these errors, you first need to know what program it is that's initiating these errors - is it the game server, or the connect server, or both? You can find this information in the logs of both the game server and the connect server - search for "response" or "GetQueuedCompletionStatus" in both logs, then you'll know if it's the game server or the connect server (or both) that's causing the error.
So now you know what program is causing the error, we can begin to disable these errors, which will make your server run properly, 24/7, without any crashes.
2. Open your GameServer.exe file in OllyDBG (make a backup of your gameserver incase you mess up!)
3. First, we are going the search for the GetQueuedCompletionStatus comment. This will enable us to see what errors the game server already bypasses.
4. A window will appear like the following.
5. Scroll down until you find 'GetQueuedCompletionStatus'. Right click -> Find References to Import.
6. A new window will appear. Double click on the first line.
7. Revert back to the original window. You will see the following:
8. Find at least 5 free slots within your gameserver.exe file. Make a note of the expression you are going to use. I am using 0043F16D in this screenshot.
9. Once you have made a note of the expression you are going to use, scroll back up to the 'GetQueuedCompletionStatus' comment and right click on the line below 'CMP DWORD PTR SS:[EBP-30],3E3' and then select 'Assemble'. The following box will appear.
10. We are now going to write the code which tells the game server to jump to the free slots. Use the expression you made a note of earlier. An example: JMP 0043F16D.
11. Now scroll down to your free slot which you have told the game server to jump to (in my case it's 0043F16D). Begin to write the code. To do this, right click on your free slot and select 'Assemble'. Then type the following: CMP [DWORD SS:EBP-30],3E3 (remember to change the EBP-30 to whatever it is in your game server, as they can be different).
Re: GetQueuedCompletionStatus Errors in GS & CS (Remake of Gembrid's Guide)
How to Remove This Error From the Game Servercontinued...
12. Follow the information in the screenshot for the next step.
13.Do the same as above, but write 79 instead of 3E3.
14. The same as step 12.
16. Now we are going the tell the game server to jump back to where it was before so it can continue processing as normal.
17. That's it! You've done it! Now all you need to do is save the new code. Highlight all the code you've changed and Right Click -> Copy to Executable File. A new window will appear. Right Click again -> Save. Remember to do this for ALL the code you've added, including the JMP code you added at the beginning.
*NOTE* If you get the error: Unable to locate data in executable file - Scroll down to the bottom of this post for a guide on how to HEX this code in to your game server instead. DO NOT close OllyDBG otherwise you will lose all your code.
How to Remove This Error From the Connect Server
1. Open your CS.exe file in OllyDBG. (Remember to back up your connect server first!)
2. Search for the comment 'GetQueuedCompletionStatus' again (Revert to Step 3 of the Game Server guide if you forget how to do this.)
3. Double click on first line.
4. In the connect server you will need to ignore BOTH the 4D4 and the 79 errors.
5. Jump to a free space. Remember to add the code underneath 'CMP DWORD PTR SS:[EBP-28],3E3'. Right click -> Assemble to add the code. Type JMP followed by the expression you chose (the free slot).
Re: GetQueuedCompletionStatus Errors in GS & CS (Remake of Gembrid's Guide)
How to Remove This Error From the Connect Servercontinued...
6. Start entering the code the same as the game server.
7. Remember to revert back to the 'GetQueuedCompletionStatus' comment to check the expression used. In my case it is 00402BD3.
8. Tell the connect server to jump back to the original code using the JMP command, the same as we did for the gameserver. Make sure you have ignored BOTH the 4D4 and 79 errors.
9. Now you're done! You can now save the file. Follow step 17 of the game server guide to see how you save the file.
2. Open the GameServer and/or the Connect Server in the hex editor. Revert back to OLLYDBG and follow the instructions in the screenshot below.
3. Follow instructions in screenshot below.
4. Revert back to the hex editor and search for the hex values.
5. When you find the hex values, enter all the new hex values (the red ones, in OllyDBG) after it and that will enter the new code to ignore the errors. MAKE SURE YOU DON'T OVERWRIGHT ANY HEX VALUES.
You're done! Yay! Hopefully it's all working for you now. You will probably need to read this guide thoroughly a few times before you understand but I had to do the same. Some people are born to see the matrix but not me and if I can do it I am sure you guys can too!
FYI, my server used to crash every 10 hours and people couldn't connect. After ignoring the errors in both my game server and connect server, I no longer have the 'GetQueuedCompletionStatus' error and my server has been online for 3 days without any problems
Re: GetQueuedCompletionStatus Errors in GS & CS (Remake of Gembrid's Guide)
Very nice and clear guide =D thanks for adding it, i'm sure a lot of people will be able to use it :p
oh and ofcoarse thx to gembrid in the first place ^^
Re: GetQueuedCompletionStatus Errors in GS & CS (Remake of Gembrid's Guide)
Can someone help me aply this tutorial to my gs becouse i don`t understand everything in this tutorial and i m stuck....
here is a link to the gs please help...