                     WordPerfect Corporation
                InfoShare Information Fax Service
                         (800) 228-9960

Title:   General Protection Fault Guide 
Product: WordPerfect 6.0 for Windows 
Number:  1295-12/93 


This document is divided into five sections.  The first three
sections will discuss the basics of General Protection Faults in
the Windows program.  The last two sections outline some
troubleshooting questions for WordPerfect 6.0 for Windows.

These are the major topics covered in this document:

*    What Is a General Protection Fault Error?
*    What Is a System Integrity Violation?
*    How Does Windows 3.1 Handle a GPF Error? 
*    GPF Troubleshooting Options for WordPerfect 6.0 for Windows
*    Other Troubleshooting Possibilities


What Is a General Protection Fault Error?
A General Protection Fault error (GPF) occurs in Standard and 386
Enhanced mode in Windows 3.1.  (It is referred to as an
Unrecoverable Application Error [UAE] in Windows 3.0.)  A GPF
error signifies that something unexpected has happened within the
Windows environment.  Most often, it is an improper memory
access, or in other words, something running within the Windows
environment has made a call to a location in memory that it did
not have access to, therefore potentially overwriting and
damaging other program code in that area of memory.  More
specifically, an application or Windows component might read or
write to a memory location that it has not been pre-allocated, or
memory that it does not "own".  All memory management within
Windows is handled by the Windows environment itself, and when
applications and Windows components directly access memory, the
result is often a GPF error.

A General Protection Fault error may also occur when parameters
are passed between applications and the Windows environment. 
Invalid parameters affect the performance of Windows and its
applications by forcing an invalid instruction.  This is usually
the result of an application's internal program code incorrectly
passing specific data that could not be correctly interpreted for
Windows or another Windows application, thereby causing a GPF.  

What Is a System Integrity Violation?
The message referring to the violation of system integrity
indicates a general protection violation, or the equivalent of a
GPF error that is caused by an MS-DOS based application.  Similar
to the GPF, the system integrity violation indicates that an
MS-DOS application is accessing memory that does not belong to
that specific application.  Since Windows is managing memory in
this situation, the MS-DOS application's memory access will often
damage Windows program code or vital data.  The result is an
application execution error generated from Windows reporting that
the "application has violated system integrity due to an invalid
general protection fault and will be terminated".  This message
can also occur when an MS-DOS-based application has tried to
directly access a system's hardware component.

How Does Windows 3.1 Handle a GPF Error? 
Parameter Validation is a new feature of Windows 3.1 which allows
Windows to check for invalid parameters which are passed between
Windows and other applications running in the Windows
environment.  Windows 3.1 is also designed to better manage and
maintain which applications "own" specific memory locations and
system resources.  As a result, Windows 3.1 is more capable of
recovering a particular application's RAM memory and system
resources.  If you do get a GPF error message while running
Windows 3.1, the message will provide specific information about
which applications and Windows components were running at the
time of the error, and where the error occurred.  Depending on
the severity of the GPF error, Windows 3.1 can continue to run
the application that caused the fault, allowing you to save your
work before exiting the application.  You can also use Dr.
Watson, a program provided with Windows 3.1, to learn more about
the cause of the GPF error.

GPF Troubleshooting Options for WordPerfect 6.0 for Windows
The questions and answers that follow are the same questions that
WordPerfect technicians will ask you when you call for help with
a General Protection Fault error.  By using these responses, you
should be able to correct the problem without having to call a
technician.  However, if you find that the GPF error still
occurs, a technician may be able to further help you.

Is the General Protection Fault error caused by a "known"
problem?  What is the exact error message?
Several "known" problems give specific error messages.  Before
contacting a WordPerfect Customer Support technician, note the
exact error message you receive when a GPF occurs.  The exact
message can be an important clue in resolving the conflict
quickly.

Is a 256 Color VGA driver being used?  If so, is the /FL option
being used to start WordPerfect 6.0 for Windows?
To check the display type,

1    Open the Main group.  

2    Click Windows Setup and check the Display field.

To start WordPerfect for Windows with the /FL option,

1    Click the WordPerfect 6.0 for Windows icon once.

2    Click File, then click Properties.

