KERN EXEC 3

Login to reply to this topic.
Tue, 2005-05-24 06:11
Joined: 2005-01-31
Forum posts: 122
Hi
I have created an app which has a setting list in it. The list shows fine but after exiting from app I get KERN EXEC 3.
The documentation says it is an unhandled exception most probably a dereferenced NULL. What does dereferencing NULL mean anyway? The problem is I dont what to make of this KERN EXEC 3.

Regards,
kurtrips

Tue, 2005-05-24 21:05
Joined: 2004-11-25
Forum posts: 12
Re: KERN EXEC 3
You are trying to access a memory address via a pointer whose value is NULL. For example:

"int * aPointer;
aPointer = NULL;
int anInteger;
anInteger = *aPointer"

The above will fail on the last line with KERN EXEC 3.

Other piece of code that has the same problem is:

"class C {
public:
    int *iInteger;
}; // C

....

C *myClass = NULL;

int anInteger;

anInteger = myClass->iInteger;"

This will also fail on the last line, since "myClass" has the value "NULL".

However, these mistakes are easily caught using a debugger. Do you have one to use?



panayotis

  • Login to reply to this topic.