home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
MEM_MAN
/
QEXCPT13.ZIP
/
EXCEPT13.TEC
Wrap
Text File
|
1992-03-09
|
8KB
|
125 lines
ID:13 Exception #12 and #13 and QEMM-386
Quarterdeck Technical Note #142
by Bob Perry and Dan Sallitt
last revision: 12 February 1992
Q: WHAT IS AN "Exception #12"? WHAT IS AN "Exception #13"?
Q: WHAT CAN BE DONE TO PREVENT EXCEPTION #12s AND #13s?
EXCEPTIONS
Exceptions are unusual or invalid conditions associated with the
execution of a particular instruction by the 80386 processor (or higher
processors). The 80386 recognizes several different classes of exceptions,
and assigns a different vector number to each class. The DESQview-386 memory
manager, QEMM-386, has been designed to capture these 80386 exception vectors
and display them directly to the user.
EXCEPTION #13
Exception #13 is the "General Protection Fault" error. Any privileged
instruction or any instruction that references memory can trigger an Exception
#13. It is the most commonly encountered 80386 fault.
The two circumstances that can cause an Exception #13 to occur require
very different troubleshooting approaches. In the first case, privileged
instructions, the Exception #13 could indicate that a program has violated the
protected mode of the 80386 by executing a privileged instruction or I/O
reference. Thus, when the prompt "Terminate, Reboot or Continue?" is issued,
the "Continue" option puts the system back into real mode, and the program
should continue to execute. (After choosing the "Continue" option, one should
not necessarily assume that the system is stable. A reboot at the earliest
convenient time is probably wise.) It is possible that none of these options
will work, and you must reboot your system.
It is the second case, instructions that reference memory, that is far
more common to DESQview 386 (and QEMM-386) users. Here the exception may
indicate that an application has a bug, or that adverse circumstances have
sent it out of control. It has overwritten its memory partition, and may in
fact be running wild, executing meaningless code. This situation can occur
with some programs that were written for use on the 8088 processor and may not
be usable in the 80386's virtual 8086 mode.
A few other programs may not be compatible with QEMM-386. In some cases
the problem occurs even without QEMM-386 present (in which case it manifests
itself as a crash instead of an error message). What this usually adds up to
is that when "Terminate, Reboot or Continue" is displayed, the user can
usually only "Terminate."
On a technical level, this overwriting of the memory partition generally
means that a word or a double word value has been fetched from or written to
the last byte of a segment. The problem or "bug" in the application program
or in the system shows up as an attempt to wrap the value to the next segment
of memory.
WHAT CAN THE USER DO TO PREVENT EXCEPTION #13s?
IN DESQVIEW
The DESQview 386 user should start with two simple steps: first, run
Change a Program and raise the number in "Maximum program memory size" (on the
Advanced Options screen) 999. Second, the user can try to increase the
protection level of the afflicted window to 3, which will not remove the
source of the Exception #13, but may pass more descriptive error messages
through to the user.
OUTSIDE OF DESQVIEW
When Exception #13's are obtained outside of DESQview they are either
caused by applications written for the 80386 protected mode or they are not.
If the faulting application is written for the protected mode of the 80386, it
is likely that this program has no VCPI (Virtual Control Program Interface)
support. Since QEMM-386 is a protected mode program, such faulting
applications cannot be run under QEMM without VCPI. The user has no choice
but to reboot without QEMM, and contact the developer of the faulting
application to request VCPI support.
If the faulting application was not written for the protected mode of the
80386, a good possibility is that the QEMM-386 user has installed QEMM-386
with the RAM parameter (which is necessary to LOADHI drivers and TSRs). In
this case the faulting program may be running in an area of high RAM that
contains a memory conflict. To correct this problem, the user may choose to
RAM only specific areas of memory, as described on page 6 of the QEMM-386
manual, rather than to RAM all mappable areas. Of course, an area of conflict
that is not RAMmed is still an area of conflict, and may cause problems if
another application tries to map expanded memory into that region. A better
solution to such memory conflicts might be to use the EXCLUDE parameter
(described on page 5 of the QEMM manual) on the area in conflict.
To find a portion of the address space which should be excluded you
should consult the "Analysis" section of the "QEMM.COM" chapter of the QEMM-
386 manual. For greater detail, see the Quarterdeck Technical Bulletin #219,
"Using QEMM-386's Analysis Feature".
Some pieces of hardware can come into conflict with QEMM-386 or DESQview
and generate Exception #13 errors. The most frequent offenders are bus-
mastering devices (hard disk controllers, network cards, CD-ROM controllers,
etc.) and autoswitching video cards. Bus-mastering hard disk controllers
often cause Exception #13 errors upon any use of the LOADHI programs, for
instance. For approaches to this problem, see the Quarterdeck Technical Note
#121, "Bus-Mastering Devices and QEMM-386." Not all autoswitching video cards
come into conflict with QEMM-386 or other pieces of software. When a conflict
occurs, however, it does not always take the form of a video problem, and
sometimes results in the Exception #13 message. Disabling autoswitching is
the only solution to such a problem.
General troubleshooting methods, like temporarily removing all TSR's,
device drivers and questionable QEMM-386 parameters, often provide valuable
information about the exception error. It sometimes happens that a
circumstance that generates an Exception #13 with QEMM-386 present simply
causes the machine to crash without any message when QEMM-386 is removed. In
such a case, QEMM-386 is simply the bearer of bad news.
EXCEPTION #12
Exception #12 is the "Stack Segment" fault. The stack segment fault
occurs when the processor detects certain problems with the segment addressed
by the SS segment register. This exception too can be the result either of a
bug in a program or of some system malfunction that eventually results in a
stack error. All of the above methods of troubleshooting Exception #13
messages should also be used when trying to track down the cause of an
Exception #12. The one difference that should be kept in mind is that
Exception #12 messages are not generated by an application simply going into
protected mode, executing privileged instructions, or accessing privileged
registers. Therefore you need not consider the possibility that the
application needs to incorporate VCPI support to run with QEMM.
************************************************************************
*This technical note may be copied and distributed freely as long as it*
*is distributed in its entirety and it is not distributed for profit. *
* Copyright (C) 1990-2 by Quarterdeck Office Systems *
************************ E N D O F F I L E *************************