This is a screenshot of the debugging session in KDevelop. It says it cannot access memory at address 0x0. Any ideas?
This is a screenshot of the debugging session in KDevelop. It says it cannot access memory at address 0x0. Any ideas?
And this is a screenshot of the an_GrowReconfigData-method that's called right before the line where the segmentation fault occurs.
Qt Code:
pInfo->data = (an_Byte*) realloc(pInfo->data, pInfo->capacity);To copy to clipboard, switch view to plain text mode
I think pInfo->data somehow ends up as 0x0 after the call to realloc. Could this be? And do you have a solution?
Based on the first screenshot I take it that "pInfo" of pInfo->data is null. A full backtrace would be nicer though... especially one from a program compiled with -ggdb.
BTW. You should check the result of realloc...
Last edited by wysota; 20th February 2006 at 19:29.
I forgot to call a method at the beginning of my program that initialised data in the first place.![]()
Bookmarks