Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crashing, double-free memory corruption while trying a new game. #5037

Closed
shirishag75 opened this issue Dec 13, 2013 · 12 comments
Closed

crashing, double-free memory corruption while trying a new game. #5037

shirishag75 opened this issue Dec 13, 2013 · 12 comments
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes.

Comments

@shirishag75
Copy link

Hi all,
I am on Debian testing 64-bit. I am using the git master and compiling. The last few days it has been crashing after the game has been compiled in. This is the error I'm getting :-

~/games/cataclysm-DDA$ ./cataclysm-tiles
*** Error in `./cataclysm-tiles': double free or corruption (fasttop): 0x00000000020da420 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x7aa16)[0x7feb6cc3da16]
/lib/x86_64-linux-gnu/libc.so.6(+0x7b793)[0x7feb6cc3e793]
/usr/lib/x86_64-linux-gnu/libSDL_ttf-2.0.so.0(TTF_CloseFont+0x2c)[0x7feb6de63b1c]
./cataclysm-tiles[0x9e67ad]
./cataclysm-tiles[0x9e71c8]
./cataclysm-tiles[0x4c4ca1]
./cataclysm-tiles[0x6c19e7]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7feb6cbe4995]
./cataclysm-tiles[0x406fb9]
======= Memory map: ========
00400000-00c3a000 r-xp 00000000 08:08 21239585 /data/shirish/Games/cataclysm-DDA/cataclysm-tiles
00e3a000-00e3f000 rw-p 0083a000 08:08 21239585 /data/shirish/Games/cataclysm-DDA/cataclysm-tiles
00e3f000-00e5f000 rw-p 00000000 00:00 0
02048000-020ea000 rw-p 00000000 00:00 0 [heap]
7feb5c000000-7feb5c021000 rw-p 00000000 00:00 0
7feb5c021000-7feb60000000 ---p 00000000 00:00 0
7feb61270000-7feb61271000 ---p 00000000 00:00 0
7feb61271000-7feb61a71000 rw-p 00000000 00:00 0
7feb65724000-7feb65a72000 rw-s 00000000 00:04 21626900 /SYSV00000000 (deleted)
7feb65a72000-7feb65a77000 r-xp 00000000 08:06 3939697 /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7feb65a77000-7feb65c76000 ---p 00005000 08:06 3939697 /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7feb65c76000-7feb65c77000 r--p 00004000 08:06 3939697 /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7feb65c77000-7feb65c78000 rw-p 00005000 08:06 3939697 /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7feb65c78000-7feb65c81000 r-xp 00000000 08:06 3939866 /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7feb65c81000-7feb65e80000 ---p 00009000 08:06 3939866 /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7feb65e80000-7feb65e81000 r--p 00008000 08:06 3939866 /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7feb65e81000-7feb65e82000 rw-p 00009000 08:06 3939866 /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7feb65e82000-7feb65e8c000 r-xp 00000000 08:06 3939699 /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
7feb65e8c000-7feb6608b000 ---p 0000a000 08:06 3939699 /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
7feb6608b000-7feb6608c000 r--p 00009000 08:06 3939699 /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
7feb6608c000-7feb6608d000 rw-p 0000a000 08:06 3939699 /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
7feb6608d000-7feb6608e000 ---p 00000000 00:00 0
7feb6608e000-7feb6688e000 rw-p 00000000 00:00 0 [stack:22199]
7feb6688e000-7feb66a17000 r--p 00000000 08:06 3933273 /usr/lib/locale/locale-archive
7feb66a17000-7feb66a2a000 r-xp 00000000 08:06 8128726 /lib/x86_64-linux-gnu/libresolv-2.17.so
7feb66a2a000-7feb66c2a000 ---p 00013000 08:06 8128726 /lib/x86_64-linux-gnu/libresolv-2.17.so
7feb66c2a000-7feb66c2b000 r--p 00013000 08:06 8128726 /lib/x86_64-linux-gnu/libresolv-2.17.so
7feb66c2b000-7feb66c2c000 rw-p 00014000 08:06 8128726 /lib/x86_64-linux-gnu/libresolv-2.17.so
7feb66c2c000-7feb66c2e000 rw-p 00000000 00:00 0
7feb66c2e000-7feb66c34000 r-xp 00000000 08:06 3938852 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.1
7feb66c34000-7feb66e33000 ---p 00006000 08:06 3938852 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.1
7feb66e33000-7feb66e34000 r--p 00005000 08:06 3938852 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.1
7feb66e34000-7feb66e35000 rw-p 00006000 08:06 3938852 /usr/lib/x86_64-linux-gnu/libogg.so.0.8.1
7feb66e35000-7feb66e61000 r-xp 00000000 08:06 3940257 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.5
7feb66e61000-7feb67060000 ---p 0002c000 08:06 3940257 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.5
7feb67060000-7feb67061000 r--p 0002b000 08:06 3940257 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.5
7feb67061000-7feb67062000 rw-p 0002c000 08:06 3940257 /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.5
7feb67062000-7feb67315000 r-xp 00000000 08:06 3941862 /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.8
7feb67315000-7feb67514000 ---p 002b3000 08:06 3941862 /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.8
7feb67514000-7feb67530000 r--p 002b2000 08:06 3941862 /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.8
7feb67530000-7feb67531000 rw-p 002ce000 08:06 3941862 /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.8
7feb67531000-7feb67561000 r-xp 00000000 08:06 3937544 /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7feb67561000-7feb67761000 ---p 00030000 08:06 3937544 /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7feb67761000-7feb67762000 r--p 00030000 08:06 3937544 /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7feb67762000-7feb67763000 rw-p 00031000 08:06 3937544 /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7feb67763000-7feb67778000 r-xp 00000000 08:06 8128742 /lib/x86_64-linux-gnu/libnsl-2.17.so
7feb67778000-7feb67977000 ---p 00015000 08:06 8128742 /lib/x86_64-linux-gnu/libnsl-2.17.so
7feb67977000-7feb67978000 r--p 00014000 08:06 8128742 /lib/x86_64-linux-gnu/libnsl-2.17.so
7feb67978000-7feb67979000 rw-p 00015000 08:06 8128742 /lib/x86_64-linux-gnu/libnsl-2.17.so
7feb67979000-7feb6797b000 rw-p 00000000 00:00 0
7feb6797b000-7feb6798a000 r-xp 00000000 08:06 3949408 /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7feb6798a000-7feb67b89000 ---p 0000f000 08:06 3949408 /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7feb67b89000-7feb67b8a000 r--p 0000e000 08:06 3949408 /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7feb67b8a000-7feb67b8b000 rw-p 0000f000 08:06 3949408 /usr/lib/x86_64-linux-gnu/libXi.so.6.1.0
7feb67b8b000-7feb67b90000 r-xp 00000000 08:06 3939264 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7feb67b90000-7feb67d8f000 ---p 00005000 08:06 3939264 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7feb67d8f000-7feb67d90000 rw-p 00004000 08:06 3939264 /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7feb67d90000-7feb67d93000 r-xp 00000000 08:06 3939268 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7feb67d93000-7feb67f92000 ---p 00003000 08:06 3939268 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7feb67f92000-7feb67f93000 r--p 00002000 08:06 3939268 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7feb67f93000-7feb67f94000 rw-p 00003000 08:06 3939268 /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7feb67f94000-7feb67f98000 r-xp 00000000 08:06 8126632 /lib/x86_64-linux-gnu/libattr.so.1.1.0
7feb67f98000-7feb68197000 ---p 00004000 08:06 8126632 /lib/x86_64-linux-gnu/libattr.so.1.1.0
7feb68197000-7feb68198000 r--p 00003000 08:06 8126632 /lib/x86_64-linux-gnu/libattr.so.1.1.0
7feb68198000-7feb68199000 rw-p 00004000 08:06 8126632 /lib/x86_64-linux-gnu/libattr.so.1.1.0
7feb68199000-7feb6819e000 r-xp 00000000 08:06 3941858 /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7feb6819e000-7feb6839d000 ---p 00005000 08:06 3941858 /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7feb6839d000-7feb6839e000 rw-p 00004000 08:06 3941858 /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7feb6839e000-7feb683ff000 r-xp 00000000 08:06 3946242 /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25
7feb683ff000-7feb685ff000 ---p 00061000 08:06 3946242 /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25
7feb685ff000-7feb68601000 r--p 00061000 08:06 3946242 /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25
7feb68601000-7feb68602000 rw-p 00063000 08:06 3946242 /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25
7feb68602000-7feb68606000 rw-p 00000000 00:00 0
7feb68606000-7feb6860f000 r-xp 00000000 08:06 8130060 /lib/x86_64-linux-gnu/libwrap.so.0.7.6
7feb6860f000-7feb6880e000 ---p 00009000 08:06 8130060 /lib/x86_64-linux-gnu/libwrap.so.0.7.6
7feb6880e000-7feb6880f000 r--p 00008000 08:06 8130060 /lib/x86_64-linux-gnu/libwrap.so.0.7.6
7feb6880f000-7feb68810000 rw-p 00009000 08:06 8130060 /lib/x86_64-linux-gnu/libwrap.so.0.7.6
7feb68810000-7feb68811000 rw-p 00000000 00:00 0
7feb68811000-7feb68816000 r-xp 00000000 08:06 3953178 /usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
7feb68816000-7feb68a15000 ---p 00005000 08:06 3953178 /usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
7feb68a15000-7feb68a16000 r--p 00004000 08:06 3953178 /usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
7feb68a16000-7feb68a17000 rw-p 00005000 08:06 3953178 /usr/lib/x86_64-linux-gnu/libXtst.so.6.1.0
7feb68a17000-7feb68a1e000 r-xp 00000000 08:06 3940800 /usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
7feb68a1e000-7feb68c1d000 ---p 00007000 08:06 3940800 /usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
7feb68c1d000-7feb68c1e000 rw-p 00006000 08:06 3940800 /usr/lib/x86_64-linux-gnu/libSM.so.6.0.1
7feb68c1e000-7feb68c35000 r-xp 00000000 08:06 3940798 /usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
7feb68c35000-7feb68e34000 ---p 00017000 08:06 3940798 /usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
7feb68e34000-7feb68e36000 rw-p 00016000 08:06 3940798 /usr/lib/x86_64-linux-gnu/libICE.so.6.3.0
7feb68e36000-7feb68e39000 rw-p 00000000 00:00 0
7feb68e39000-7feb68e3a000 r-xp 00000000 08:06 3956082 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7feb68e3a000-7feb69039000 ---p 00001000 08:06 3956082 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7feb69039000-7feb6903a000 r--p 00000000 08:06 3956082 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7feb6903a000-7feb6903b000 rw-p 00001000 08:06 3956082 /usr/lib/x86_64-linux-gnu/libX11-xcb.so.1.0.0
7feb6903b000-7feb69046000 r-xp 00000000 08:06 3939305 /usr/lib/x86_64-linux-gnu/libjbig.so.0.0.0
7feb69046000-7feb69246000 ---p 0000b000 08:06 3939305 /usr/lib/x86_64-linux-gnu/libjbig.so.0.0.0
7feb69246000-7feb69249000 rw-p 0000b000 08:06 3939305 /usr/lib/x86_64-linux-gnu/libjbig.so.0.0.0
7feb69249000-7feb6926b000 r-xp 00000000 08:06 8126504 /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7feb6926b000-7feb6946a000 ---p 00022000 08:06 8126504 /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7feb6946a000-7feb6946b000 r--p 00021000 08:06 8126504 /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7feb6946b000-7feb6946c000 rw-p 00022000 08:06 8126504 /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7feb6946c000-7feb69491000 r-xp 00000000 08:06 8126476 /lib/x86_64-linux-gnu/libtinfo.so.5.9
7feb69491000-7feb69690000 ---p 00025000 08:06 8126476 /lib/x86_64-linux-gnu/libtinfo.so.5.9
7feb69690000-7feb69694000 r--p 00024000 08:06 8126476 /lib/x86_64-linux-gnu/libtinfo.so.5.9
7feb69694000-7feb69695000 rw-p 00028000 08:06 8126476 /lib/x86_64-linux-gnu/libtinfo.so.5.9
7feb69695000-7feb696c4000 r-xp 00000000 08:06 8126473 /lib/x86_64-linux-gnu/libncursesw.so.5.9
7feb696c4000-7feb698c3000 ---p 0002f000 08:06 8126473 /lib/x86_64-linux-gnu/libncursesw.so.5.9
7feb698c3000-7feb698c4000 r--p 0002e000 08:06 8126473 /lib/x86_64-linux-gnu/libncursesw.so.5.9
7feb698c4000-7feb698c5000 rw-p 0002f000 08:06 8126473 /lib/x86_64-linux-gnu/libncursesw.so.5.9
7feb698c5000-7feb699da000 r-xp 00000000 08:06 8126552 /lib/x86_64-linux-gnu/libslang.so.2.2.4
7feb699da000-7feb69bd9000 ---p 00115000 08:06 8126552 /lib/x86_64-linux-gnu/libslang.so.2.2.4
7feb69bd9000-7feb69bdd000 r--p 00114000 08:06 8126552 /lib/x86_64-linux-gnu/libslang.so.2.2.4
7feb69bdd000-7feb69bf7000 rw-p 00118000 08:06 8126552 /lib/x86_64-linux-gnu/libslang.so.2.2.4
7feb69bf7000-7feb69c5b000 rw-p 00000000 00:00 0
7feb69c5b000-7feb69c78000 r-xp 00000000 08:06 3935170 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7feb69c78000-7feb69e77000 ---p 0001d000 08:06 3935170 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7feb69e77000-7feb69e78000 r--p 0001c000 08:06 3935170 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7feb69e78000-7feb69e79000 rw-p 0001d000 08:06 3935170 /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7feb69e79000-7feb69ebe000 r-xp 00000000 08:06 8128354 /lib/x86_64-linux-gnu/libdbus-1.so.3.7.6
7feb69ebe000-7feb6a0bd000 ---p 00045000 08:06 8128354 /lib/x86_64-linux-gnu/libdbus-1.so.3.7.6
7feb6a0bd000-7feb6a0be000 r--p 00044000 08:06 8128354 /lib/x86_64-linux-gnu/libdbus-1.so.3.7.6
7feb6a0be000-7feb6a0bf000 rw-p 00045000 08:06 8128354 /lib/x86_64-linux-gnu/libdbus-1.so.3.7.6
7feb6a0bf000-7feb6a0c9000 r-xp 00000000 08:06 8127263 /lib/x86_64-linux-gnu/libjson-c.so.2.0.0
7feb6a0c9000-7feb6a2c8000 ---p 0000a000 08:06 8127263 /lib/x86_64-linux-gnu/libjson-c.so.2.0.0
7feb6a2c8000-7feb6a2c9000 r--p 00009000 08:06 8127263 /lib/x86_64-linux-gnu/libjson-c.so.2.0.0
7feb6a2c9000-7feb6a2ca000 rw-p 0000a000 08:06 8127263 /lib/x86_64-linux-gnu/libjson-c.so.2.0.0
7feb6a2ca000-7feb6a2ce000 r-xp 00000000 08:06 8130042 /lib/x86_64-linux-gnu/libcap.so.2.22
7feb6a2ce000-7feb6a4cd000 ---p 00004000 08:06 8130042 /lib/x86_64-linux-gnu/libcap.so.2.22
7feb6a4cd000-7feb6a4ce000 rw-p 00003000 08:06 8130042 /lib/x86_64-linux-gnu/libcap.so.2.22
7feb6a4ce000-7feb6a538000 r-xp 00000000 08:06 4457036 /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-4.0.so
7feb6a538000-7feb6a737000 ---p 0006a000 08:06 4457036 /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-4.0.so
7feb6a737000-7feb6a738000 r--p 00069000 08:06 4457036 /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-4.0.so
7feb6a738000-7feb6a73a000 rw-p 0006a000 08:06 4457036 /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-4.0.so
7feb6a73a000-7feb6a741000 r-xp 00000000 08:06 8128722 /lib/x86_64-linux-gnu/librt-2.17.so
7feb6a741000-7feb6a940000 ---p 00007000 08:06 8128722 /lib/x86_64-linux-gnu/librt-2.17.so
7feb6a940000-7feb6a941000 r--p 00006000 08:06 8128722 /lib/x86_64-linux-gnu/librt-2.17.so
7feb6a941000-7feb6a942000 rw-p 00007000 08:06 8128722 /lib/x86_64-linux-gnu/librt-2.17.soAborted (core dumped)

I am on the latest master :-

 ~/games/cataclysm-DDA$ gi
 == Remote URL: 
 origin https://github.com/CleverRaven/Cataclysm-DDA (fetch)
 origin https://github.com/CleverRaven/Cataclysm-DDA (push)

 == Remote Branches: 
   origin/0.8-branch
  origin/0.9-branch
  origin/HEAD -> origin/master
 origin/halloween
 origin/master

 == Local Branches:
 * master

 == Most Recent Commit
 commit fc7fa922bcf7a058ebc1fdae40fab4761e0059a4
 Merge: 0db9414 232fb01
 Author: Rivet <[email protected]>
 Date:   Fri Dec 13 02:19:22 2013 -0800

      Merge pull request #5005 from Vronkio/master

      Add postman gear itemgroup and said itemgroup to zombie drops

    Type 'git log' for more commits, or 'git show' for full commit details.

As per documentation, just did a checkout to make sure I'm at the head.

 ~/games/cataclysm-DDA$ git checkout master
 Already on 'master'
Your branch is up-to-date with 'origin/master'.

This is/was how I was building it :-

 ~/games/cataclysm-DDA$ make TILES=1

I went to IRC and dv_ and Narc did try to help me out and debug the issue. This was the result of their contribution :-

  ~/games/cataclysm-DDA$ CXXFLAGS=-fPIC make NATIVE=linux64 TILES=1

I still am getting the error. Any help would be nice. If any more info. is needed please lemme know.

@shirishag75
Copy link
Author

I used the instructions from https://wiki.debian.org/HowToGetABacktrace

Starting program: /data/shirish/Games/cataclysm-DDA/./cataclysm-tiles
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff0367700 (LWP 6678)]
[New Thread 0x7fffeb54a700 (LWP 6679)]
[Thread 0x7fffeb54a700 (LWP 6679) exited]

Program received signal SIGABRT, Aborted.
0x00007ffff66d01d5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.

Thread 2 (Thread 0x7ffff0367700 (LWP 6678)):
#0 0x00007ffff6754c0d in nanosleep () at ../sysdeps/unix/syscall-template.S:81
No locals.
#1 0x00007ffff7b97f29 in SDL_Delay (ms=) at ./src/timer/unix/SDL_systimer.c:118
was_error =
elapsed = {tv_sec = 0, tv_nsec = 221860}
tv = {tv_sec = 0, tv_nsec = 1000000}
#2 0x00007ffff7b97f62 in RunTimer (unused=0x7ffff0366df0, unused@entry=0x0) at ./src/timer/unix/SDL_systimer.c:203
No locals.
#3 0x00007ffff7b53d28 in SDL_RunThread (data=0xec1490) at ./src/thread/SDL_thread.c:204
args = 0xec1490
userfunc = 0x7ffff7b97f40
userdata = 0x0
statusloc = 0xebf120
#4 0x00007ffff7b95ac9 in RunThread (data=) at ./src/thread/pthread/SDL_systhread.c:47
No locals.
#5 0x00007ffff4d45e0e in start_thread (arg=0x7ffff0367700) at pthread_create.c:311
res =
pd = 0x7ffff0367700
now =
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737223489280, 2757604268002500941, 1, 140737488345120, 4096, 140737223489280, -2757581671661051571, -2757588562444689075}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = 0
pagesize_m1 =
sp =
freesize =
__PRETTY_FUNCTION
= "start_thread"
#6 0x00007ffff67840fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
No locals.

Thread 1 (Thread 0x7ffff7ee0780 (LWP 6674)):
#0 0x00007ffff66d01d5 in GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
resultvar = 0
pid = 6674
selftid = 6674
#1 0x00007ffff66d3388 in __GI_abort () at abort.c:90
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x7fffffffd07a, sa_sigaction = 0x7fffffffd07a}, sa_mask = {__val = {6, 140737328996497, 2, 140737488343182, 2, 140737328985465, 1, 140737328996493, 3, 140737488343156, 12, 140737328996497, 2, 140737488343968, 10, 140737488345728}}, sa_flags = 128, sa_restorer = 0x7}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00007ffff670b7bb in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7ffff6808368 "
* Error in `%s': %s: 0x%s *\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:199
ap = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffffffda90, reg_save_area = 0x7fffffffd9a0}}
ap_copy = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7fffffffda90, reg_save_area = 0x7fffffffd9a0}}
fd = 12
on_2 =
list =
nlist =
cp =
written =
#3 0x00007ffff6715a16 in malloc_printerr (action=3, str=0x7ffff6808550 "double free or corruption (fasttop)", ptr=) at malloc.c:4923
buf = "0000000000ef3bc0"
cp =
#4 0x00007ffff6716793 in _int_free (av=, p=0xef3bb0, have_lock=0) at malloc.c:3779
size =
fb =
nextchunk =
nextsize =
nextinuse =
prevsize =
bck =
fwd =
errstr =
locked =
__func
= "_int_free"
#5 0x00007ffff793bb1c in TTF_CloseFont () from /usr/lib/x86_64-linux-gnu/libSDL_ttf-2.0.so.0
No symbol table info available.
#6 0x00000000009f1d87 in test_face_size (f=..., size=15, faceIndex=0) at src/sdltiles.cpp:909
tf = 0xefebb0
ts = 0x7ffff770dc42 "Regular"
i = 0
faces = 1
found = true
style = 0x7ffff770dc42 "Regular"
fnt = 0xef7270
#7 0x00000000009f27a2 in curses_init () at src/sdltiles.cpp:1002
fin =
faceIndex = 0
fontsize = 15
SidebarWidth = 55
typeface = {static npos = , _M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0xee2fc8 "data/font/terminus.fon"}}
blending = {static npos = , _M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0xec1728 "solid"}}
sysfnt = {static npos = , _M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0xee2fc8 "data/font/terminus.fon"}}
#8 0x00000000004d0045 in initscr () at src/cursesport.cpp:25
No locals.
#9 0x00000000006cc61b in main (argc=0, argv=0x7fffffffe2f0) at src/main.cpp:77
seed = 1387006124
verifyexit = false
quit_game = 64
sigIntHandler = {__sigaction_handler = {sa_handler = 0x7fffffffe18f, sa_sigaction = 0x7fffffffe18f}, sa_mask = {__val = {10864489, 15012328, 140737327746308, 0, 140737488347568, 15149096, 10864977, 15012328, 4295032831, 98, 140737488347568, 14991544, 109, 14991544, 140737488347896, 140737488347584}}, sa_flags = 10865164, sa_restorer = 0x6e}
A debugging session is active.

