FIX Large Sub or Function or Module Can Cause GP Fault or UAELast reviewed: October 30, 1997Article ID: Q95285 |
2.00
WINDOWS
kbenv kbbuglist
The information in this article applies to: - Standard and Professional editions of Microsoft Visual Basic programming system for Windows, version 2.0
SYMPTOMSYou can get a general protection (GP) fault in Windows version 3.1 or an unrecoverable application error (UAE) in Windows version 3.0 when making an .EXE file when you approach the maximum size limit of a sub or function or when a form or code module is larger than about 400K.
WORKAROUNDTo work around the problem, break up the code in the large sub, function, or module. In most cases, you will need to identify the largest sub, function, or module in your project and work on breaking it up. If this problem persists after breaking up the largest procedure or module, break up other large procedures or modules until you overcome the problem.
STATUSMicrosoft has confirmed this to be a problem in Visual Basic version 2.0 for Windows. This problem was corrected in Microsoft Visual Basic version 3.0 for Windows.
MORE INFORMATIONThe problem occurs with a sub or function because Visual Basic attempts to generate more than 64K of code for the sub or function. However, when you run it from the VB.EXE programming environment, it is possible that the amount of interpreted code generated for the sub or function is slightly less than 64K. The problem occurs with a code module when the compiler attempts to exceed a compiler segment limit. Because of these problems, it is usually possible to run the program successfully from the operating environment, but you cannot make an .EXE file. In Windows version 3.0, there is no way to know whether a large procedure or module is the source of the problem. However, in Windows version 3.1, a GP fault occurs at the address 0067:4C4D if a sub or function is too large or at 0067:4C4E if compiler segment limits were exceeded when you attempted to make an .EXE file.
|
Additional reference words: buglist2.00 fixlist3.00 2.00 3.00 GPF
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |