home *** CD-ROM | disk | FTP | other *** search
/ CICA 1992 November / CICA_MS_Windows_CD-ROM_Walnut_Creek_November_1992.iso / win3 / misc / ww0524 / ww0524.txt
Text File  |  1992-03-27  |  21KB  |  396 lines

  1. ======================================================================
  2.     Microsoft Product Support Services Application Note (Text File)
  3.                WW0524: TROUBLESHOOTING GP FAULTS (UAEs)
  4. ======================================================================
  5.                                                    Revision Date: 3/92
  6.                                                       No Disk Included
  7.  
  8. The following information applies to Microsoft Windows version 3.1.
  9.  
  10.  --------------------------------------------------------------------
  11. | INFORMATION PROVIDED IN THIS DOCUMENT AND ANY SOFTWARE THAT MAY    |
  12. | ACCOMPANY THIS DOCUMENT (collectively referred to as an            |
  13. | Application Note) IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY      |
  14. | KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO    |
  15. | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A     |
  16. | PARTICULAR PURPOSE. The user assumes the entire risk as to the     |
  17. | accuracy and the use of this Application Note. This Application    |
  18. | Note may be copied and distributed subject to the following        |
  19. | conditions: 1) All text must be copied without modification and    |
  20. | all pages must be included; 2) If software is included, all files  |
  21. | on the disk(s) must be copied without modification [the MS-DOS(R)  |
  22. | utility DISKCOPY is appropriate for this purpose]; 3) All          |
  23. | components of this Application Note must be distributed together;  |
  24. | and 4) This Application Note may not be distributed for profit.    |
  25. |                                                                    |
  26. | Copyright 1992 Microsoft Corporation. All Rights Reserved.         |
  27. | Microsoft, MS-DOS, and the Microsoft logo are registered           |
  28. | trademarks and Windows is a trademark of Microsoft Corporation.    |
  29.  --------------------------------------------------------------------
  30.  
  31. WHAT IS A GENERAL PROTECTION (GP) FAULT?
  32. ========================================
  33.  
  34. A general protection (GP) fault in Windows 3.1 (referred to as an
  35. unrecoverable application error [UAE] in Windows 3.0) occurs only in
  36. standard and 386 enhanced mode Windows. A GP fault signifies that
  37. something unexpected has happened within the Windows environment,
  38. usually an improper memory access. In other words, something running
  39. within the Windows environment has made a call to a location in memory
  40. that it did not have access to, potentially overwriting and corrupting
  41. other program code in that area of memory. More specifically, an
  42. application or Windows component might read or write to a memory
  43. location that it has not been preallocated, or memory that it does not
  44. "own." All memory management within Windows is handled by the Windows
  45. environment itself, and when applications and Windows components
  46. directly access memory, the result is often a GP fault.
  47.  
  48. Another situation where a GP fault may occur involves the passing of
  49. parameters between applications and the Windows environment. Invalid
  50. parameters affect the performance of Windows and its applications by
  51. forcing an invalid instruction. This is usually the result of an
  52. application's internal program code incorrectly passing specific data
  53. that could not be correctly interpreted for Windows or another Windows
  54. application. The result is often a GP fault.
  55.  
  56. What Is A System Integrity Violation?
  57. -------------------------------------
  58.  
  59. The message referring to the violation of system integrity indicates a
  60. general protection violation, or the equivalent of a GP fault that is
  61. caused by an MS-DOS-based application. Similar to the GP fault, the
  62. system integrity violation indicates that an MS-DOS application is
  63. accessing memory that does not belong to that specific application.
  64. Since Windows is managing memory in this situation, the MS-DOS
  65. application's memory access will often corrupt Windows program code or
  66. vital data. The result is an application execution error generated
  67. from Windows reporting that the "application has violated system
  68. integrity due to an invalid general protection fault and will be
  69. terminated." This message can also occur when an MS-DOS-based
  70. application has tried to directly access a system's hardware
  71. component.
  72.  
  73. How Does Windows 3.1 Handle A GP Fault?
  74. ---------------------------------------
  75.  
  76. A new feature of Windows 3.1 called parameter validation allows
  77. Windows to check for invalid parameters passed between Windows and
  78. applications running in the Windows environment. Windows 3.1 is also
  79. designed to better manage and maintain which applications "own"
  80. specific memory locations and system resources. As a result, Windows
  81. 3.1 is more capable of recovering a particular application's RAM
  82. memory and system resources. If you do see a GP fault message while
  83. running Windows 3.1, the message will provide specific information
  84. about which applications and Windows components were running at the
  85. time of the error, and where the error occurred. Depending on the
  86. severity of the GP fault, Windows 3.1 can continue to run the
  87. application that caused the fault, allowing you to save your work
  88. before exiting the application. You can also use Dr. Watson, a program
  89. provided with Windows 3.1, to learn more about the cause of the GP
  90. fault.
  91.  
  92. Local Restart
  93. -------------
  94.  
  95. Depending on the severity of a GP fault in Windows 3.1, you can press
  96. CTRL+ALT+DEL to display information concerning the system integrity
  97. and/or information concerning the application that caused the fault.
  98. The severity of a GP fault can be measured by how well an application
  99. functions within the Windows environment after the fault has occurred.
  100. If CTRL+ALT+DEL is pressed when a less severe fault occurs, the
  101. following message appears on the screen:
  102.  
  103.    System has either become busy or has become unstable
  104.  
  105.     - Press any key to return to Windows and wait
  106.     - Press CTRL+ALT+DEL again to restart your computer (all unsaved
  107.       information will be lost)
  108.    
  109. If CTRL+ALT+DEL is pressed when a more severe fault occurs, this
  110. message will appear:
  111.    
  112.    This Windows application has stopped responding to the system
  113.   
  114.     - Press ESC to cancel and return to Windows
  115.     - Press ENTER to close this application (all unsaved information
  116.       will be lost)
  117.     - Press CTRL+ALT+DEL again to restart your computer (all unsaved
  118.       information will be lost)
  119.  
  120. Troubleshooting GP Faults
  121. -------------------------
  122.  
  123.  1. If you are running Windows in standard or 386 enhanced mode, check
  124.     to see if you are running an application that was designed for an
  125.     earlier version (2.x) of Windows.
  126.  
  127.     If an application has not been properly designed to function
  128.     correctly under Windows protected mode, it will cause an error. If
  129.     an application is designed for Windows versions 2.0, 2.03, 2.1, and
  130.     2.11, the application will generate a dialog box when executed that
  131.     advises you of this error. Such applications should be run only
  132.     under Windows 3.0 real mode, as the dialog box suggests. Since real
  133.     mode is not available in Windows 3.1, contact the application's
  134.     manufacturer for possible workarounds or to obtain an upgrade of
  135.     the software.
  136.  
  137.  2. Check for incompatible terminate-and-stay-resident (TSR) programs
  138.     or unsupported device drivers in your CONFIG.SYS or AUTOEXEC.BAT
  139.     file.
  140.  
  141.     Temporarily comment out all lines relating to suspect drivers and
  142.     TSR programs to bring the system to a minimum configuration for
  143.     testing purposes. (To comment out a line, use a text editor such as
  144.     Notepad, open the AUTOEXEC.BAT or CONFIG.SYS file, and type "rem"
  145.     (without the quotation marks) at the beginning of the line.) If
  146.     this eliminates the problem, then the problem was related to one of
  147.     the drivers or TSR programs that was commented out. Reinstate the
  148.     removed lines one by one until the problem reappears, thus showing
  149.     which line was loading the TSR program or driver causing to the
  150.     error.
  151.  
  152.     Minimum MS-DOS configuration for Windows versions 3.0 and 3.1:
  153.  
  154.       CONFIG.SYS                         AUTOEXEC.BAT
  155.       --------------------------------------------------------------------
  156.       files=50                           path c:\;c:\dos;c:\windows
  157.       buffers=30                        prompt $p$g
  158.       device=c:\[path]\himem.sys set temp=c:\
  159.       stacks=9,256      (Windows 3.1 only)
  160.       
  161.            NOTE: Before modifying these files, make sure you don't
  162.            comment out lines pertaining to other hardware-specific
  163.            device drivers, such as Stacker, extended memory boards,
  164.            third-party disk partitioning programs, and so on. 
  165.               If you do not know the purpose of a line in your CONFIG.SYS 
  166.            or AUTOEXEC.BAT file, leave that line as is.
  167.  
  168.  3. Try different machine switches for the HIMEM.SYS device driver in
  169.     your CONFIG.SYS file.
  170.  
  171.     HIMEM.SYS is used to access the high memory area (HMA), which is
  172.     the first 64K of extended memory (1024K-1088K). HIMEM.SYS is also
  173.     the default device driver Windows uses to access extended memory in
  174.     standard and 386 enhanced modes. HIMEM.SYS accesses the HMA through
  175.     the A20 line of memory, and uses what are known as A20 "handlers"
  176.     to do this. The method used to access the HMA depends on the
  177.     system, so the A20 handler needed for this access varies as well.
  178.     HIMEM.SYS follows a certain routine at load time to determine which
  179.     A20 handler is appropriate for your machine. Unfortunately, some
  180.     nonstandard machines do not respond to the tests that HIMEM.SYS
  181.     administers during its routine, which can result in the wrong A20
  182.     handler being selected. Using the incorrect A20 handler can result
  183.     in everything from the machine stopping when HIMEM.SYS loads to
  184.     erratic Windows performance. The /MACHINE switch is used to gain
  185.     control of the A20 line by forcing HIMEM.SYS to use a particular
  186.     handler. The handler numbers range from 1-16, and 18. For most 100-
  187.     percent-compatible machines, one of the compatible /M:1, /M:11,
  188.     /M:12, and /M:13 A20 handler switches will work. Although other
  189.     switches are intended for use with certain hardware, one of these
  190.     other switches may be required for proper operation on certain
  191.     machines if the standard switches do not work. It is recommended
  192.     that you check your most current MS-DOS or Windows manual for more
  193.     information about using the /MACHINE switch with HIMEM.SYS. An
  194.     example of this statement in the CONFIG.SYS file is as follows:
  195.  
  196.        device=c:[\path]\himem.sys /machine:1
  197.      -or-
  198.        device=c:[\path]\himem.sys /m:1
  199.  
  200.       NOTE: When you are testing to see which A20 handler is
  201.       appropriate, make sure you have a system (startup) MS-DOS disk
  202.       with an ASCII text editor (such as MS-DOS Edit or Edlin), because
  203.       some A20 handlers will cause your machine to stop.
  204.  
  205.  4. Check to see if an incorrect machine and/or network was
  206.     selected while installing Windows.
  207.  
  208.     Some machines and networks require you to override the default
  209.     detection made by Windows Setup and make a specific selection. If
  210.     the correct selection is not made, Windows will not operate
  211.     correctly, or a GP fault may occur.
  212.  
  213.     Machines that must be specifically selected in Windows Setup
  214.     include the following:
  215.                                             Windows
  216.       Machine                                    3.0  3.1
  217.       ---------------------------------------------------      
  218.       AST: all 80386- and 80486-based machines    X   X
  219.       AT&T PC                                         X
  220.       AT&T NSX 20: Safari Notebook                    X
  221.       Everex Step 386/25 (or compatible)          X   X
  222.       Hewlett-Packard: all machines               X   X
  223.       IBM PS/2 Model 70P                              X
  224.       IBM PS/2 Model L40sx                            X
  225.       Intel 386SL-based system with APM               X
  226.       MS-DOS system with APM                          X
  227.       NCR: all 80386- and 80486-based machines        X
  228.       NCR PC386sx                                 X   X
  229.       NCR PC 925                                  X
  230.       NEC PowerMate SX Plus                       X   X
  231.       NEC ProSpeed 386                            X   X
  232.       Toshiba 1200XE                                  X
  233.       Toshiba 1600                                X   X
  234.       Toshiba 5200                                X   X
  235.       Zenith: all 80386-based machines            X   X
  236.    
  237.     Networks that must be specifically selected in Windows Setup
  238.     include the following:
  239.  
  240.                                                        Windows
  241.       Network                                          3.0  3.1
  242.       --------------------------------------------------------------
  243.       3Com 3+Open LAN Manager (XNS only)                X
  244.       3Com 3+Open                                             X
  245.       3Com 3+Share                                     X    X
  246.       Artisoft LANtastic                                          X
  247.       Banyan VINES 4.0                                      X    X
  248.       DEC Pathworks                                               X
  249.       IBM OS/2 Lan Server                                         X
  250.       IBM PC LAN Program                               X    X
  251.       LAN Manager versions 1.x (or 100-percent compatible)   X    X
  252.       LAN Manager 2.0 (or 100-percent compatible)            X    X
  253.       LAN Manager 2.1 (or 100-percent compatible)                 X
  254.       Novell NetWare                                              X
  255.       TCS 10NET                                                   X
  256.  
  257.     If you did not choose your machine or network specifically during
  258.     Setup, you should exit Windows and run the MS-DOS version of Setup
  259.     from the WINDOWS directory. This will allow you to make the proper
  260.     selection without having to completely reinstall Windows.
  261.  
  262.  5. A third-party Windows device driver may not be functioning
  263.     properly. Run the MS-DOS version of the Windows Setup program and
  264.     select the lowest level configuration of drivers for the listed
  265.     hardware devices.
  266.  
  267.     A good troubleshooting technique is to configure Windows through
  268.     Setup for the minimum necessary hardware devices. When
  269.     troubleshooting GP faults, only standard Windows device drivers are
  270.     recommended. For example:
  271.  
  272.       Display: EGA or VGA, depending on video type
  273.                (systems with VGA cards/monitors can usually use
  274.                 EGA)
  275.       Mouse:   No mouse or other pointing device
  276.       Network: No network installed
  277.  
  278.  6. Check for unsupported third-party drivers in the Windows
  279.     SYSTEM.INI or WIN.INI files.
  280.  
  281.     Temporarily comment out all lines relating to suspect third-party
  282.     drivers to bring Windows to a minimum configuration for testing
  283.     purposes. (To comment out a line, use a text editor such as
  284.     Notepad, open the SYSTEM.INI or WIN.INI file, and type "rem"
  285.     (without the quotation marks) at the beginning of the line.) If
  286.     this eliminates the problem, then the problem was most likely
  287.     caused by one of the drivers that was removed. Replace the removed
  288.     lines one by one until the problem reappears, thus showing which
  289.     line was causing the problem. The installation of certain
  290.     applications may modify these two files to enhance the overall
  291.     functionality of Windows or provide additional features to the
  292.     Windows environment. The statements below are the most commonly
  293.     altered by third-party software manufacturers. As a result, verify
  294.     the minimum default Windows configuration.
  295.  
  296.     Check the following statements to verify the default Windows
  297.     configuration of the most commonly altered statements:
  298.        
  299.       SYSTEM.INI                  WIN.INI
  300.       ---------------------------------------------------
  301.       [boot]                      [windows]
  302.       shell=progman.exe           load=
  303.       system.drv=system.drv         run=
  304.       keyboard.drv=keyboard.drv
  305.       mouse.drv=mouse.drv
  306.       display.drv=vga.drv
  307.  
  308.  7. Your system may have a page-mapping conflict in 386 enhanced
  309.     mode.
  310.  
  311.     Page-mapping conflicts occur only in 386 enhanced mode Windows,
  312.     most frequently in Windows 3.0. Windows 3.0 often will not see the
  313.     page frame or upper memory block mapping performed by 386 expanded
  314.     memory managers (EMMs) and will map over those memory locations.
  315.     Windows 3.1 inherits the upper memory area (UMA) mapping
  316.     information from the EMM, so it will not map over memory locations
  317.     used by the EMM. However, both Windows 3.0 and 3.1 can experience
  318.     page-mapping conflicts with other devices or applications that use
  319.     the UMA. Test the problem under standard mode by running Windows
  320.     with the /s switch from the command prompt (type "win /s" [without
  321.     the quotation marks]).
  322.  
  323.     If the problem does not occur in standard mode, it may be a page-
  324.     mapping conflict in the adapter segment area of memory (between
  325.     640K and 1 MB). Edit the SYSTEM.INI file with Notepad or SysEdit
  326.     and insert the following line in the [386Enh] section:
  327.  
  328.       EMMExclude=A000-EFFF        (This line is not case sensitive.)
  329.  
  330.       NOTE: Because Windows 3.1 inherits its mapping information from
  331.       any EMM loaded before Windows, it is important to either disable
  332.       the EMM or exclude the same memory range (as shown above) with the
  333.       EMM itself. Mapping information inherited from the EMM will
  334.       override any entries in the SYSTEM.INI file.
  335.     
  336.     Performing the step described above will exclude the entire
  337.     adapter segment from mapping. If making this change solves the
  338.     problem, you may want to determine the position of all hardware
  339.     adapters in the adapter segment and exclude them specifically,
  340.     rather than excluding the entire region. Multiple EMMExclude lines
  341.     can be used if necessary. If you are using a Micro Channel
  342.     Architecture (MCA) bus machine such as an IBM PS/2, you can
  343.     determine the adapter location by restarting with the machine's
  344.     reference disk. If you are using an Industry Standard Architecture
  345.     (ISA) bus machine, consult your adapter documentation and/or your
  346.     manufacturer's technical support service for information on the
  347.     memory locations the bus machine uses. You will not want to leave
  348.     the entire range excluded, because Windows will not be able to use
  349.     any of the memory addresses in that range to set up such things as
  350.     expanded memory for MS-DOS applications.
  351.  
  352.     WINDOWS 3.1 ONLY: Use the command "win /3 /d:x" (without the
  353.     quotation marks) to load Windows from the command prompt. The /d:x
  354.     switch excludes the memory range A000-EFFF from mapping, similar to
  355.     the statement EMMExclude=A000-EFFF in the [386Enh] section of the 
  356.     SYSTEM.INI file. However, as with the EMMExclude= statement, this 
  357.     switch will be overridden by any settings inherited from an external
  358.     EMM. It is best to disable such EMMs if possible.
  359.  
  360.  8. Check the MS-DOS version you are running.
  361.  
  362.     A machine should have the proper MS-DOS version for its hardware
  363.     type. Original equipment manufacturer (OEM) versions of MS-DOS such
  364.     as COMPAQ MS-DOS or IBM PC-DOS should be used only on their
  365.     respective OEM hardware platforms (that is, COMPAQ MS-DOS only on
  366.     Compaq machines, IBM PC-DOS only on IBM machines).
  367.    
  368.  9. If you have a permanent swap file set up in Windows, it may be
  369.     corrupted.
  370.  
  371.     The integrity of a permanent swap file is important if these errors
  372.     continue. If the location of the swap file contains bad sectors, an
  373.     error can occur. Windows will assume the data area of the swap file
  374.     is valid. However, if code is swapped to a corrupt area, the data
  375.     will also be corrupted. Change the swap file to a temporary swap
  376.     file and restart the machine after first turning the computer
  377.     completely off. It may also be necessary to run a disk
  378.     optimization/defragmentation utility to improve the performance of
  379.     the Windows swap file.
  380.  
  381. 10. Reinstall the software causing the GP fault.
  382.  
  383.     If the GP fault can be tracked to a specific application, you may
  384.     need to reinstall that software. The files on disk may have become
  385.     corrupted or damaged or the application may not be properly
  386.     installed. You may also have to reinstall Windows. If the
  387.     SYSTEM.INI or WIN.INI file has been modified with poor results, a
  388.     new installation of Windows will ensure a clean, unaltered Windows
  389.     configuration.
  390.    
  391.     If all the above troubleshooting techniques have been exhausted and
  392.     the GP faults or UAEs still occur, you may have to contact your
  393.     hardware/software supplier for more information.
  394.  
  395.  
  396.