I can confirm this, and the backtrace looks similar:

#0  0x0000000800000005 in ?? ()
#1  0x00007ffff7a1d879 in _Unwind_ForcedUnwind_Phase2 (exc=0x555555614e90, 
context=0x7fffffffdd70, frames_p=0x7fffffffdc78) at 
../../../src/libgcc/unwind.inc:170
#2  0x00007ffff7a1e14d in _Unwind_Resume (exc=exc@entry=0x555555614e90) at 
../../../src/libgcc/unwind.inc:243
#3  0x0000555555560c65 in __gnu_cxx::new_allocator<char>::~new_allocator 
(this=<optimized out>, __in_chrg=<optimized out>) at 
/usr/include/c++/9/ext/new_allocator.h:89
#4  std::allocator<char>::~allocator (this=0x7fffffffdeb0, __in_chrg=<optimized 
out>) at /usr/include/c++/9/bits/allocator.h:153
#5  std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::_Alloc_hider::~_Alloc_hider (this=<optimized out>, 
__in_chrg=<optimized out>) at /usr/include/c++/9/bits/basic_string.h:150
#6  std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char> >::~basic_string (this=<optimized out>, 
__in_chrg=<optimized out>) at /usr/include/c++/9/bits/basic_string.h:658
#7  Levels::addLevel (this=<optimized out>, 
file="/usr/share/numptyphysics/L99_Gravity_Test.nph", rank=99, index=-1) at 
Levels.cpp:117

valgrind says:

Invalid read of size 8
   at 0x4DFA810: ??? (in /usr/lib/x86_64-linux-gnu/libgcc_s.so.1)
   by 0x4DFB14C: _Unwind_Resume (in /usr/lib/x86_64-linux-gnu/libgcc_s.so.1)
   by 0x114C64: ~new_allocator (new_allocator.h:89)
   by 0x114C64: ~allocator (allocator.h:153)
   by 0x114C64: ~_Alloc_hider (basic_string.h:150)
   by 0x114C64: ~basic_string (basic_string.h:658)
   by 0x114C64: Levels::addLevel(std::__cxx11::basic_string<char, 
std::char_traits<char>, std::allocator<char> > const&, int, int) [clone .cold] 
(Levels.cpp:117)
   by 0x11C9B3: Levels::addPath(char const*) (Levels.cpp:93)
   by 0x11C8CD: Levels::addPath(char const*) (Levels.cpp:104)
   by 0x12C7FE: runGame (App.cpp:184)
   by 0x12C7FE: run (App.cpp:110)
   by 0x12C7FE: npmain(int, char**) (App.cpp:372)
   by 0x1174FA: main (OsFreeDesktop.cpp:133)
 Address 0x68ec6b8 is 0 bytes after a block of size 24 alloc'd
   at 0x4838DEF: operator new(unsigned long) (in 
/usr/lib/x86_64-linux-gnu/valgrind/vgpreload_memcheck-amd64-linux.so)
   by 0x12BD89: runGame (App.cpp:173)
   by 0x12BD89: run (App.cpp:110)
   by 0x12BD89: npmain(int, char**) (App.cpp:372)
   by 0x1174FA: main (OsFreeDesktop.cpp:133)


Some debugging suggests that the string being destroyed when it crashes is
the "My Levels" std::string created from the static const char
MISC_COLLECTION[] in Levels::addLevel() (no idea what is the problem with
this code).

-- 
WBR, wRAR

Attachment: signature.asc
Description: PGP signature

Reply via email to