Godot version:
Beta.8.official
Issue description:
Hi. Excuse me for my bad English.
I'm having a lot of errors like that when I'm advancing a prototype of a game.
I don't know how to exactly replicate the error and make a minimal example. But I can pass the commit of the project I'm doing so they can see if the same thing happens to them or not.
https://github.com/MatiasVME/project-humanity/tree/266011e1e408b8a1749790c4e963d84122f89fab
I also made a video so that it can be better understood.
I know my code may be bad, but I think it should give an error in the editor.
This is the error:
handle_crash: Program crashed with signal 11
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7fadc1f81f20] (??:0)
[2] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x8ed146] (??:?)
[3] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0xa45238] (<artificial>:?)
[4] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x216378f] (??:?)
[5] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x24581ee] (??:?)
[6] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x8f1129] (??:?)
[7] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0xa45238] (<artificial>:?)
[8] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x216378f] (??:?)
[9] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x24581ee] (??:?)
[10] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x8f1129] (??:?)
[11] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0xa45238] (<artificial>:?)
[12] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x216378f] (??:?)
[13] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x21d5522] (??:?)
[14] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x21d647e] (<artificial>:?)
[15] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x2114a4f] (??:?)
[16] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x2163853] (??:?)
[17] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x24581ee] (??:?)
[18] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x8f1129] (??:?)
[19] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0xa45238] (<artificial>:?)
[20] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x216378f] (??:?)
[21] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x21d5522] (??:?)
[22] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x21d647e] (<artificial>:?)
[23] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x2114a4f] (??:?)
[24] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x2163853] (??:?)
[25] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x24581ee] (??:?)
[26] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x8f1129] (??:?)
[27] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0xa45160] (<artificial>:?)
[28] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x16b684f] (??:?)
[29] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x1af48a8] (<artificial>:?)
[30] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x2114bd4] (??:?)
[31] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x1647d7e] (<artificial>:?)
[32] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x1655fbf] (??:?)
[33] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0xaf3325] (??:?)
[34] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x7aefbd] (??:?)
[35] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7fadc1f64b97] (??:0)
[36] /media/disco/programas/Godot_v3.1-beta8_x11.64() [0x7bc9ee] (??:?)
-- END OF BACKTRACE --
Steps to reproduce:
1) Download de project:
https://github.com/MatiasVME/project-humanity/tree/266011e1e408b8a1749790c4e963d84122f89fab
2) Open in Godot (Beta 8)
3) Take items (left click)
4) Shoot (Many times, right-click)
More detailed backtrace
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7efcaf4a7f20] (??:0)
[2] GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) (/home/rafal/Pulpit/godot/modules/gdscript/gdscript_function.cpp:498 (discriminator 1))
[3] GDScriptInstance::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/modules/gdscript/gdscript.cpp:1174)
[4] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/core/object.cpp:922 (discriminator 1))
[5] Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&) (/home/rafal/Pulpit/godot/core/variant_call.cpp:1049 (discriminator 1))
[6] GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) (/home/rafal/Pulpit/godot/modules/gdscript/gdscript_function.cpp:1067)
[7] GDScriptInstance::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/modules/gdscript/gdscript.cpp:1174)
[8] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/core/object.cpp:922 (discriminator 1))
[9] Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&) (/home/rafal/Pulpit/godot/core/variant_call.cpp:1049 (discriminator 1))
[10] GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) (/home/rafal/Pulpit/godot/modules/gdscript/gdscript_function.cpp:1073)
[11] GDScriptInstance::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/modules/gdscript/gdscript.cpp:1174)
[12] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/core/object.cpp:922 (discriminator 1))
[13] Object::emit_signal(StringName const&, Variant const**, int) (/home/rafal/Pulpit/godot/core/object.cpp:1229 (discriminator 1))
[14] Object::_emit_signal(Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/core/object.cpp:1158)
[15] MethodBindVarArg<Object>::call(Object*, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/./core/method_bind.h:343 (discriminator 4))
[16] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/core/object.cpp:943 (discriminator 1))
[17] Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&) (/home/rafal/Pulpit/godot/core/variant_call.cpp:1049 (discriminator 1))
[18] GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) (/home/rafal/Pulpit/godot/modules/gdscript/gdscript_function.cpp:1073)
[19] GDScriptInstance::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/modules/gdscript/gdscript.cpp:1174)
[20] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/core/object.cpp:922 (discriminator 1))
[21] Object::emit_signal(StringName const&, Variant const**, int) (/home/rafal/Pulpit/godot/core/object.cpp:1229 (discriminator 1))
[22] Object::_emit_signal(Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/core/object.cpp:1158)
[23] MethodBindVarArg<Object>::call(Object*, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/./core/method_bind.h:343 (discriminator 4))
[24] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/rafal/Pulpit/godot/core/object.cpp:943 (discriminator 1))
[25] Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&) (/home/rafal/Pulpit/godot/core/variant_call.cpp:1049 (discriminator 1))
[26] GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) (/home/rafal/Pulpit/godot/modules/gdscript/gdscript_function.cpp:1073)
[27] GDScriptInstance::call_multilevel(StringName const&, Variant const**, int) (/home/rafal/Pulpit/godot/modules/gdscript/gdscript.cpp:1190)
[28] Node::_notification(int) (/home/rafal/Pulpit/godot/scene/main/node.cpp:61)
[29] Node::_notificationv(int, bool) (/home/rafal/Pulpit/godot/./scene/main/node.h:46 (discriminator 14))
[30] CanvasItem::_notificationv(int, bool) (/home/rafal/Pulpit/godot/./scene/2d/canvas_item.h:166 (discriminator 3))
[31] Node2D::_notificationv(int, bool) (/home/rafal/Pulpit/godot/./scene/2d/node_2d.h:38 (discriminator 3))
[32] CollisionObject2D::_notificationv(int, bool) (/home/rafal/Pulpit/godot/./scene/2d/collision_object_2d.h:39 (discriminator 3))
[33] PhysicsBody2D::_notificationv(int, bool) (/home/rafal/Pulpit/godot/scene/2d/physics_body_2d.h:43 (discriminator 3))
[34] KinematicBody2D::_notificationv(int, bool) (/home/rafal/Pulpit/godot/scene/2d/physics_body_2d.h:290 (discriminator 3))
[35] Object::notification(int, bool) (/home/rafal/Pulpit/godot/core/object.cpp:955)
[36] SceneTree::_notify_group_pause(StringName const&, int) (/home/rafal/Pulpit/godot/scene/main/scene_tree.cpp:969)
[37] SceneTree::iteration(float) (/home/rafal/Pulpit/godot/scene/main/scene_tree.cpp:474 (discriminator 2))
[38] Main::iteration() (/home/rafal/Pulpit/godot/main/main.cpp:1861)
[39] OS_X11::run() (/home/rafal/Pulpit/godot/platform/x11/os_x11.cpp:3004)
[40] /usr/bin/godot(main+0xdc) [0x1160da3] (/home/rafal/Pulpit/godot/platform/x11/godot_x11.cpp:56)
[41] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7efcaf48ab97] (??:0)
[42] /usr/bin/godot(_start+0x2a) [0x1160c0a] (??:?)
Crashes for me on windows too. Opens up a project but then instantly closes after a few seconds.
This is a use after free, a method is called on an object that was previous queue_free()'d. This should probably not happen nor crash the engine. I'll try to come up with a solution.
=================================================================
==21356==ERROR: AddressSanitizer: heap-use-after-free on address 0x616000666c90 at pc 0x0000019d609f bp 0x7ffc6daa8b60 sp 0x7ffc6daa8b50
READ of size 8 at 0x616000666c90 thread T0
#0 0x19d609e in GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) modules/gdscript/gdscript_function.cpp:498
#1 0x159ef50 in GDScriptInstance::call(StringName const&, Variant const**, int, Variant::CallError&) modules/gdscript/gdscript.cpp:1174
#2 0x13e34c7c in Object::call(StringName const&, Variant const**, int, Variant::CallError&) core/object.cpp:922
#3 0x14350827 in Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&) core/variant_call.cpp:1049
#4 0x1939c45 in GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) modules/gdscript/gdscript_function.cpp:1070
#5 0x159ef50 in GDScriptInstance::call(StringName const&, Variant const**, int, Variant::CallError&) modules/gdscript/gdscript.cpp:1174
#6 0x13e34c7c in Object::call(StringName const&, Variant const**, int, Variant::CallError&) core/object.cpp:922
#7 0x14350827 in Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&) core/variant_call.cpp:1049
#8 0x1939c45 in GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) modules/gdscript/gdscript_function.cpp:1070
#9 0x159ef50 in GDScriptInstance::call(StringName const&, Variant const**, int, Variant::CallError&) modules/gdscript/gdscript.cpp:1174
#10 0x13e34c7c in Object::call(StringName const&, Variant const**, int, Variant::CallError&) core/object.cpp:922
#11 0x13e7d5d7 in Object::emit_signal(StringName const&, Variant const**, int) core/object.cpp:1229
#12 0x13e835a3 in Object::_emit_signal(Variant const**, int, Variant::CallError&) core/object.cpp:1156
#13 0x13ea7920 in MethodBindVarArg<Object>::call(Object*, Variant const**, int, Variant::CallError&) core/method_bind.h:342
#14 0x13e34448 in Object::call(StringName const&, Variant const**, int, Variant::CallError&) core/object.cpp:943
#15 0x14350827 in Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&) core/variant_call.cpp:1049
#16 0x1939c45 in GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) modules/gdscript/gdscript_function.cpp:1070
#17 0x159ef50 in GDScriptInstance::call(StringName const&, Variant const**, int, Variant::CallError&) modules/gdscript/gdscript.cpp:1174
#18 0x13e34c7c in Object::call(StringName const&, Variant const**, int, Variant::CallError&) core/object.cpp:922
#19 0x13e7d5d7 in Object::emit_signal(StringName const&, Variant const**, int) core/object.cpp:1229
#20 0x13e835a3 in Object::_emit_signal(Variant const**, int, Variant::CallError&) core/object.cpp:1156
#21 0x13ea7920 in MethodBindVarArg<Object>::call(Object*, Variant const**, int, Variant::CallError&) core/method_bind.h:342
#22 0x13e34448 in Object::call(StringName const&, Variant const**, int, Variant::CallError&) core/object.cpp:943
#23 0x14350827 in Variant::call_ptr(StringName const&, Variant const**, int, Variant*, Variant::CallError&) core/variant_call.cpp:1049
#24 0x1939c45 in GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*) modules/gdscript/gdscript_function.cpp:1070
#25 0x15a2c55 in GDScriptInstance::call_multilevel(StringName const&, Variant const**, int) modules/gdscript/gdscript.cpp:1190
#26 0xb0bf961 in Node::_notification(int) scene/main/node.cpp:63
#27 0xdb69f55 in Node::_notificationv(int, bool) scene/main/node.h:46
#28 0xdb69f55 in CanvasItem::_notificationv(int, bool) scene/2d/canvas_item.h:166
#29 0xdb69f55 in Node2D::_notificationv(int, bool) scene/2d/node_2d.h:38
#30 0xdb69f55 in CollisionObject2D::_notificationv(int, bool) scene/2d/collision_object_2d.h:39
#31 0xdb69f55 in PhysicsBody2D::_notificationv(int, bool) scene/2d/physics_body_2d.h:43
#32 0xdb69f55 in KinematicBody2D::_notificationv(int, bool) scene/2d/physics_body_2d.h:290
#33 0x13e1bb64 in Object::notification(int, bool) core/object.cpp:953
#34 0xb23769e in SceneTree::_notify_group_pause(StringName const&, int) scene/main/scene_tree.cpp:969
#35 0xb24f5b4 in SceneTree::iteration(float) scene/main/scene_tree.cpp:474
#36 0x111ba8b in Main::iteration() main/main.cpp:1861
#37 0x10191cc in OS_X11::run() platform/x11/os_x11.cpp:3004
#38 0xf9fce5 in main platform/x11/godot_x11.cpp:55
#39 0x7faea817b412 in __libc_start_main (/lib64/libc.so.6+0x24412)
#40 0xfbac2d in _start (/root/workspace/godot/bin/godot.x11.opt.tools.64+0xfbac2d)
0x616000666c90 is located 16 bytes inside of 536-byte region [0x616000666c80,0x616000666e98)
freed by thread T0 here:
#0 0x7faea9715480 in free (/lib64/libasan.so.5+0xef480)
#1 0xb1d16f5 in void memdelete<Object>(Object*) core/os/memory.h:122
#2 0xb1d16f5 in void memdelete<Object>(Object*) core/os/memory.h:115
#3 0xb1d16f5 in SceneTree::_flush_delete_queue() scene/main/scene_tree.cpp:1115
previously allocated by thread T0 here:
#0 0x7faea9715848 in __interceptor_malloc (/lib64/libasan.so.5+0xef848)
#1 0x14767201 in Memory::alloc_static(unsigned long, bool) core/os/memory.cpp:85
SUMMARY: AddressSanitizer: heap-use-after-free modules/gdscript/gdscript_function.cpp:498 in GDScriptFunction::call(GDScriptInstance*, Variant const**, int, Variant::CallError&, GDScriptFunction::CallState*)
Shadow bytes around the buggy address:
0x0c2c800c4d40: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c2c800c4d50: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c2c800c4d60: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c2c800c4d70: fd fd fa fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2c800c4d80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
=>0x0c2c800c4d90: fd fd[fd]fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c2c800c4da0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c2c800c4db0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c2c800c4dc0: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
0x0c2c800c4dd0: fd fd fd fa fa fa fa fa fa fa fa fa fa fa fa fa
0x0c2c800c4de0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
Addressable: 00
Partially addressable: 01 02 03 04 05 06 07
Heap left redzone: fa
Freed heap region: fd
Stack left redzone: f1
Stack mid redzone: f2
Stack right redzone: f3
Stack after return: f5
Stack use after scope: f8
Global redzone: f9
Global init order: f6
Poisoned by user: f7
Container overflow: fc
Array cookie: ac
Intra object redzone: bb
ASan internal: fe
Left alloca redzone: ca
Right alloca redzone: cb
==21356==ABORTING
Crashes for me on windows too. Opens up a project but then instantly closes after a few seconds.
A friend (windows user) has the same problem (only in beta 8, in beta7 works fine):

