PRODUCT : Turbo Debugger NUMBER : 648 VERSION : 2.0 OS : WIN DATE : October 22, 1993 PAGE : 1/1 TITLE : Common Causes of General Protection Faults in TDW The following are common causes for General Protection faults while debugging a Windows application under Turbo Debugger for Windows (TDW.EXE): a) ram has called a Windows API function with incorrect arguments. For example, passing WndProc a handle which is invalid. b) The segment part of a pointer the program is using is invalid. In protected mode it is an index into the selector table which has the actual segment address. If that index references a spot in the table which it shouldn't, or goes outside the bounds of the table, it can cause a GP. c) The user's WndProc function uses a handle between function calls which has not been declared static, so the value has changed. d) The CreateWindow API function calls your WndProc function with 3 messages. If WndProc is not debugged, it can cause problems (like a GP). DISCLAIMER: You have the right to use this technical information subject to the terms of the No-Nonsense License Statement that you received with the Borland product to which this information pertains.