godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
86.54k stars 19.27k forks source link

Crash on exported production build on Linux 64-bit #13577

Closed tom95 closed 6 years ago

tom95 commented 6 years ago

Operating system or device, Godot version, GPU Model and driver (if graphics related): Ubuntu 16.04 64 bit, Godot 3.0 Beta, NVIDIA card with nvidia-384 driver

Issue description: Crash in exported game, could not find any indication on why it's happening so far.

Steps to reproduce: No minimal project available that captures it unfortunately, the repo can be found here: https://github.com/tom95/thrown-back (To quickly get to the point where it crashes, press enter to start the game, then f4 to skip to fourth level, then ctrl+alt+b to teleport to the boss. Then navigate towards the right with arrow keys and shoot the boss once with the spacebar). A production build that crashes for me as well is alternatively readily available from here: https://itch.io/jam/game-off-2017/rate/199596

When using a debug build or running in valgrind or godot, the crash does not occur. A gdb session on the release build only yielded ??. If given further instructions, I will gladly try out other ways for acquiring more info. Interestingly a crash appears to occur for the WebAssembly export at the same place in the game. Disabling elements like the particles or sound when the boss dies did not fix the crash.

Dump:

*** Error in `./wizards-of-the-bounce.bin': malloc(): smallbin double linked list corrupted: 0x0000000006422290 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f2607f6b7e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x82651)[0x7f2607f76651]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7f2607f78184]
./wizards-of-the-bounce.bin[0x15705b9]
./wizards-of-the-bounce.bin[0x14050ab]
./wizards-of-the-bounce.bin[0xe56695]
./wizards-of-the-bounce.bin[0xe56990]
./wizards-of-the-bounce.bin[0xe9a5a3]
./wizards-of-the-bounce.bin[0x10136ab]
./wizards-of-the-bounce.bin[0xc830af]
./wizards-of-the-bounce.bin[0xcd072f]
./wizards-of-the-bounce.bin[0x1567a33]
./wizards-of-the-bounce.bin[0x9aa9c4]
./wizards-of-the-bounce.bin[0x9ba900]
./wizards-of-the-bounce.bin[0x954bb6]
./wizards-of-the-bounce.bin[0x425435]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f2607f14830]
./wizards-of-the-bounce.bin[0x42a12e]
======= Memory map: ========
00400000-01a05000 r-xp 00000000 08:12 3802596                            /home/tom/Code/godot/thrown-back/wizards-of-the-bounce.bin
01c04000-01c06000 r--p 01604000 08:12 3802596                            /home/tom/Code/godot/thrown-back/wizards-of-the-bounce.bin
01c06000-01c18000 rw-p 01606000 08:12 3802596                            /home/tom/Code/godot/thrown-back/wizards-of-the-bounce.bin
01c18000-01c2b000 rw-p 00000000 00:00 0 
029e7000-07e24000 rw-p 00000000 00:00 0                                  [heap]
402b7000-402b9000 r-xs 00000000 08:12 7733361                            /tmp/.glEpffc6 (deleted)
4103f000-410e0000 rw-p 00000000 00:00 0 
7f25d8000000-7f25d8021000 rw-p 00000000 00:00 0 
7f25d8021000-7f25dc000000 ---p 00000000 00:00 0 
7f25ddcd0000-7f25e1cd1000 rw-p 00000000 00:00 0 
7f25e1ed5000-7f25e36d6000 rw-p 00000000 00:00 0 
7f25e3fff000-7f25e8000000 rw-p 00000000 00:00 0 
7f25e8000000-7f25e8021000 rw-p 00000000 00:00 0 
7f25e8021000-7f25ec000000 ---p 00000000 00:00 0 
7f25ec0aa000-7f25ec4aa000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25ec8aa000-7f25eccaa000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25eccaa000-7f25efdff000 rw-p 00000000 00:00 0 
7f25efdff000-7f25effff000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25effff000-7f25f4000000 rw-s 00000000 00:14 5                          /dev/shm/pulse-shm-2387694169
7f25f4000000-7f25f4021000 rw-p 00000000 00:00 0 
7f25f4021000-7f25f8000000 ---p 00000000 00:00 0 
7f25f809c000-7f25f819c000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25f839c000-7f25f859c000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25f859c000-7f25f859d000 ---p 00000000 00:00 0 
7f25f859d000-7f25f85dd000 rw-p 00000000 00:00 0 
7f25f865d000-7f25fa5ee000 rw-p 00000000 00:00 0 
7f25fa5ee000-7f25fa5ef000 ---p 00000000 00:00 0 
7f25fa5ef000-7f25fa62f000 rw-p 00000000 00:00 0 
7f25fa62f000-7f25fa630000 ---p 00000000 00:00 0 
7f25fa630000-7f25fae30000 rw-p 00000000 00:00 0 
7f25fae30000-7f25fee31000 rw-s 00000000 00:14 15                         /dev/shm/pulse-shm-2849318175
7f25fee31000-7f25fee38000 r--s 00000000 08:12 8927727                    /usr/lib/x86_64-linux-gnu/gconv/gconv-modules.cache
7f25fee38000-7f25fee39000 ---p 00000000 00:00 0 
7f25fee39000-7f25fef92000 rw-p 00000000 00:00 0 
7f25fef92000-7f25ff012000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25ff012000-7f25ff014000 rw-s 00000000 08:12 7733361                    /tmp/.glEpffc6 (deleted)
7f25ff094000-7f25ff114000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25ff214000-7f25ff227000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25ff227000-7f25ff247000 rw-s 00000000 00:06 518                        /dev/nvidia0
7f25ff247000-7f25ff248000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25ff248000-7f25ff24c000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25ff24c000-7f25ff24d000 rw-s 00000000 00:06 518                        /dev/nvidia0
7f25ff24d000-7f25ff28d000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25ff28d000-7f25ff2ad000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25ff2ad000-7f25ff2ed000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25ff2ed000-7f25ff30d000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25ff30d000-7f25ff34d000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25ff34d000-7f25ff4fe000 rw-p 00000000 00:00 0 
7f25ff4fe000-7f25ff603000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f25ff603000-7f25ff884000 rw-p 00000000 00:00 0 
7f25ff884000-7f2600e52000 r--p 00000000 08:12 8783929                    /usr/lib/locale/locale-archive
7f2600e52000-7f2600e7c000 r-xp 00000000 08:12 8790992                    /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
7f2600e7c000-7f260107c000 ---p 0002a000 08:12 8790992                    /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
7f260107c000-7f260107d000 r--p 0002a000 08:12 8790992                    /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
7f260107d000-7f260107e000 rw-p 0002b000 08:12 8790992                    /usr/lib/x86_64-linux-gnu/libvorbis.so.0.4.8
7f260107e000-7f2601085000 r-xp 00000000 08:12 8790668                    /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
7f2601085000-7f2601285000 ---p 00007000 08:12 8790668                    /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
7f2601285000-7f2601286000 r--p 00007000 08:12 8790668                    /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
7f2601286000-7f2601287000 rw-p 00008000 08:12 8790668                    /usr/lib/x86_64-linux-gnu/libogg.so.0.8.2
7f2601287000-7f2601299000 r-xp 00000000 08:12 2888189                    /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0
7f2601299000-7f2601499000 ---p 00012000 08:12 2888189                    /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0
7f2601499000-7f260149a000 r--p 00012000 08:12 2888189                    /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0
7f260149a000-7f260149b000 rw-p 00013000 08:12 2888189                    /lib/x86_64-linux-gnu/libgpg-error.so.0.17.0
7f260149b000-7f2601509000 r-xp 00000000 08:12 2888274                    /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7f2601509000-7f2601709000 ---p 0006e000 08:12 2888274                    /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7f2601709000-7f260170a000 r--p 0006e000 08:12 2888274                    /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7f260170a000-7f260170b000 rw-p 0006f000 08:12 2888274                    /lib/x86_64-linux-gnu/libpcre.so.3.13.2
7f260170b000-7f2601722000 r-xp 00000000 08:12 2888298                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f2601722000-7f2601922000 ---p 00017000 08:12 2888298                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f2601922000-7f2601923000 r--p 00017000 08:12 2888298                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f2601923000-7f2601924000 rw-p 00018000 08:12 2888298                    /lib/x86_64-linux-gnu/libresolv-2.23.so
7f2601924000-7f2601926000 rw-p 00000000 00:00 0 
7f2601926000-7f26019b3000 r-xp 00000000 08:12 8790994                    /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
7f26019b3000-7f2601bb2000 ---p 0008d000 08:12 8790994                    /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
7f2601bb2000-7f2601bce000 r--p 0008c000 08:12 8790994                    /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
7f2601bce000-7f2601bcf000 rw-p 000a8000 08:12 8790994                    /usr/lib/x86_64-linux-gnu/libvorbisenc.so.2.0.11
7f2601bcf000-7f2601c42000 r-xp 00000000 08:12 8789764                    /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7f2601c42000-7f2601e42000 ---p 00073000 08:12 8789764                    /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7f2601e42000-7f2601e43000 r--p 00073000 08:12 8789764                    /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7f2601e43000-7f2601e44000 rw-p 00074000 08:12 8789764                    /usr/lib/x86_64-linux-gnu/libFLAC.so.8.3.0
7f2601e44000-7f2601e5a000 r-xp 00000000 08:12 2888120                    /lib/x86_64-linux-gnu/libnsl-2.23.so
7f2601e5a000-7f2602059000 ---p 00016000 08:12 2888120                    /lib/x86_64-linux-gnu/libnsl-2.23.so
7f2602059000-7f260205a000 r--p 00015000 08:12 2888120                    /lib/x86_64-linux-gnu/libnsl-2.23.so
7f260205a000-7f260205b000 rw-p 00016000 08:12 2888120                    /lib/x86_64-linux-gnu/libnsl-2.23.so
7f260205b000-7f260205d000 rw-p 00000000 00:00 0 
7f260205d000-7f2602135000 r-xp 00000000 08:12 2888066                    /lib/x86_64-linux-gnu/libgcrypt.so.20.0.5
7f2602135000-7f2602334000 ---p 000d8000 08:12 2888066                    /lib/x86_64-linux-gnu/libgcrypt.so.20.0.5
7f2602334000-7f2602335000 r--p 000d7000 08:12 2888066                    /lib/x86_64-linux-gnu/libgcrypt.so.20.0.5
7f2602335000-7f260233d000 rw-p 000d8000 08:12 2888066                    /lib/x86_64-linux-gnu/libgcrypt.so.20.0.5
7f260233d000-7f260233e000 rw-p 00000000 00:00 0 
7f260233e000-7f260235f000 r-xp 00000000 08:12 2888212                    /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f260235f000-7f260255e000 ---p 00021000 08:12 2888212                    /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f260255e000-7f260255f000 r--p 00020000 08:12 2888212                    /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f260255f000-7f2602560000 rw-p 00021000 08:12 2888212                    /lib/x86_64-linux-gnu/liblzma.so.5.0.0
7f2602560000-7f260257f000 r-xp 00000000 08:12 2888303                    /lib/x86_64-linux-gnu/libselinux.so.1
7f260257f000-7f260277e000 ---p 0001f000 08:12 2888303                    /lib/x86_64-linux-gnu/libselinux.so.1
7f260277e000-7f260277f000 r--p 0001e000 08:12 2888303                    /lib/x86_64-linux-gnu/libselinux.so.1
7f260277f000-7f2602780000 rw-p 0001f000 08:12 2888303                    /lib/x86_64-linux-gnu/libselinux.so.1
7f2602780000-7f2602782000 rw-p 00000000 00:00 0 
7f2602782000-7f2602787000 r-xp 00000000 08:12 8789922                    /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7f2602787000-7f2602986000 ---p 00005000 08:12 8789922                    /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7f2602986000-7f2602987000 r--p 00004000 08:12 8789922                    /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7f2602987000-7f2602988000 rw-p 00005000 08:12 8789922                    /usr/lib/x86_64-linux-gnu/libasyncns.so.0.3.1
7f2602988000-7f26029ea000 r-xp 00000000 08:12 8790820                    /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25
7f26029ea000-7f2602bea000 ---p 00062000 08:12 8790820                    /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25
7f2602bea000-7f2602bec000 r--p 00062000 08:12 8790820                    /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25
7f2602bec000-7f2602bed000 rw-p 00064000 08:12 8790820                    /usr/lib/x86_64-linux-gnu/libsndfile.so.1.0.25
7f2602bed000-7f2602bf1000 rw-p 00000000 00:00 0 
7f2602bf1000-7f2602bf9000 r-xp 00000000 08:12 2888331                    /lib/x86_64-linux-gnu/libwrap.so.0.7.6
7f2602bf9000-7f2602df8000 ---p 00008000 08:12 2888331                    /lib/x86_64-linux-gnu/libwrap.so.0.7.6
7f2602df8000-7f2602df9000 r--p 00007000 08:12 2888331                    /lib/x86_64-linux-gnu/libwrap.so.0.7.6
7f2602df9000-7f2602dfa000 rw-p 00008000 08:12 2888331                    /lib/x86_64-linux-gnu/libwrap.so.0.7.6
7f2602dfa000-7f2602dfb000 rw-p 00000000 00:00 0 
7f2602dfb000-7f2602e00000 r-xp 00000000 08:12 8789839                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f2602e00000-7f2602fff000 ---p 00005000 08:12 8789839                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f2602fff000-7f2603000000 r--p 00004000 08:12 8789839                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f2603000000-7f2603001000 rw-p 00005000 08:12 8789839                    /usr/lib/x86_64-linux-gnu/libXdmcp.so.6.0.0
7f2603001000-7f2603003000 r-xp 00000000 08:12 8789828                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f2603003000-7f2603203000 ---p 00002000 08:12 8789828                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f2603203000-7f2603204000 r--p 00002000 08:12 8789828                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f2603204000-7f2603205000 rw-p 00003000 08:12 8789828                    /usr/lib/x86_64-linux-gnu/libXau.so.6.0.0
7f2603205000-7f26046a0000 r-xp 00000000 08:12 8805640                    /usr/lib/nvidia-384/libnvidia-glcore.so.384.90
7f26046a0000-7f26046c1000 rwxp 0149b000 08:12 8805640                    /usr/lib/nvidia-384/libnvidia-glcore.so.384.90
7f26046c1000-7f2604aa3000 r-xp 014bc000 08:12 8805640                    /usr/lib/nvidia-384/libnvidia-glcore.so.384.90
7f2604aa3000-7f2604ca3000 ---p 0189e000 08:12 8805640                    /usr/lib/nvidia-384/libnvidia-glcore.so.384.90
7f2604ca3000-7f26050a6000 rw-p 0189e000 08:12 8805640                    /usr/lib/nvidia-384/libnvidia-glcore.so.384.90
7f26050a6000-7f26050bf000 rw-p 00000000 00:00 0 
7f26050bf000-7f26050c2000 r-xp 00000000 08:12 8805638                    /usr/lib/nvidia-384/tls/libnvidia-tls.so.384.90
7f26050c2000-7f26052c2000 ---p 00003000 08:12 8805638                    /usr/lib/nvidia-384/tls/libnvidia-tls.so.384.90
7f26052c2000-7f26052c3000 rw-p 00003000 08:12 8805638                    /usr/lib/nvidia-384/tls/libnvidia-tls.so.384.90
7f26052c3000-7f260530d000 r-xp 00000000 08:12 2888110                    /lib/x86_64-linux-gnu/libdbus-1.so.3.14.6
7f260530d000-7f260550d000 ---p 0004a000 08:12 2888110                    /lib/x86_64-linux-gnu/libdbus-1.so.3.14.6
7f260550d000-7f260550e000 r--p 0004a000 08:12 2888110                    /lib/x86_64-linux-gnu/libdbus-1.so.3.14.6
7f260550e000-7f260550f000 rw-p 0004b000 08:12 2888110                    /lib/x86_64-linux-gnu/libdbus-1.so.3.14.6
7f260550f000-7f2605519000 r-xp 00000000 08:12 2888204                    /lib/x86_64-linux-gnu/libjson-c.so.2.0.0
7f2605519000-7f2605718000 ---p 0000a000 08:12 2888204                    /lib/x86_64-linux-gnu/libjson-c.so.2.0.0
7f2605718000-7f2605719000 r--p 00009000 08:12 2888204                    /lib/x86_64-linux-gnu/libjson-c.so.2.0.0
7f2605719000-7f260571a000 rw-p 0000a000 08:12 2888204                    /lib/x86_64-linux-gnu/libjson-c.so.2.0.0
7f260571a000-7f2605794000 r-xp 00000000 08:12 8914109                    /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so
7f2605794000-7f2605993000 ---p 0007a000 08:12 8914109                    /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so
7f2605993000-7f2605994000 r--p 00079000 08:12 8914109                    /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so
7f2605994000-7f2605995000 rw-p 0007a000 08:12 8914109                    /usr/lib/x86_64-linux-gnu/pulseaudio/libpulsecommon-8.0.so
7f2605995000-7f260599c000 r-xp 00000000 08:12 2888223                    /lib/x86_64-linux-gnu/librt-2.23.so
7f260599c000-7f2605b9b000 ---p 00007000 08:12 2888223                    /lib/x86_64-linux-gnu/librt-2.23.so
7f2605b9b000-7f2605b9c000 r--p 00006000 08:12 2888223                    /lib/x86_64-linux-gnu/librt-2.23.so
7f2605b9c000-7f2605b9d000 rw-p 00007000 08:12 2888223                    /lib/x86_64-linux-gnu/librt-2.23.so
7f2605b9d000-7f2605bae000 r-xp 00000000 08:12 8789841                    /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f2605bae000-7f2605dad000 ---p 00011000 08:12 8789841                    /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f2605dad000-7f2605dae000 r--p 00010000 08:12 8789841                    /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f2605dae000-7f2605daf000 rw-p 00011000 08:12 8789841                    /usr/lib/x86_64-linux-gnu/libXext.so.6.4.0
7f2605daf000-7f2605db4000 r-xp 00000000 08:12 8789843                    /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7f2605db4000-7f2605fb3000 ---p 00005000 08:12 8789843                    /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7f2605fb3000-7f2605fb4000 r--p 00004000 08:12 8789843                    /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7f2605fb4000-7f2605fb5000 rw-p 00005000 08:12 8789843                    /usr/lib/x86_64-linux-gnu/libXfixes.so.3.1.0
7f2605fb5000-7f2605fbe000 r-xp 00000000 08:12 8789861                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7f2605fbe000-7f26061bd000 ---p 00009000 08:12 8789861                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7f26061bd000-7f26061be000 r--p 00008000 08:12 8789861                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7f26061be000-7f26061bf000 rw-p 00009000 08:12 8789861                    /usr/lib/x86_64-linux-gnu/libXrender.so.1.3.0
7f26061bf000-7f26061e0000 r-xp 00000000 08:12 8791077                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f26061e0000-7f26063df000 ---p 00021000 08:12 8791077                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f26063df000-7f26063e0000 r--p 00020000 08:12 8791077                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f26063e0000-7f26063e1000 rw-p 00021000 08:12 8791077                    /usr/lib/x86_64-linux-gnu/libxcb.so.1.1.0
7f26063e1000-7f26064e9000 r-xp 00000000 08:12 2888315                    /lib/x86_64-linux-gnu/libm-2.23.so
7f26064e9000-7f26066e8000 ---p 00108000 08:12 2888315                    /lib/x86_64-linux-gnu/libm-2.23.so
7f26066e8000-7f26066e9000 r--p 00107000 08:12 2888315                    /lib/x86_64-linux-gnu/libm-2.23.so
7f26066e9000-7f26066ea000 rw-p 00108000 08:12 2888315                    /lib/x86_64-linux-gnu/libm-2.23.so
7f26066ea000-7f26066ed000 r-xp 00000000 08:12 2888247                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f26066ed000-7f26068ec000 ---p 00003000 08:12 2888247                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f26068ec000-7f26068ed000 r--p 00002000 08:12 2888247                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f26068ed000-7f26068ee000 rw-p 00003000 08:12 2888247                    /lib/x86_64-linux-gnu/libdl-2.23.so
7f26068ee000-7f2606906000 r-xp 00000000 08:12 2888156                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f2606906000-7f2606b05000 ---p 00018000 08:12 2888156                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f2606b05000-7f2606b06000 r--p 00017000 08:12 2888156                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f2606b06000-7f2606b07000 rw-p 00018000 08:12 2888156                    /lib/x86_64-linux-gnu/libpthread-2.23.so
7f2606b07000-7f2606b0b000 rw-p 00000000 00:00 0 
7f2606b0b000-7f2606bd6000 r-xp 00000000 08:12 8805669                    /usr/lib/nvidia-384/libGL.so.384.90
7f2606bd6000-7f2606c0a000 rwxp 000cb000 08:12 8805669                    /usr/lib/nvidia-384/libGL.so.384.90
7f2606c0a000-7f2606c1e000 r-xp 000ff000 08:12 8805669                    /usr/lib/nvidia-384/libGL.so.384.90
7f2606c1e000-7f2606e1d000 ---p 00113000 08:12 8805669                    /usr/lib/nvidia-384/libGL.so.384.90
7f2606e1d000-7f2606e46000 rw-p 00112000 08:12 8805669                    /usr/lib/nvidia-384/libGL.so.384.90
7f2606e46000-7f2606e4d000 rw-p 00000000 00:00 0 
7f2606e4d000-7f2606e9b000 r-xp 00000000 08:12 8787301                    /usr/lib/x86_64-linux-gnu/libpulse.so.0.19.0
7f2606e9b000-7f260709b000 ---p 0004e000 08:12 8787301                    /usr/lib/x86_64-linux-gnu/libpulse.so.0.19.0
7f260709b000-7f260709c000 r--p 0004e000 08:12 8787301                    /usr/lib/x86_64-linux-gnu/libpulse.so.0.19.0
7f260709c000-7f260709d000 rw-p 0004f000 08:12 8787301                    /usr/lib/x86_64-linux-gnu/libpulse.so.0.19.0
7f260709d000-7f26070a0000 r-xp 00000000 08:12 8787302                    /usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
7f26070a0000-7f26072a0000 ---p 00003000 08:12 8787302                    /usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
7f26072a0000-7f26072a1000 r--p 00003000 08:12 8787302                    /usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
7f26072a1000-7f26072a2000 rw-p 00004000 08:12 8787302                    /usr/lib/x86_64-linux-gnu/libpulse-simple.so.0.1.0
7f26072a2000-7f260739b000 r-xp 00000000 08:12 8789910                    /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
7f260739b000-7f260759a000 ---p 000f9000 08:12 8789910                    /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
7f260759a000-7f26075a1000 r--p 000f8000 08:12 8789910                    /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
7f26075a1000-7f26075a2000 rw-p 000ff000 08:12 8789910                    /usr/lib/x86_64-linux-gnu/libasound.so.2.0.0
7f26075a2000-7f26075ac000 r-xp 00000000 08:12 8789859                    /usr/lib/x86_64-linux-gnu/libXrandr.so.2.2.0
7f26075ac000-7f26077ab000 ---p 0000a000 08:12 8789859                    /usr/lib/x86_64-linux-gnu/libXrandr.so.2.2.0
7f26077ab000-7f26077ac000 r--p 00009000 08:12 8789859                    /usr/lib/x86_64-linux-gnu/libXrandr.so.2.2.0
7f26077ac000-7f26077ad000 rw-p 0000a000 08:12 8789859                    /usr/lib/x86_64-linux-gnu/libXrandr.so.2.2.0
7f26077ad000-7f26077af000 r-xp 00000000 08:12 8789851                    /usr/lib/x86_64-linux-gnu/libXinerama.so.1.0.0
7f26077af000-7f26079ae000 ---p 00002000 08:12 8789851                    /usr/lib/x86_64-linux-gnu/libXinerama.so.1.0.0
7f26079ae000-7f26079af000 r--p 00001000 08:12 8789851                    /usr/lib/x86_64-linux-gnu/libXinerama.so.1.0.0
7f26079af000-7f26079b0000 rw-p 00002000 08:12 8789851                    /usr/lib/x86_64-linux-gnu/libXinerama.so.1.0.0
7f26079b0000-7f26079b9000 r-xp 00000000 08:12 8789835                    /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
7f26079b9000-7f2607bb8000 ---p 00009000 08:12 8789835                    /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
7f2607bb8000-7f2607bb9000 r--p 00008000 08:12 8789835                    /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
7f2607bb9000-7f2607bba000 rw-p 00009000 08:12 8789835                    /usr/lib/x86_64-linux-gnu/libXcursor.so.1.0.2
7f2607bba000-7f2607cef000 r-xp 00000000 08:12 8789824                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f2607cef000-7f2607eef000 ---p 00135000 08:12 8789824                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f2607eef000-7f2607ef0000 r--p 00135000 08:12 8789824                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f2607ef0000-7f2607ef4000 rw-p 00136000 08:12 8789824                    /usr/lib/x86_64-linux-gnu/libX11.so.6.3.0
7f2607ef4000-7f26080b4000 r-xp 00000000 08:12 2889887                    /lib/x86_64-linux-gnu/libc-2.23.so
7f26080b4000-7f26082b4000 ---p 001c0000 08:12 2889887                    /lib/x86_64-linux-gnu/libc-2.23.so
7f26082b4000-7f26082b8000 r--p 001c0000 08:12 2889887                    /lib/x86_64-linux-gnu/libc-2.23.so
7f26082b8000-7f26082ba000 rw-p 001c4000 08:12 2889887                    /lib/x86_64-linux-gnu/libc-2.23.so
7f26082ba000-7f26082be000 rw-p 00000000 00:00 0 
7f26082be000-7f26082d4000 r-xp 00000000 08:12 2888183                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f26082d4000-7f26084d3000 ---p 00016000 08:12 2888183                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f26084d3000-7f26084d4000 rw-p 00015000 08:12 2888183                    /lib/x86_64-linux-gnu/libgcc_s.so.1
7f26084d4000-7f26084fa000 r-xp 00000000 08:12 2888121                    /lib/x86_64-linux-gnu/ld-2.23.so
7f26084fa000-7f26084fb000 rw-s 00000000 00:06 518                        /dev/nvidia0
7f26084fb000-7f26085fc000 rw-p 00000000 00:00 0 
7f26085fc000-7f26085fd000 ---p 00000000 00:00 0 
7f26085fd000-7f2608647000 rw-p 00000000 00:00 0 
7f2608647000-7f26086c7000 r-xp 00000000 08:12 2888318                    /lib/x86_64-linux-gnu/libsystemd.so.0.14.0
7f26086c7000-7f26086ca000 r--p 0007f000 08:12 2888318                    /lib/x86_64-linux-gnu/libsystemd.so.0.14.0
7f26086ca000-7f26086cb000 rw-p 00082000 08:12 2888318                    /lib/x86_64-linux-gnu/libsystemd.so.0.14.0
7f26086cb000-7f26086d5000 rw-p 00000000 00:00 0 
7f26086d5000-7f26086d6000 rw-s 00000000 00:06 518                        /dev/nvidia0
7f26086f5000-7f26086f6000 rw-p 00000000 00:00 0 
7f26086f6000-7f26086f7000 rw-s 00000000 00:06 517                        /dev/nvidiactl
7f26086f7000-7f26086f9000 rw-p 00000000 00:00 0 
7f26086f9000-7f26086fa000 r--p 00025000 08:12 2888121                    /lib/x86_64-linux-gnu/ld-2.23.so
7f26086fa000-7f26086fb000 rw-p 00026000 08:12 2888121                    /lib/x86_64-linux-gnu/ld-2.23.so
7f26086fb000-7f26086fc000 rw-p 00000000 00:00 0 
7ffeb725b000-7ffeb72a2000 rw-p 00000000 00:00 0                          [stack]
7ffeb72a9000-7ffeb72ab000 r--p 00000000 00:00 0                          [vvar]
7ffeb72ab000-7ffeb72ad000 r-xp 00000000 00:00 0                          [vdso]
ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]
Aborted (core dumped)
akien-mga commented 6 years ago

Can you still reproduce it in Godot 3.0 beta 2?

akien-mga commented 6 years ago

I've tried your master branch on Godot's current master branch and couldn't reproduce a crash in the editor. Then I read that it crashed in exported builds, so I tried with a 3.0 beta2 Linux 64-bit release binary, but it also worked fine (it shows many errors in the console with might be linked to different issues though, likely specific to that project). I've tried the build from itch.io which also worked fine.

So I guess it got fixed somehow?

tom95 commented 6 years ago

Most of the time the crash happened just before or just after the final boss battle (with the game open, hit f4 and then ctrl+alt+b to teleport right to him). I will test myself with beta2 and report back. Thanks a lot for the assistance!

akien-mga commented 6 years ago

Most of the time the crash happened just before or just after the final boss battle (with the game open, hit f4 and then ctrl+alt+b to teleport right to him).

Yeah that's what I tried, I got killed 10 times or so by the boss trying to reproduce it :P

tom95 commented 6 years ago

With this build http://tombeckmann.de/c/debug.zip (any hoster you can recommend for test files?) I reliably get crashes on Ubuntu 16.04 64bit whenever I press enter after killing the boss (he is now one-hittable, thanks for playtesting :P ). The corresponding code is on this branch: https://github.com/tom95/thrown-back/tree/crash-debug (fixed some of the failing assertions you mentioned, removed the music for lighter export, added the debug print mentioned below).

This is the code that gets executed when pressing enter:

func _process(delta):
    if Input.is_action_pressed("start"):
        var game = load("res://game/game.tscn").instance()
        get_parent().add_child(game)
        game.show_level(FIRST_LEVEL)
        game.show_instructions(SHOW_INSTRUCTIONS)
        queue_free()

I added print statements between each line, the last one that got printed was just before load() (I split the load/instance statement for testing). The corresponding trace from gdb:

#0  _int_malloc (av=av@entry=0x7fc9e3686b20 <main_arena>, bytes=bytes@entry=552) at malloc.c:3516
#1  0x00007fc9e3346184 in __GI___libc_malloc (bytes=552) at malloc.c:2913
#2  0x00007fc9e332fcdd in __fopen_internal (filename=0x2501100 "/home/tom/Code/godot/thrown-back/wizards.pck", mode=0x174fe71 "rb", is32=1) at iofopen.c:69
#3  0x0000000000831456 in ?? ()

@cmfcmf said that he'll re-test the crashes on Windows 64bit with beta2 tomorrow :)

akien-mga commented 6 years ago

Thanks, using this debug branch I can reproduce the bug with the Linux 64-bit release template of 3.0 beta 2. With the debug template it's not crashing, so indeed it's hard to get proper debug information.

I'll try a local build of a release template with debug symbols (yeah, that can be done :P) and see how it goes.

akien-mga commented 6 years ago

I built a release binary with scons p=x11 target=release tools=no but could not reproduce the issue, whether I kept the debug symbols next to it or not. I'll try with LTO now, as the official binaries. Other possibility could be that I build my local binaries with GCC 5.4.0, while official binaries use GCC 7.1.

Edit: Also doesn't crash with LTO on GCC 5.4.0... It's starting to remind me of GCC 6+ specific crashes we had last year on release builds.

cmfcmf commented 6 years ago

Finally got around testing this on Windows 10 64bit running Godot Beta 2: I can reproduce the crash with debug disabled. I can not reproduce the crash with debug enabled, this is the output I receive in debug mode after killing the boss:

ERROR: time should be greater than zero.
   At: scene\main\timer.cpp:83
done
ERROR: RID_Owner<struct RasterizerStorageGLES3::Material>::getornull: Condition ' !id_map.has(p_rid.get_data()) ' is true. returned: 0
   At: c:\projects\godot-builds\godot\core\rid.h:164
ERROR: RID_Owner<struct RasterizerStorageGLES3::Material>::getornull: Condition ' !id_map.has(p_rid.get_data()) ' is true. returned: 0
   At: c:\projects\godot-builds\godot\core\rid.h:164
a
b
c
d
e
f
z
akien-mga commented 6 years ago

Thanks, this rules out a GCC-specific issue as Windows builds are done with Visual Studio 2017.

The debug output can point us in the right direction though, release builds don't check for such errors so they can indeed crash, while debug builds will error out. So finding what causes those errors (either in the game scripts or in the engine itself) should help solve the issue.

hpvb commented 6 years ago

I have found more information about this crash, I need to reproduce with a build with more debugging symbols (no lineno information here) but I do have proper backtraces from valgrind about what I suspect is causing this problem:

https://paste.fedoraproject.org/paste/nK-8g3lJaqlprpL-gOawEw

I'll update once I have linenos

edit: Initial analysis of the valgrind information seems to suggest that RasterizerStorageGLES3::update_dirty_resources() tries to access a recently free'd material. It appears that the material gets freed in response to a node deletion.

hpvb commented 6 years ago

I've been able to reproduce the crash using 0b1e6ec2195a22ad66513685d0c0850eaeb9b528. The full valgrind output is here (now with line numbers) https://paste.fedoraproject.org/paste/7DKQYqfeK-DoIdkL0z90nw

However, on master (aebdc4c2126789b915b0fb753f0594fec0f0226d) the problem does not occur.

I'm pretty sure that this problem has been fixed in the meantime. I don't know what commit might've done it though. However, the fact that valgrind isn't showing any use-after-free errors on master suggests to me that it is actually fixed and not just a fluke.

akien-mga commented 6 years ago

Awesome, thanks for debugging all this.

@tom95 @cmfcmf Could you try again with a nightly build from http://godot3builds.digitecnology.com/ ?

tom95 commented 6 years ago

Tried with

Build date: 2018-01-09 13:10:08
Git commit id (short): 4b414f45c

and no crashes on linux \o/

hpvb commented 6 years ago

After reverting 75c624e119998c4286a3d13e33233f44924f324a on master the crash reappeared. It seems that this fixed the problem.

akien-mga commented 6 years ago

Awesome, fixed by 75c624e then.

cmfcmf commented 6 years ago

I can confirm this is fixed on Windows as well 👍 🎉