OOPS, sorry - Wrong button on the email client. :-( Cheers
Ted > -----Original Message----- > From: Frank Reininghaus [mailto:[email protected]] > Sent: March-26-12 8:17 AM > To: Ted Byers; [email protected] > Subject: Re: [Help-gsl] memory issues with gsl matrix and vector views - causes > a core dump/access violation > > Please keep replies on-list. > > Am 26. März 2012 14:00 schrieb Ted Byers: > > > > > >> -----Original Message----- > >> From: Frank Reininghaus [mailto:[email protected]] > >> Sent: March-26-12 5:15 AM > >> To: Ted Byers > >> Cc: [email protected] > >> Subject: Re: [Help-gsl] memory issues with gsl matrix and vector > >> views - > > causes > >> a core dump/access violation > >> > > > >> 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 [1] or used Valgrind to > > check if > >> you're causing some kind of memory corruption [2] ? In my experience, > > these > >> are the two most helpful things you can do when facing any kind of > > mysterious > >> crash. > >> > >> Best regards, > >> Frank > >> > >> [1] gdb <name of executable> > >> At gdb prompt, type r <Enter>, wait for crash, type bt <enter> That > >> tells > > you > >> where exactly the crash occurs. > >> > > > > Perhaps, but only if you can understand the stuff it tells you. Does > > the following tell you anything? > > > > > > Program received signal SIGABRT, Aborted. > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > 0x00000000 in ?? () > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > (gdb) bt > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > #0 0x00000000 in ?? () > > #1 0x77a1f8b1 in ntdll!RtlUpdateClonedSRWLock () from > > /cygdrive/c/Windows/system32/ntdll.dll > > #2 0x75670a91 in WaitForSingleObjectEx () from > > /cygdrive/c/Windows/syswow64/KERNELBASE.dll > > #3 0x000000fc in ?? () > > #4 0x00000000 in ?? () > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > (gdb) bt > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > #0 0x00000000 in ?? () > > #1 0x77a1f8b1 in ntdll!RtlUpdateClonedSRWLock () from > > /cygdrive/c/Windows/system32/ntdll.dll > > #2 0x75670a91 in WaitForSingleObjectEx () from > > /cygdrive/c/Windows/syswow64/KERNELBASE.dll > > #3 0x000000fc in ?? () > > #4 0x00000000 in ?? () > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > (gdb) bt > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > > > #0 0x00000000 in ?? () > > #1 0x77a1f8b1 in ntdll!RtlUpdateClonedSRWLock () from > > /cygdrive/c/Windows/system32/ntdll.dll > > #2 0x75670a91 in WaitForSingleObjectEx () from > > /cygdrive/c/Windows/syswow64/KERNELBASE.dll > > #3 0x000000fc in ?? () > > #4 0x00000000 in ?? () > > warning: (Internal error: pc 0x0 in read in psymtab, but not in > > symtab.) > > I don't think that this backtrace tells much about the cause of the problem (I'm > not an expert for debugging on Windows though). > > >> [2] valgrind <name of executable> > >> (note that this will slow down your program considerably) > > > > Valgrind doesn't work on Windows. > > Cheers, > Frank