Inferior 1 [process 6674] will be killed.

Quit anyway? (y or n)

@shirishag75
Copy link
Author

oh btw, this is the compilation string I'm using to build/compile the game.

 ~/games/cataclysm-DDA$ CXXFLAGS=-fPIC make NATIVE=64 TILES=1

I was doing before

  ~/games/cataclysm-DDA$ make TILES=1 

but was told/shared that as I'm on 64-bit system :-

 $ uname -a
  Linux debian 3.11-2-amd64 #1 SMP Debian 3.11.10-1 (2013-12-04) x86_64 GNU/Linux

The above is better.

@shirishag75
Copy link
Author

I was asked by kevingrande to git upto the latest master which I did and still got the memory corruption. This is the latest output via gdb :-

Starting program: /data/shirish/Games/cataclysm-DDA/./cataclysm-tiles
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff0367700 (LWP 6678)]
[New Thread 0x7fffeb54a700 (LWP 6679)]
[Thread 0x7fffeb54a700 (LWP 6679) exited]

Program received signal SIGABRT, Aborted.
0x00007ffff66d01d5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.

Thread 2 (Thread 0x7ffff0367700 (LWP 6678)):
#0 0x00007ffff6754c0d in nanosleep () at ../sysdeps/unix/syscall-template.S:81
No locals.
#1 0x00007ffff7b97f29 in SDL_Delay (ms=) at ./src/timer/unix/SDL_systimer.c:118
was_error =
elapsed = {tv_sec = 0, tv_nsec = 221860}
tv = {tv_sec = 0, tv_nsec = 1000000}
#2 0x00007ffff7b97f62 in RunTimer (unused=0x7ffff0366df0, unused@entry=0x0) at ./src/timer/unix/SDL_systimer.c:203
No locals.
#3 0x00007ffff7b53d28 in SDL_RunThread (data=0xec1490) at ./src/thread/SDL_thread.c:204
args = 0xec1490
userfunc = 0x7ffff7b97f40
userdata = 0x0
statusloc = 0xebf120
#4 0x00007ffff7b95ac9 in RunThread (data=) at ./src/thread/pthread/SDL_systhread.c:47
No locals.
#5 0x00007ffff4d45e0e in start_thread (arg=0x7ffff0367700) at pthread_create.c:311
res =
pd = 0x7ffff0367700
now =
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737223489280, 2757604268002500941, 1, 140737488345120, 4096, 140737223489280, -2757581671661051571, -2757588562444689075}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = 0
pagesize_m1 =
sp =
freesize =
__PRETTY_FUNCTION
= "start_thread"
#6 0x00007ffff67840fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
No locals.