脤 had the same. Its because of switching from OGL 3 to OGL 2 and then closing and open the project.
I just change this: quality/driver/driver_name="GLES2" in the project.godot file.
The bug is still in there with Godot_v3.1-beta10 under Windows.
Edit: no crash with build 7 but crash with build 8.
My friend solved it by erasing the line:
quality/driver/driver_name="GLES2"
And opened again godot.
Although that's not the main problem exposed. Only windows users couldn't open the project.
Still reproducible in the current master branch (0d72812):
Thread 1 "godot-git" received signal SIGSEGV, Segmentation fault.
0x00000000012c8b25 in GDScriptFunction::call (this=0x62ced30, p_instance=0x645da80, p_args=0x7fffffff7a48, p_argcount=0, r_err=..., p_state=0x0)
at modules/gdscript/gdscript_function.cpp:503
503 if (obj_A->get_script_instance() && obj_A->get_script_instance()->get_language() == GDScriptLanguage::get_singleton()) {
(gdb) bt
#0 0x00000000012c8b25 in GDScriptFunction::call (this=0x62ced30, p_instance=0x645da80, p_args=0x7fffffff7a48, p_argcount=0, r_err=..., p_state=0x0)
at modules/gdscript/gdscript_function.cpp:503
#1 0x000000000127b182 in GDScriptInstance::call (this=0x645da80, p_method=..., p_args=0x7fffffff7a48, p_argcount=0, r_error=...) at modules/gdscript/gdscript.cpp:1175
#2 0x000000000317e09d in Object::call (this=0x5917f20, p_method=..., p_args=0x7fffffff7a48, p_argcount=0, r_error=...) at core/object.cpp:921
#3 0x0000000003212f6c in Variant::call_ptr (this=0x7fffffff7c40, p_method=..., p_args=0x7fffffff7a48, p_argcount=0, r_ret=0x7fffffff7a00, r_error=...) at core/variant_call.cpp:1049
#4 0x00000000012cdd62 in GDScriptFunction::call (this=0x62ba9b0, p_instance=0x645da80, p_args=0x0, p_argcount=0, r_err=..., p_state=0x0) at modules/gdscript/gdscript_function.cpp:1072
#5 0x000000000127b182 in GDScriptInstance::call (this=0x645da80, p_method=..., p_args=0x0, p_argcount=0, r_error=...) at modules/gdscript/gdscript.cpp:1175
#6 0x000000000317e09d in Object::call (this=0x5917f20, p_method=..., p_args=0x0, p_argcount=0, r_error=...) at core/object.cpp:921
#7 0x0000000003212f6c in Variant::call_ptr (this=0x7fffffff8f90, p_method=..., p_args=0x0, p_argcount=0, r_ret=0x0, r_error=...) at core/variant_call.cpp:1049
#8 0x00000000012cdd97 in GDScriptFunction::call (this=0x62cf400, p_instance=0x645da80, p_args=0x7fffffffa450, p_argcount=2, r_err=..., p_state=0x0)
at modules/gdscript/gdscript_function.cpp:1075
#9 0x000000000127b182 in GDScriptInstance::call (this=0x645da80, p_method=..., p_args=0x7fffffffa450, p_argcount=2, r_error=...) at modules/gdscript/gdscript.cpp:1175
#10 0x000000000317e09d in Object::call (this=0x5917f20, p_method=..., p_args=0x7fffffffa450, p_argcount=2, r_error=...) at core/object.cpp:921
#11 0x000000000317fa3e in Object::emit_signal (this=0x614c5b0, p_name=..., p_args=0x7fffffffa450, p_argcount=2) at core/object.cpp:1228
#12 0x000000000317f438 in Object::_emit_signal (this=0x614c5b0, p_args=0x7fffffffa448, p_argcount=3, r_error=...) at core/object.cpp:1155
#13 0x0000000003192069 in MethodBindVarArg<Object>::call (this=0x4a331d0, p_object=0x614c5b0, p_args=0x7fffffffa448, p_arg_count=3, r_error=...) at ./core/method_bind.h:342
#14 0x000000000317e1bd in Object::call (this=0x614c5b0, p_method=..., p_args=0x7fffffffa448, p_argcount=3, r_error=...) at core/object.cpp:942
#15 0x0000000003212f6c in Variant::call_ptr (this=0x7fffffffa650, p_method=..., p_args=0x7fffffffa448, p_argcount=3, r_ret=0x0, r_error=...) at core/variant_call.cpp:1049
#16 0x00000000012cdd97 in GDScriptFunction::call (this=0x61488e0, p_instance=0x60738c0, p_args=0x6156110, p_argcount=2, r_err=..., p_state=0x0)
at modules/gdscript/gdscript_function.cpp:1075
#17 0x000000000127b182 in GDScriptInstance::call (this=0x60738c0, p_method=..., p_args=0x6156110, p_argcount=2, r_error=...) at modules/gdscript/gdscript.cpp:1175
#18 0x000000000317e09d in Object::call (this=0x614c5b0, p_method=..., p_args=0x6156110, p_argcount=2, r_error=...) at core/object.cpp:921
#19 0x000000000317fa3e in Object::emit_signal (this=0x5364e90, p_name=..., p_args=0x7fffffffbb40, p_argcount=1) at core/object.cpp:1228
#20 0x000000000317f438 in Object::_emit_signal (this=0x5364e90, p_args=0x7fffffffbb38, p_argcount=2, r_error=...) at core/object.cpp:1155
#21 0x0000000003192069 in MethodBindVarArg<Object>::call (this=0x4a331d0, p_object=0x5364e90, p_args=0x7fffffffbb38, p_arg_count=2, r_error=...) at ./core/method_bind.h:342
#22 0x000000000317e1bd in Object::call (this=0x5364e90, p_method=..., p_args=0x7fffffffbb38, p_argcount=2, r_error=...) at core/object.cpp:942
#23 0x0000000003212f6c in Variant::call_ptr (this=0x7fffffffbd30, p_method=..., p_args=0x7fffffffbb38, p_argcount=2, r_ret=0x0, r_error=...) at core/variant_call.cpp:1049
#24 0x00000000012cdd97 in GDScriptFunction::call (this=0x6146570, p_instance=0x664fec0, p_args=0x7fffffffcce8, p_argcount=1, r_err=..., p_state=0x0)
at modules/gdscript/gdscript_function.cpp:1075
#25 0x000000000127b243 in GDScriptInstance::call_multilevel (this=0x664fec0, p_method=..., p_args=0x7fffffffcce8, p_argcount=1) at modules/gdscript/gdscript.cpp:1191
#26 0x00000000024c2544 in Node::_notification (this=0x5364e90, p_notification=16) at scene/main/node.cpp:63
#27 0x0000000001243e0c in Node::_notificationv (this=0x5364e90, p_notification=16, p_reversed=false) at ./scene/main/node.h:46
#28 0x000000000124440f in CanvasItem::_notificationv (this=0x5364e90, p_notification=16, p_reversed=false) at ./scene/2d/canvas_item.h:166
#29 0x00000000028dd1db in Node2D::_notificationv (this=0x5364e90, p_notification=16, p_reversed=false) at ./scene/2d/node_2d.h:38
#30 0x00000000028ef2c5 in CollisionObject2D::_notificationv (this=0x5364e90, p_notification=16, p_reversed=false) at ./scene/2d/collision_object_2d.h:39
#31 0x00000000029c0db5 in PhysicsBody2D::_notificationv (this=0x5364e90, p_notification=16, p_reversed=false) at scene/2d/physics_body_2d.h:43
#32 0x00000000029c2545 in KinematicBody2D::_notificationv (this=0x5364e90, p_notification=16, p_reversed=false) at scene/2d/physics_body_2d.h:290
#33 0x000000000317e33a in Object::notification (this=0x5364e90, p_notification=16, p_reversed=false) at core/object.cpp:952
#34 0x00000000024f3900 in SceneTree::_notify_group_pause (this=0x593aba0, p_group=..., p_notification=16) at scene/main/scene_tree.cpp:969
#35 0x00000000024f11ee in SceneTree::iteration (this=0x593aba0, p_time=0.0166666675) at scene/main/scene_tree.cpp:474
#36 0x00000000011f8a77 in Main::iteration () at main/main.cpp:1861
#37 0x00000000011ccfef in OS_X11::run (this=0x7fffffffd2d0) at platform/x11/os_x11.cpp:3006
#38 0x00000000011beadd in main (argc=1, argv=0x7fffffffda58) at platform/x11/godot_x11.cpp:55
For the reference, the discussion about GLES2 and crashes on beta 8 and not on beta 7 is completely unrelated to this issue.
From what I could test, the crash in OP is reproducible all the way down to 3.1 alpha 1. Might affect 3.0 too, though the attached project is not usable on that version.
Problem here is that you are trying to test the type of an invalid instance (it was already freed). There's two possible solutions to this:
(1) Break on the editor when this happens, crash on a release build. This is the more accurate but it won't avoid all crashes.
(2) Warn on debug, ignore on release (just make the is return false). This is more lenient and avoid potential crashes, at the cost of validating the instance every time you use is.
I prefer (1) since it's more correct and allows you to catch it on debug. You shouldn't really be using freed instances anyway.
Most helpful comment
Problem here is that you are trying to test the type of an invalid instance (it was already freed). There's two possible solutions to this:
(1) Break on the editor when this happens, crash on a release build. This is the more accurate but it won't avoid all crashes.
(2) Warn on debug, ignore on release (just make the
isreturn false). This is more lenient and avoid potential crashes, at the cost of validating the instance every time you useis.I prefer (1) since it's more correct and allows you to catch it on debug. You shouldn't really be using freed instances anyway.