[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] memory issues with gsl matrix and vector views - causes a
Re: [Help-gsl] memory issues with gsl matrix and vector views - causes a core dump/access violation
Mon, 26 Mar 2012 11:15:19 +0200
Am 26. März 2012 04:32 schrieb Ted Byers:
> So, I went further, and if I replace the shared_array by naked pointers, and
> apply operator delete to them at the very end of the function, the same
> problem arises. So what can possibly be wrong in this code, or is it the
> case GSL is doing something odd behind the scenes that causes the core dump?
have you looked at the backtrace of the crash  or used Valgrind to
check if you're causing some kind of memory corruption  ? In my
experience, these are the two most helpful things you can do when
facing any kind of mysterious crash.
 gdb <name of executable>
At gdb prompt, type r <Enter>, wait for crash, type bt <enter>
That tells you where exactly the crash occurs.
 valgrind <name of executable>
(note that this will slow down your program considerably)