February 23, 2008

General Protection Fault

General Protection Fault = GP Fault = GPF

You received this kind of error when the program is attempting accessing a read-only memory.

For example:

class Object
{
public:
  int nValue;
};

Object* pObject = NULL;
int nValueOfObject = pObject->nValue; // Accessing a memory which should not be accessed