PCL Reference Manual > Introduction > Solving Problems
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Solving Problems
Just as all code can generate errors, all errors have a specific cause. A common source of errors and mysterious core dumps with PCL code is the misuse of string lengths and the sizes of arrays. There are no guarantees that a function will check the length of a string or the size of an array that is passed into the function. This can lead to a memory overwrite that will cause a core dump. Often the memory overwrite will not cause the code to fail immediately, it just sets the stage for a crash in an unrelated piece of code later somewhere else in your program. If the cause of a crash or core dump cannot seem to be isolated or it seems to move around for no discernible reason, check the lengths of strings and the sizes of arrays being passed as arguments to functions. Verify that calls to functions that dynamically allocated or free memory being used correctly and appropriately.