Thread 1 (Thread 0x7ffff7ee0780 (LWP 6674)):
#0 0x00007ffff66d01d5 in GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
resultvar = 0
pid = 6674
selftid = 6674
#1 0x00007ffff66d3388 in __GI_abort () at abort.c:90
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x7fffffffd07a, sa_sigaction = 0x7fffffffd07a}, sa_mask = {__val = {6, 140737328996497, 2, 140737488343182, 2, 140737328985465, 1, 140737328996493, 3, 140737488343156, 12, 140737328996497, 2, 140737488343968, 10, 140737488345728}}, sa_flags = 128, sa_restorer = 0x7}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00007ffff670b7bb in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7ffff6808368 "
* Error in `%s': %s: 0x%s *\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:199
ap = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffffffda90, reg_save_area = 0x7fffffffd9a0}}
ap_copy = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7fffffffda90, reg_save_area = 0x7fffffffd9a0}}
fd = 12
on_2 =
list =
nlist =
cp =
written =
#3 0x00007ffff6715a16 in malloc_printerr (action=3, str=0x7ffff6808550 "double free or corruption (fasttop)", ptr=) at malloc.c:4923
buf = "0000000000ef3bc0"
cp =
#4 0x00007ffff6716793 in _int_free (av=, p=0xef3bb0, have_lock=0) at malloc.c:3779
size =
fb =
nextchunk =
nextsize =
nextinuse =
prevsize =
bck =
fwd =
errstr =
locked =
__func
= "_int_free"
#5 0x00007ffff793bb1c in TTF_CloseFont () from /usr/lib/x86_64-linux-gnu/libSDL_ttf-2.0.so.0
No symbol table info available.
#6 0x00000000009f1d87 in test_face_size (f=..., size=15, faceIndex=0) at src/sdltiles.cpp:909
tf = 0xefebb0
ts = 0x7ffff770dc42 "Regular"
i = 0
faces = 1
found = true
style = 0x7ffff770dc42 "Regular"
fnt = 0xef7270
#7 0x00000000009f27a2 in curses_init () at src/sdltiles.cpp:1002
fin =
faceIndex = 0
fontsize = 15
SidebarWidth = 55
typeface = {static npos = , _M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0xee2fc8 "data/font/terminus.fon"}}
blending = {static npos = , _M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0xec1728 "solid"}}
sysfnt = {static npos = , _M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0xee2fc8 "data/font/terminus.fon"}}
#8 0x00000000004d0045 in initscr () at src/cursesport.cpp:25
No locals.
#9 0x00000000006cc61b in main (argc=0, argv=0x7fffffffe2f0) at src/main.cpp:77
seed = 1387006124
verifyexit = false
quit_game = 64
sigIntHandler = {__sigaction_handler = {sa_handler = 0x7fffffffe18f, sa_sigaction = 0x7fffffffe18f}, sa_mask = {__val = {10864489, 15012328, 140737327746308, 0, 140737488347568, 15149096, 10864977, 15012328, 4295032831, 98, 140737488347568, 14991544, 109, 14991544, 140737488347896, 140737488347584}}, sa_flags = 10865164, sa_restorer = 0x6e}
A debugging session is active.

Inferior 1 [process 6674] will be killed.

Quit anyway? (y or n) Starting program: /data/shirish/Games/cataclysm-DDA/./cataclysm-tiles
warning: Could not load shared library symbols for linux-vdso.so.1.
Do you need "set solib-search-path" or "set sysroot"?
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff0367700 (LWP 22583)]
[New Thread 0x7fffeb54a700 (LWP 22584)]
[Thread 0x7fffeb54a700 (LWP 22584) exited]

Program received signal SIGABRT, Aborted.
0x00007ffff66d01d5 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.

Thread 2 (Thread 0x7ffff0367700 (LWP 22583)):
#0 0x00007ffff6754c0d in nanosleep () at ../sysdeps/unix/syscall-template.S:81
No locals.
#1 0x00007ffff7b97f29 in SDL_Delay (ms=) at ./src/timer/unix/SDL_systimer.c:118
was_error =
elapsed = {tv_sec = 0, tv_nsec = 741830}
tv = {tv_sec = 0, tv_nsec = 1000000}
#2 0x00007ffff7b97f62 in RunTimer (unused=0x7ffff0366df0, unused@entry=0x0) at ./src/timer/unix/SDL_systimer.c:203
No locals.
#3 0x00007ffff7b53d28 in SDL_RunThread (data=0xec3520) at ./src/thread/SDL_thread.c:204
args = 0xec3520
userfunc = 0x7ffff7b97f40
userdata = 0x0
statusloc = 0xec11b0
#4 0x00007ffff7b95ac9 in RunThread (data=) at ./src/thread/pthread/SDL_systhread.c:47
No locals.
#5 0x00007ffff4d45e0e in start_thread (arg=0x7ffff0367700) at pthread_create.c:311
res =
pd = 0x7ffff0367700
now =
unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140737223489280, -346084268589158548, 1, 140737488345120, 4096, 140737223489280, 346098068804104044, 346108222765690732}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
not_first_call = 0
pagesize_m1 =
sp =
freesize =
__PRETTY_FUNCTION
= "start_thread"
#6 0x00007ffff67840fd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:113
No locals.

Thread 1 (Thread 0x7ffff7ee0780 (LWP 22567)):
#0 0x00007ffff66d01d5 in GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
resultvar = 0
pid = 22567
selftid = 22567
#1 0x00007ffff66d3388 in __GI_abort () at abort.c:90
save_stage = 2
act = {__sigaction_handler = {sa_handler = 0x7fffffffd07a, sa_sigaction = 0x7fffffffd07a}, sa_mask = {__val = {6, 140737328996497, 2, 140737488343182, 2, 140737328985465, 1, 140737328996493, 3, 140737488343156, 12, 140737328996497, 2, 140737488343968, 10, 140737488345728}}, sa_flags = 128, sa_restorer = 0x7}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00007ffff670b7bb in __libc_message (do_abort=do_abort@entry=2, fmt=fmt@entry=0x7ffff6808368 "
* Error in `%s': %s: 0x%s *\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:199
ap = {{gp_offset = 40, fp_offset = 48, overflow_arg_area = 0x7fffffffda90, reg_save_area = 0x7fffffffd9a0}}
ap_copy = {{gp_offset = 16, fp_offset = 48, overflow_arg_area = 0x7fffffffda90, reg_save_area = 0x7fffffffd9a0}}
fd = 12
on_2 =
list =
nlist =
cp =
written =
#3 0x00007ffff6715a16 in malloc_printerr (action=3, str=0x7ffff6808550 "double free or corruption (fasttop)", ptr=) at malloc.c:4923
buf = "0000000000f08170"
cp =
#4 0x00007ffff6716793 in _int_free (av=, p=0xf08160, have_lock=0) at malloc.c:3779
size =
fb =
nextchunk =
nextsize =
nextinuse =
prevsize =
bck =
fwd =
errstr =
locked =
__func
= "_int_free"
#5 0x00007ffff793bb1c in TTF_CloseFont () from /usr/lib/x86_64-linux-gnu/libSDL_ttf-2.0.so.0
No symbol table info available.
#6 0x00000000009f35c2 in test_face_size (f=..., size=15, faceIndex=0) at src/sdltiles.cpp:905
tf = 0xf00850
ts = 0x7ffff770dc42 "Regular"
i = 0
faces = 1
found = true
style = 0x7ffff770dc42 "Regular"
fnt = 0xef72a0
#7 0x00000000009f3fdd in curses_init () at src/sdltiles.cpp:999
fin =
faceIndex = 0
fontsize = 15
SidebarWidth = 55
typeface = {static npos = , _M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0xee5058 "data/font/terminus.fon"}}
blending = {static npos = , _M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0xec37b8 "solid"}}
sysfnt = {static npos = , _M_dataplus = {std::allocator = {<__gnu_cxx::new_allocator> = {}, }, _M_p = 0xee5058 "data/font/terminus.fon"}}
#8 0x00000000004d02a7 in initscr () at src/cursesport.cpp:25
No locals.
#9 0x00000000006ce14b in main (argc=0, argv=0x7fffffffe2f0) at src/main.cpp:77
seed = 1387114042
verifyexit = false
quit_game = 64
sigIntHandler = {__sigaction_handler = {sa_handler = 0x7fffffffe18f, sa_sigaction = 0x7fffffffe18f}, sa_mask = {__val = {10872049, 15022216, 140737327746308, 0, 140737488347568, 15159176, 10872537, 15022216, 4295032831, 98, 140737488347568, 15001440, 109, 15001440, 140737488347896, 140737488347584}}, sa_flags = 10872724, sa_restorer = 0x6e}
A debugging session is active.

