Re: segmentation fault when window closes



On 25 September 2010 14:20, Murray Cumming <murrayc murrayc com> wrote:
> On Sat, 2010-09-25 at 10:23 +0100, Piscium wrote:
>> which meant that the
>> memory of C++ objects was being corrupted by the old C function.
>
> valgrind would have shown you this, saving you lots of time.
>

I did try valgrind yesterday, for the first time. I just used the
basic memory check that I saw in a Getting Started document: "valgrind
--leak-check=yes my_program_name". It did not tell me anything
interesting before the crash happened (when the memory was already
corrupted). After the crash it gave me the same backtrace stack I got
with gdb plus thousands of lines about memory issues, so much so that
I could not get anything useful out of it.

I read that valgrind is a very powerful tool with lots of features, so
hopefully over time I will learn how to make better use of it.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]