3    Add a space and then type /FL in the Command Line field. 
     For example, the Command Line field could read
     C:\WPWIN60\WPWIN.EXE /FL.  NOTE:  The /FL option was added
     with the 04/30/92 interim release of WordPerfect 5.1 for
     Windows.  It is also available in both WordPerfect 5.2 and
     6.0 for Windows.  It is not available on the 11/04/91
     release of WordPerfect 5.1 for Windows.

What were you doing when the General Protection Fault error
occurred?
The answer to this question will often give clues about what
troubleshooting steps to try, as it can help determine if the
problem is related to the system configuration, the Windows
environment, or if it is a problem with the application.  Knowing
what feature was being used when the error occurred will often
lead to a quick solution to the problem.

Can you duplicate the error at will, or is the error message
random?
Troubleshooting is easier if you can cause the error to occur at
will.  The cause of the error can be more quickly isolated, and
you will also be able to tell when the problem has been found.

If the errors are sporadic and completely random, troubleshooting
often consists of just looking over your system configuration and
making adjustments to the environment.  Check things such as
commands in the CONFIG.SYS and AUTOEXEC.BAT files, TSRs, memory
issues, and network configuration files.  Keep in mind that
hardware devices (network cards, video cards, etc.) use locations
in the upper memory area to operate.  If you are loading TSRs and
device drivers into the upper memory areas, these programs may
conflict with the hardware devices.  Loading one or more of the
conflicting programs into conventional memory and/or rearranging
the order in which the programs are loaded can help to reduce or
remove the conflicts.  (NOTE:  If you are unsure about checking
your system's configuration, contact WordPerfect's Customer
Support.)

Do you ever experience the errors in other applications?
If you experience General Protection Fault errors in other
Windows applications, it is highly probable that the problem lies
within the Windows environment.  Further troubleshooting of the
Windows environment may be needed to find the exact cause. 
Removing and reinstalling Windows to clean out the environment is
necessary in cases where the exact cause cannot be determined.

Have the errors always occurred, or have they just started?
If other programs have been recently added to the system, check
to see what modifications these programs made to the system
configuration files (AUTOEXEC.BAT, CONFIG.SYS, WIN.INI, and
SYSTEM.INI).  Watch for changes to any of the default Windows
.DRV files listed in the [boot] section of SYSTEM.INI and also
for changes made to the Load= or Run= lines in the [Windows]
section of WIN.INI.

Do the problems only occur with a specific file?
If a file has become damaged, General Protection Fault errors
could occur when retrieving or working with the file.  You may be
able to restore the document by using the /restore option.  If
you are having trouble opening a document or if you are
experiencing problems with tables in a document, start
WordPerfect with this option and open the document you are having
trouble with.  This option is available only in WordPerfect 6.0
for Windows.  Try starting Windows by typing WIN /D:X at the DOS
prompt.  This is the same as using an EMMExclude=A000-EFFF in the
SYSTEM.INI file.  If the errors do not occur, the problem is
being caused by a conflict in the upper memory area.  Conflicts
in the upper memory area are very common causes for General
Protection Fault errors.  Often, these errors are extremely
random in nature and cannot be readily duplicated.  Refer to the
Getting Started with Microsoft Windows manual for more
information on using EMMExclude.

Are system resources extraordinarily low?
System resources are fixed areas of memory set aside by Windows
to handle certain operations such as graphical displays,
printing, and copying and pasting text.

To determine the amount of resources available,

1    Go to the Program Manager.

2    Choose Help, then About Program Manager.  The system
     resources will be listed as a percentage remaining.

If performance becomes noticeably slow or if you have accessed
Windows for an extended period of time before getting a GPF
error, check the system resources.  There is not a specific
recommendation regarding how low system resources can be. 
However, if you can get system resources into the 70-80 percent
range and the errors still occur, then this is not the cause of
the errors.  If resources are low, exiting and restarting Windows
should return the resources.

Is free memory excessively low in Standard mode?
The free memory reported in 386 Enhanced mode is deceptive
because Windows reports both available RAM memory and also
virtual memory (hard disk space allocated to a swap file) as free
memory.

A good guideline is to try to get at least 2000K free memory. 
However, many users can run WordPerfect 6.0 for Windows
successfully with as low as 1000K free.  If you have between
1000K and 1500K of free memory, try freeing more memory to see if
the errors still occur.  You can do this by running fewer
programs resident.