Inferior 1 [process 22567] will be killed.

Quit anyway? (y or n)

These are the options I used to generate the above gdb.txt :-

  $ gdb ./cataclysm-tiles
  GNU gdb (GDB) 7.6.1 (Debian 7.6.1-1)
  Copyright (C) 2013 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.  Type "show copying"

and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
http://www.gnu.org/software/gdb/bugs/...
Reading symbols from /data/shirish/Games/cataclysm-DDA/cataclysm-tiles...done.
(gdb) set logging on
Copying output to gdb.txt.
(gdb) set pagination 0
(gdb) run

gives output of corruption then :-

 (gdb) thread apply all bt full

The output from this is shared above.

@shirishag75
Copy link
Author

still getting that crasher. This is now with 05148d3 9d04f15. Same thing as above.

@lastmikoi
Copy link

Having the very same issue, under up-to-date ArchLinux 64bit.

@lastmikoi
Copy link

After running valgrind with vgdb-server, I managed to track down the issue :

==9533== Invalid free() / delete / delete[] / realloc()
==9533==    at 0x4C289DC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9533==    by 0x50CC99B: TTF_CloseFont (in /usr/lib/libSDL_ttf-2.0.so.0.10.1)
==9533==    by 0x4D2A6B: test_face_size(std::string, int, int) (sdltiles.cpp:905)
==9533==    by 0x4D33DB: curses_init() (sdltiles.cpp:999)
==9533==    by 0x826F44: initscr() (cursesport.cpp:25)
==9533==    by 0x496E44: main (main.cpp:77)
==9533==  Address 0x86b59f0 is 0 bytes inside a block of size 80 free'd
==9533==    at 0x4C289DC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==9533==    by 0x52E9FA2: ??? (in /usr/lib/libfreetype.so.6.11.1)
==9533==    by 0x52EA090: FT_Done_Face (in /usr/lib/libfreetype.so.6.11.1)
==9533==    by 0x50CC98A: TTF_CloseFont (in /usr/lib/libSDL_ttf-2.0.so.0.10.1)
==9533==    by 0x4D2A6B: test_face_size(std::string, int, int) (sdltiles.cpp:905)
==9533==    by 0x4D33DB: curses_init() (sdltiles.cpp:999)
==9533==    by 0x826F44: initscr() (cursesport.cpp:25)
==9533==    by 0x496E44: main (main.cpp:77)

