It can become very frustrating when you encounter General Protection Faults or illegal action errors. Often, the information that accompanies an error message isn’t very helpful, either. If you have a computer that’s giving you fits with these errors, you’ll be happy to know that you can fight back. In this Daily Drill Down, I’ll explain how you can track down and get rid of General Protection Faults.
What causes a system error?
Before you can track down these errors, you need to understand what causes them. General Protection Faults and illegal actions usually occur when a program tries to use an illegal memory address. Keep in mind that programs aren’t limited to applications, such as Microsoft Word. A program can be something as simple as a video driver. The address that the program tries to access may be illegal for several reasons. For example, another program may be using the address already, the memory address may be read-only, or the address may not exist at all. Whatever the cause of the error, the important thing is that you fix it. I couldn’t possibly describe all of the problems that can cause memory address errors in just a few Daily Drill Downs. So, throughout this series, I’ll discuss the most common causes.
Before you begin
Before I begin, I should point out that some of the techniques that I’m about to discuss might be dangerous. These techniques are designed for users who have a good understanding of the Windows 98 operating system. Using these techniques incorrectly could lead to data loss. Likewise, making mistakes could destroy application programs or Windows itself. Therefore, before you try any of these tips, be sure that you’ve made a full backup of your system. And don’t do anything if you have any doubts about your ability to follow these steps!
Create a log
When you’re tracking down an error, you need to know exactly what’s going on in your system. Thus, you should create a log file that describes what was occurring at the time of an error. Begin by recording the date and time of the error. You may notice a trend: The error may occur at certain intervals. If so, there may be an automated task that’s running within the Task Scheduler and causing the problem. Next, write down the exact words of the error message. This information is helpful if you have to call tech support. Occasionally, the details may give you a clue about which program is causing the problem. The details will almost always list a program. Just remember that the listed program is merely the one that triggered the error. It may or may not be the actual problem that needs to be fixed—but it’s definitely something that you need to check. You also should note which application was active at the time of the error and what you were doing with that application. If the error pops up again in the same place or while you’re running the same segment of code, then fixing the error may be easy. For example, if the error always occurs in Microsoft Word, the problem may be related to Word. You may need to reinstall Word.
Before you go through all of that trouble, however, you should try to remember what you were doing when the error occurred. If you were only typing at the time, your machine may have a serious problem with Word, but it’s probably just a background system process that’s kicking in and triggering the error. On the other hand, if the error always occurs during printing, the print driver may be the problem. Try printing from another program, such as Excel, and see if the error still occurs. If so, try recreating the printer within Windows and see if the error goes away.
Finally, make a note of which programs are running in the background at the time of the error. There’s a good chance that one of those programs may be draining your system resources and causing the problem.
Minimize the load on your system
If you’ve got a good idea what events triggered the error but you haven’t managed to correct the error yet, it’s time to minimize the load on your system. (Please note the warning above.) Begin by pressing [Ctrl][Alt][Del]. You’ll see a list of all the programs that are running on top of Windows 98. Copy this list. Then, divide the list into essential and nonessential programs. Unless you’re doing something really important, almost all of the programs will be nonessential. Press [Esc] or click Cancel to exit this screen.
Now, select the Run command from the Start menu. Enter the SYSEDIT command at the Run prompt. Doing so will launch the System Configuration Editor. The System Configuration Editor is divided into several screens, each of which represents a different file, as shown in Figure A.
|The System Configuration Editor will help you troubleshoot General Protection Faults.|
CONFIG.SYS, AUTOEXEC.BAT, and WIN.INI
Take a look at the CONFIG.SYS file. Windows 98 is designed to function without this file. It’s merely included for backward compatibility purposes. The purpose of CONFIG.SYS is to load old 16-bit drivers before Windows loads. Since the Windows drivers are 32-bit instead of 16-bit, Windows can control just about any device without a CONFIG.SYS entry. Therefore, you should always use Windows drivers, if possible. The upshot of all this is that you can delete any DEVICE= lines that aren’t absolutely essential. Then, check for lines with FILES= or BUFFERS=. Unless you have a program that has specific file or buffer requirements, delete these lines. Finally, delete any other lines that aren’t absolutely necessary. If you don’t know what a specific command does, type the letters REM in front of the command. Doing so will disable the command, but you can re-enable it if you discover that it was, indeed, necessary.
When you’re finished with CONFIG.SYS, move to AUTOEXEC.BAT. As with the CONFIG.SYS file, Windows 98 is designed to function without an AUTOEXEC.BAT file. The purpose of this file, which is merely included for backward compatibility purposes, is to run programs at the DOS level before Windows loads. For example, you might run a low-level virus check before loading Windows. Again, delete any lines that aren’t absolutely necessary. If you don’t know what a specific command does, type REM in front of the command.
Now, go to the WIN.INI file. This file, which is left over from Windows 3.x., is included for backward compatibility with older Windows programs. Look at the LOAD= and RUN= commands. Normally, these lines should be empty. The only time that LOAD= or RUN= should contain anything is if you upgraded from an older version of Windows or if you’re running certain older Windows programs. If either of these lines contains a file to execute, see if you recognize the filename. If the file isn’t essential, remove it. If you’re not sure, enter the semicolon character (;) in front of the file. Doing so will disable the command, but you can re-enable it later if you discover that it was essential.
Next, check the Startup section of your Start menu. Normally, the Startup section launches applications automatically when Windows loads. Until you’ve taken care of any errors, I recommend that you remove everything from the Startup section because some programs leave modules in memory even after you close the program. Often, such modules are the cause of various system errors. To make sure that you’re running a clean system, remove everything from the Startup section—unless your system is calling a critical system service through Startup. Critical system services are supposed to be launched through the registry, but I’ve seen poorly written programs call them through Startup.
To remove programs from the Startup section, navigate to Start | Settings | Taskbar & Start Menu. You’ll see the Taskbar Properties sheet. Navigate to the Start Menu Programs tab and click Advanced. The next screen presents the Start Menu in a Windows Explorer-like view. Navigate through the left-hand column to Start Menu | Programs | Startup. Programs from the Startup section appear in the right-hand column. Select these programs and press [Delete]. Or you can move these program shortcuts to a temporary location, such as your desktop, and return them to the Startup menu after you determine that they’re safe.
Cleaning up the registry
Now that you’ve taken care of the basic system configuration, it’s time to check the registry. Again, exercise extreme caution when you work with the registry. One mistake can disable your application programs, Windows 98, or both. To check the registry, select the Run command from the Start menu and type REGEDIT at the Run prompt. Windows will load the Registry Editor. The Registry Editor works similarly to Windows Explorer. The left-hand column contains a tree through which you can navigate. The actual registry keys that appear under any given point in the registry will appear in the right-hand column.
Navigate through the registry to HKEY_LOCAL_MACHINE | Software | Microsoft | Windows | CurrentVersion | Run. When you select this registry location, you’ll probably see several keys in the right-hand column. These keys represent programs that run automatically when the system finishes loading Windows. Unlike the Startup section of the Start menu, these programs are usually lower-level programs that are related to specific system functions. As you can see in Figure B, the column that contains the programs is divided into a couple of sections. You can see the name of the program as it appears in the Task Manager. You also can see the actual command that calls the program. Use these two pieces of information to figure out what each program does. Now, remove nonessential programs by selecting them and pressing [Delete]. Just remember that, when you delete a registry key, the deletion is permanent! The registry doesn’t have a save function, so the deletion occurs instantly when you press [Delete].
After you’ve weeded through the HKEY_LOCAL_MACHINE | Software | Microsoft | Windows | CurrentVersion | Run section, there are a couple of other registry sections for which you must repeat the process. These sections usually have very few (if any) entries. Here’s a list of the registry locations that you need to check:
HKEY_LOCAL_MACHINE | Software | Microsoft | Windows | CurrentVersion | RunOnce
HKEY_LOCAL_MACHINE | Software | Microsoft | Windows | CurrentVersion | RunOnceEx
HKEY_LOCAL_MACHINE | Software | Microsoft | Windows | CurrentVersion | RunServices
HKEY_LOCAL_MACHINE | Software | Microsoft | Windows | CurrentVersion | RunServicesOnce
Once you’ve made all of these changes, close the Registry Editor and reboot the system. Then, check to see if any system errors still occur. If errors still exist, don’t worry. In the next part of this series, I’ll cover some more techniques that you can use to eliminate errors.
Brien M. Posey is an MCSE who works as a freelance technical writer and as a network engineer for the Department of Defense. If you’d like to contact Brien, send him an e-mail. (Because of the large volume of e-mail he receives, it’s impossible for him to respond to every message. However, he does read them all.)
The authors and editors have taken care in preparation of the content contained herein, but make no expressed or implied warranty of any kind and assume no responsibility for errors or omissions. No liability is assumed for any damages. Always have a verified backup before making any changes.