[Guide][Random] Disabling Windows DEP can reduce server crash

Skilled Illusionist
Joined
Apr 20, 2009
Messages
351
Reaction score
212
The [Random] tag is here because it may work, as well as it may not work at all.

Color legend:
- Windows Server 2003
- Windows Server 2008

1. Checking if DEP closes your server
First of all we need to check if DEP may be the culprit.
Open the Event viewer. It's located in the Administrative tools (either Start Menu > Administrative Tools or Start Menu > Control Panel > Administrative Tools).


Gregoo - [Guide][Random] Disabling Windows DEP can reduce server crash - RaGEZONE Forums
Windows Server 2008​

Gregoo - [Guide][Random] Disabling Windows DEP can reduce server crash - RaGEZONE Forums
Windows Server 2003​

Now open the [Windows Log > ] Application Log and look for error events related to your server. It's quite easy to find, the type would be Error, the source Application error and you should see your server .exe file name in the description of the error.

If the description of the error looks like this :
Code:
Faulting application [I]server.exe[/I], version _._._._, 
time stamp 0x________, faulting module ntdll.dll, 
version _._.____._____, time stamp 0x________, 
exception code [B][COLOR="Red"]0xc0000005[/COLOR][/B], fault offset 0x________, 
process id 0x___, application start time 0x________________.

This could be caused by DEP. Your .exe is trying to access a memory address it shouldn't be accessing (that can also be caused by poor modifications) and the DEP system closes it.

Note: the exception code 0x0000005 can also be caused by faulty RAM modules.

2. Switching DEP mode to consider the exception list
Open the Data Execution Prevention options : Start Menu > [My] Computer *right click* > Properties [ > Advanced System Settings ] > Advanced tab > Performance > Settings > Data Execution Prevention tab.

Select Turn on DEP for all programs and services except those I select:

A reboot is required after changing mode.

3. Adding your server to the exception list
Open the Data Execution Prevention options (see 2.) and add your server to the list.

Note: Consider giving your server a unique name like server.exe rather than server1.0.exe, server1.1.exe, etc. This way you wont have to add your .exe each time you update it.

Note: If you are running a Windows Server 2008, you can add the column Data Execution Prevention to the Task Manager (View > Select Columns) to check if DEP is enabled or not.
 
Last edited:
A similar procedure is required if DEP presents problems with your game.exe, and since I always have DEP active at it's highest security (all programs, not just the essential system components) it frequently does.

Knowing that, I can tell you that *if* DEP is shutting down your server, it is because you are executing code fixes in a section marked as "data"... the way the GFantasy section usually is.

So a more "secure" solution is to make code fixes in a new section marked as "executable" and table and data fixes in a section marked as "data" (preinitialised data). Don't mix the two in a single section.
 
Last edited:
Back