@BevapDin
Copy link
Contributor

This looks like this is caused by a bug in SDL_ttf freetype: https://savannah.nongnu.org/bugs/?40997 (which is already fixed by this http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=5f577462bd7cc8e2ca6fe4a1efecee6d8a95e7be)

It occurs only with windows font files (*.fon) but not with ttf files (I think data/FONTDATA controls this). Downgrading to a previous version of freetype might also help (2.4.11 works fine for me).

@kevingranade
Copy link
Member

Ah-ha, thanks for finding that BevapDin. I'd narrowed it down to it being a SDL_ttf issue, since I made a reproducer that's just opening and closing a .fon file, but hadn't managed to find the real issue.
I just discovered another workaround is to launch cataclysm with MALLOC_CHECK_=0 ./cataclysm-tiles
This tells glibc to ignore the double-free. Might be resulting in memory leaks, but there's not much we can do about the underlying library being bad.

@shirishag75
Copy link
Author

Hi all,
It seems libfreetype6 just got updated in debian and perhaps with the same changes as shared above.

http://packages.qa.debian.org/f/freetype.html

see the changelog :-

http://ftp-master.metadata.debian.org/changelogs/main/f/freetype/unstable_changelog

freetype (2.5.2-1) unstable; urgency=low

  • New upstream release

    • fixes a crasher bug with certain fonts. Closes: #733052.
    • drop of additional symbols which were previously exported but are only
      meant for debugging and upstream recommends not enabling them when
      building in "release mode". If this impacts users of freetype, we can
      re-enable these symbols later.
  • Call autogen.sh on build to refresh autotools; not using dh-autoreconf
    because the upstream directory structure is non-standard and it's a
    throw-away dir, so there's no advantage to dh-autoreconf's rollback
    support.

  • Fix symbols file with respect to more complete version info found in
    Ubuntu.

  • Drop debian/patches-ft2demos/compiler-warning-fixes.patch, which is
    actually a bug in the compiler_hardening_fixes.patch; fix it there
    instead.

  • Fix libpng detection when cross-building.

    -- Steve Langasek [email protected] Wed, 25 Dec 2013 09:06:22 +0000

The first one where some fonts made it crash. Although it's also possible that a newer version would be needed for the fix (as the patch shared) was applied in the upstream git repo. on 25th December only.

@kevingranade
Copy link
Member

I'm going to close this since it's an upstream bug.

@shirishag75
Copy link
Author

yup, nothing can be done. I was able to update/upgrade to the latest upstream but hit with the same issue. So either I have to patch it (manually) or await for 2.5.3 release which might happen over due course.

@kevingranade
Copy link
Member

Try the workaround I posted, it's not actually a fatal error, it's just
that some distributions configure it to be one as a form of quality control.

@kevingranade kevingranade changed the title crashing, double-free memory corruption while trying a new game. crashing, double-free memory corruption while trying a new game. Aug 27, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Crash / Freeze> Fatal bug that results in hangs or crashes.
Projects
None yet
Development

No branches or pull requests

4 participants