It is possible that you are accessing some of the system's
extended memory as expanded memory.  It is also possible that
SMARTDrive (SMARTDRV.EXE) is taking up too much of the available
extended memory or that other programs or TSRs are using up the
memory.  Please refer to the Microsoft Windows User's Guide for
information regarding parameters for SMARTDRV.EXE.

Are there any abnormalities with your CONFIG.SYS file?  Do you
have sufficient FILES and BUFFERS allocated?  Is HIMEM.SYS being
loaded before any other device drivers?
As a general rule, you should have between 40 and 60 files
specified in the CONFIG.SYS file.  If a disk-caching program such
as SMARTDrive (SMARTDRV.EXE) is being used, BUFFERS should be in
the 10-15 range.  If you are not using a disk-cache, BUFFERS
should be in the 20-30 range.  Also, HIMEM.SYS should be loading
at the beginning of the CONFIG.SYS file, before any other device
drivers.

Does CHKDSK (check disk) reveal any lost clusters, bad sectors,
or cross-linked files?
These problems could cause Windows and Windows applications to
behave erratically.  If CHKDSK reveals problems with the hard
drive, refer to either your DOS manual or a third-party disk
maintenance program for information on correcting these problems.
After correcting the problems with the hard disk or the files on
the hard disk, you should probably try reinstalling Windows and
any applications that seem to be related to the problem. 

Is the hard disk running out of available disk space?
There is no set rule as to how much disk space should be
available to run Windows and Windows applications. 
Recommendations range between 2M and 10M.  Because Windows and
Windows applications must open several temporary files during a
Windows session, you should have at least 2M of free hard disk
space, and more if possible.  Also, the free disk space should be
as contiguous as possible.  If the files on your hard drive are
highly fragmented and if the available disk space is not
contiguous, Windows may behave erratically.  A disk optimization
utility would be helpful in this situation.

Do the files in the WINDOWS and WINDOWS\SYSTEM directories
reflect the most correct dates? 
Occasionally, Windows Setup does not update all of the files in
these directories when Windows 3.1 is installed in the same
directory that contained Windows 3.0.  This can result in Windows
3.1 trying to use Windows 3.0 files.  If this is the case, you
should either install Windows 3.1 to another directory, or delete
all of the Windows files and reinstall Windows 3.1.

Does the SET TEMP command in the AUTOEXEC.BAT file point to a
valid directory?
If the SET TEMP command points to a directory that does not
exist, Windows can behave erratically, especially when printing
within Windows.

Do you have any TSRs or device drivers loading which may cause a
conflict?  Have you tried "booting vanilla?"
"Booting vanilla" in Windows is tricky because there are so many
places where programs and devices can load.  A clean (vanilla)
boot-up in Windows would meet the following requirements:

The CONFIG.SYS file should only contain the HIMEM.SYS driver,
FILES and BUFFERS commands, and device drivers which are critical
to your configuration (such as disk compression devices like
Stacker and SuperStor).  If you are unsure about a device driver,
leave it in.  It is much safer to boot from a floppy disk than it
is to modify the CONFIG.SYS and AUTOEXEC.BAT on the C: drive.

An AUTOEXEC.BAT file is not really necessary, but it could
contain a PROMPT command, a PATH command which includes the
Windows directory, and a SET TEMP command which specifies the
temporary directory for Windows.

The Startup group in Windows 3.1 should not contain any icons.

The Load= and Run= lines of the WIN.INI file should not have any
programs listed.  Semicolons can be placed in front of these
lines to disable them.

Any font programs which load when Windows starts should be turned
off.

The following statements in the [boot] section of SYSTEM.INI file
should be set to the Windows default settings as listed below:

          [boot]
          SHELL=PROGMAN.EXE
          SYSTEM.DRV=SYSTEM.DRV
          KEYBOARD.DRV=KEYBOARD.DRV
          MOUSE.DRV=MOUSE.DRV
          DISPLAY.DRV=VGA.DRV (or another Windows .DRV file)

Third-party programs may make modifications to the above lines
which potentially could cause the errors to occur.

Have you tried WordPerfect 6.0 for Windows' startup options (/FL
and /X)?
The /FL option corrects many GPF problems which are related to
display on high-resolution monitors.  This option sometimes
corrects GPF errors which are related to Print Preview.

The /X option bypasses the .BIF file.  The .BIF file contains
user-defined options such as Location of Files and custom screen
defaults.  If using /X corrects the problem, the .BIF file can be
renamed.  However, it will be recreated with WordPerfect's
default settings the next time WordPerfect 6.0 for Windows is
started.  If using the /X startup option corrects the GPF errors,
contact WordPerfect Customer Support so that this information can
be given to the Problem Resolution group.

Are the most current versions of HIMEM and SMARTDrive being used?
Use the versions of HIMEM.SYS and SMARTDrive that came with
Windows 3.1 if you are using a DOS version prior to 6.0.  Users
with MS-DOS 6.0 should use the versions that came with the
operating system.  It is possible that other versions of these
files could be found in other directories or in the root
directory.

Is the most current release date of WordPerfect 6.0 for Windows
being used?
Every effort is made to make WordPerfect 6.0 for Windows as error
free as possible before it is released.  As problems in the
program are reported and fixed, periodic maintenance (interim)
releases may occur.    Contact a WordPerfect Customer Support
technician to see if an interim is applicable in your situation.

If the errors occur when printing, are you selecting a Windows
driver with reported problems?  
Contact a WordPerfect Customer Support technician to determine if
your particular printer driver is known to cause problems.

Is Windows using 32-bit access (FastDisk)?
To check for 32-bit access (only available in 386 Enhanced mode),

1    Double-click Control-Panel, then double-click the 386
     Enhanced icon.

2    Click Virtual Memory, then click Change.  

3    Make sure that the 32-bit access box is not checked.  Some
     controller cards are not compatible with FastDisk.

Do the errors occur if Windows is started with the command WIN
/D:XVSF?
The /X option excludes the upper memory area and is equivalent to
placing the command EMMExclude=A000-EFFF in the SYSTEM.INI file.

The /V option gives the hard drive, rather than Windows 386
Enhanced mode, control over how hard disk interrupts are
processed.

The /S option makes the System ROM Break Point = False.

The /F option turns 32-bit access (FastDisk) off.

Have you tried reinstalling both Windows and WordPerfect for
Windows?
Reinstalling Windows and WordPerfect 6.0 for Windows has been
known to correct GPF problems on several occasions and can be
very effective in clearing up random or unknown GPF errors. 
However, this step is recommended only after all other
troubleshooting options have been exhausted.


Other Troubleshooting Possibilities

Have you recently optimized the hard drive?
Optimizing the hard drive on a regular basis helps prevent files
from becoming fragmented and also makes the available disk space
contiguous.  A highly fragmented hard drive could cause Windows
applications to behave unpredictably, especially if disk space is
getting low.  There are several third-party utilities that can be
used to optimize your hard drive.  Contact your dealer for
further information regarding these utility programs.

Is the correct version of DOS being used on the machine? 
A machine should have the proper MS-DOS version for its hardware
type.  Original equipment manufacturer (OEM) versions of MS-DOS,
such as COMPAQ MS-DOS or IBM PC-DOS, should be used only on their
respective OEM platforms.

Did you encounter any problems during the installation of
Windows?
If the machine locked up during Windows installation, it is
possible that Windows Setup identified your hardware
configuration incorrectly.  If you manually identified the
hardware configuration and did not identify it correctly, Windows
will behave erratically.

Does a machine switch need to be used with HIMEM.SYS?
Refer to the Microsoft Windows User's Guide for information on
HIMEM's switches.

Is the Windows swap file damaged?
If the physical location of the swap file contains bad sectors,
an error can occur.  Windows will assume the data area of the
swap file is valid.  However, if code is swapped to a damaged
area, the data will also be damaged.  If you suspect that this
may be the problem, change the swap file to a temporary swap file
and restart the machine.  Refer to your Microsoft Windows User's
Guide for information on changing virtual memory settings for the
swap file.

For more information, please call WordPerfect Corporation's
Information Services at (800) 451-5151 (US) or (800) 321-2318
(Canada).




WordPerfect Corporation 1993


WordPerfect Corporation
1555 N. Technology Way
Orem, UT 84057-2399


WordPerfect is a registered trademark of WordPerfect Corporation
within the United States and other countries.
