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

[Regression] Null pointer dereference or Double free or corruption when reimporting Texture shown in Inspector #26749

Closed
akien-mga opened this issue Mar 7, 2019 · 5 comments

Comments

@akien-mga
Copy link
Member

Godot version:
6976181

OS/device including version:
Linux x86_64

Issue description:
When changing the import flags and/or reimporting a Texture in the Import dock, while it is visible in the Inspector dock (e.g. corresponding Sprite selected in Scene Tree dock), it can crash with different outcomes: null-pointer dereference, or double free or corruption.

Thread 1 "godot-git" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()

(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00000000012617ad in Object::_change_notify (this=0x88357b0, p_property=0x4099927 "") at ./core/object.h:567
#2  0x0000000002cd085b in StreamTexture::load (this=0x88357b0, p_path=...) at scene/resources/texture.cpp:737
#3  0x0000000002cd1026 in StreamTexture::reload_from_file (this=0x88357b0) at scene/resources/texture.cpp:842
#4  0x0000000001c79452 in EditorNode::_resources_reimported (this=0x6ea6090, p_resources=...) at editor/editor_node.cpp:521
#5  0x0000000001cd209b in MethodBind1<Vector<String> const&>::call (this=0xb7eaf70, p_object=0x6ea6090, p_args=0x7fffffffa550, p_arg_count=1, r_error=...) at ./core/method_bind.gen.inc:729
#6  0x000000000317dbe3 in Object::call (this=0x6ea6090, p_method=..., p_args=0x7fffffffa550, p_argcount=1, r_error=...) at core/object.cpp:942
#7  0x000000000317f464 in Object::emit_signal (this=0x60e1160, p_name=..., p_args=0x7fffffffa550, p_argcount=1) at core/object.cpp:1228
#8  0x000000000317fad3 in Object::emit_signal (this=0x60e1160, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:1284
#9  0x0000000001c265c5 in EditorFileSystem::reimport_files (this=0x60e1160, p_files=...) at editor/editor_file_system.cpp:1782
#10 0x0000000001dbf6ac in ImportDock::_reimport (this=0x935dd80) at editor/import_dock.cpp:461
#11 0x0000000001dbefe4 in ImportDock::_reimport_attempt (this=0x935dd80) at editor/import_dock.cpp:421
#12 0x000000000125a71d in MethodBind0::call (this=0x93775f0, p_object=0x935dd80, p_args=0x7fffffffad10, p_arg_count=0, r_error=...) at ./core/method_bind.gen.inc:54
#13 0x000000000317dbe3 in Object::call (this=0x935dd80, p_method=..., p_args=0x7fffffffad10, p_argcount=0, r_error=...) at core/object.cpp:942
#14 0x000000000317f464 in Object::emit_signal (this=0x936ae40, p_name=..., p_args=0x7fffffffad10, p_argcount=0) at core/object.cpp:1228
#15 0x000000000317fad3 in Object::emit_signal (this=0x936ae40, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:1284
#16 0x00000000025435f5 in BaseButton::_gui_input (this=0x936ae40, p_event=...) at scene/gui/base_button.cpp:139
#17 0x0000000001dbb413 in MethodBind1<Ref<InputEvent> >::call (this=0x6230f90, p_object=0x936ae40, p_args=0x7fffffffbb70, p_arg_count=1, r_error=...) at ./core/method_bind.gen.inc:729
#18 0x000000000317d046 in Object::call_multilevel (this=0x936ae40, p_method=..., p_args=0x7fffffffbb70, p_argcount=1) at core/object.cpp:777
#19 0x000000000317d7bb in Object::call_multilevel (this=0x936ae40, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:882
#20 0x000000000251b1bf in Viewport::_gui_call_input (this=0x6886280, p_control=0x936ae40, p_input=...) at scene/main/viewport.cpp:1527
#21 0x000000000251c92c in Viewport::_gui_input_event (this=0x6886280, p_event=...) at scene/main/viewport.cpp:1899
#22 0x0000000002520a9c in Viewport::input (this=0x6886280, p_event=...) at scene/main/viewport.cpp:2653
#23 0x000000000251a0c6 in Viewport::_vp_input (this=0x6886280, p_ev=...) at scene/main/viewport.cpp:1305
#24 0x0000000001420111 in MethodBind1<Ref<InputEvent> const&>::call (this=0x61e8a20, p_object=0x6886280, p_args=0x7fffffffc820, p_arg_count=1, r_error=...)
    at ./core/method_bind.gen.inc:729
#25 0x000000000317dbe3 in Object::call (this=0x6886280, p_method=..., p_args=0x7fffffffc820, p_argcount=1, r_error=...) at core/object.cpp:942
#26 0x000000000317d712 in Object::call (this=0x6886280, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:866
--Type <RET> for more, q to quit, c to continue without paging--c
#27 0x00000000024ef937 in SceneTree::call_group_flags (this=0x6692df0, p_call_flags=2, p_group=..., p_function=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at scene/main/scene_tree.cpp:262
#28 0x00000000024f061f in SceneTree::input_event (this=0x6692df0, p_event=...) at scene/main/scene_tree.cpp:418
#29 0x00000000011db3ec in InputDefault::_parse_input_event_impl (this=0x4c10840, p_event=..., p_is_emulated=false) at main/input_default.cpp:442
#30 0x00000000011da2b0 in InputDefault::parse_input_event (this=0x4c10840, p_event=...) at main/input_default.cpp:259
#31 0x00000000011dc512 in InputDefault::flush_accumulated_events (this=0x4c10840) at main/input_default.cpp:679
#32 0x00000000011c9dc1 in OS_X11::process_xevents (this=0x7fffffffd260) at platform/x11/os_x11.cpp:2461
#33 0x00000000011cce27 in OS_X11::run (this=0x7fffffffd260) at platform/x11/os_x11.cpp:3002
#34 0x00000000011be92d in main (argc=2, argv=0x7fffffffd9e8) at platform/x11/godot_x11.cpp:55

or

double free or corruption (out)

Thread 1 "godot-git" received signal SIGABRT, Aborted.
0x000000388d43cb8a in raise () from /lib64/libc.so.6

(gdb) bt
#0  0x000000388d43cb8a in raise () from /lib64/libc.so.6
#1  0x000000388d425524 in abort () from /lib64/libc.so.6
#2  0x000000388d47f628 in __libc_message () from /lib64/libc.so.6
#3  0x000000388d485e8a in malloc_printerr () from /lib64/libc.so.6
#4  0x000000388d487960 in _int_free () from /lib64/libc.so.6
#5  0x0000000003057ac9 in RasterizerCanvas::Item::Command::~Command (this=0x15699ab0, __in_chrg=<optimized out>) at servers/visual/rasterizer.h:694
#6  0x00000000012617ad in Object::_change_notify (this=0x6b50f40, p_property=0x4099927 "") at ./core/object.h:567
#7  0x0000000002cd085b in StreamTexture::load (this=0x6b50f40, p_path=...) at scene/resources/texture.cpp:737
#8  0x0000000002cd1026 in StreamTexture::reload_from_file (this=0x6b50f40) at scene/resources/texture.cpp:842
#9  0x0000000001c79452 in EditorNode::_resources_reimported (this=0x6ea4570, p_resources=...) at editor/editor_node.cpp:521
#10 0x0000000001cd209b in MethodBind1<Vector<String> const&>::call (this=0xb7e9470, p_object=0x6ea4570, p_args=0x7fffffffa530, p_arg_count=1, r_error=...) at ./core/method_bind.gen.inc:729
#11 0x000000000317dbe3 in Object::call (this=0x6ea4570, p_method=..., p_args=0x7fffffffa530, p_argcount=1, r_error=...) at core/object.cpp:942
#12 0x000000000317f464 in Object::emit_signal (this=0x60dfb40, p_name=..., p_args=0x7fffffffa530, p_argcount=1) at core/object.cpp:1228
#13 0x000000000317fad3 in Object::emit_signal (this=0x60dfb40, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:1284
#14 0x0000000001c265c5 in EditorFileSystem::reimport_files (this=0x60dfb40, p_files=...) at editor/editor_file_system.cpp:1782
#15 0x0000000001dbf6ac in ImportDock::_reimport (this=0x935b3d0) at editor/import_dock.cpp:461
#16 0x0000000001dbefe4 in ImportDock::_reimport_attempt (this=0x935b3d0) at editor/import_dock.cpp:421
#17 0x000000000125a71d in MethodBind0::call (this=0x9374c40, p_object=0x935b3d0, p_args=0x7fffffffacf0, p_arg_count=0, r_error=...) at ./core/method_bind.gen.inc:54
#18 0x000000000317dbe3 in Object::call (this=0x935b3d0, p_method=..., p_args=0x7fffffffacf0, p_argcount=0, r_error=...) at core/object.cpp:942
#19 0x000000000317f464 in Object::emit_signal (this=0x9368490, p_name=..., p_args=0x7fffffffacf0, p_argcount=0) at core/object.cpp:1228
#20 0x000000000317fad3 in Object::emit_signal (this=0x9368490, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:1284
#21 0x00000000025435f5 in BaseButton::_gui_input (this=0x9368490, p_event=...) at scene/gui/base_button.cpp:139
#22 0x0000000001dbb413 in MethodBind1<Ref<InputEvent> >::call (this=0x622f420, p_object=0x9368490, p_args=0x7fffffffbb50, p_arg_count=1, r_error=...) at ./core/method_bind.gen.inc:729
#23 0x000000000317d046 in Object::call_multilevel (this=0x9368490, p_method=..., p_args=0x7fffffffbb50, p_argcount=1) at core/object.cpp:777
#24 0x000000000317d7bb in Object::call_multilevel (this=0x9368490, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:882
#25 0x000000000251b1bf in Viewport::_gui_call_input (this=0x6884a60, p_control=0x9368490, p_input=...) at scene/main/viewport.cpp:1527
#26 0x000000000251c92c in Viewport::_gui_input_event (this=0x6884a60, p_event=...) at scene/main/viewport.cpp:1899
#27 0x0000000002520a9c in Viewport::input (this=0x6884a60, p_event=...) at scene/main/viewport.cpp:2653
--Type <RET> for more, q to quit, c to continue without paging--
#28 0x000000000251a0c6 in Viewport::_vp_input (this=0x6884a60, p_ev=...) at scene/main/viewport.cpp:1305
#29 0x0000000001420111 in MethodBind1<Ref<InputEvent> const&>::call (this=0x61e7510, p_object=0x6884a60, p_args=0x7fffffffc800, p_arg_count=1, r_error=...)
    at ./core/method_bind.gen.inc:729
#30 0x000000000317dbe3 in Object::call (this=0x6884a60, p_method=..., p_args=0x7fffffffc800, p_argcount=1, r_error=...) at core/object.cpp:942
#31 0x000000000317d712 in Object::call (this=0x6884a60, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:866
#32 0x00000000024ef937 in SceneTree::call_group_flags (this=0x6691320, p_call_flags=2, p_group=..., p_function=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...)
    at scene/main/scene_tree.cpp:262
#33 0x00000000024f061f in SceneTree::input_event (this=0x6691320, p_event=...) at scene/main/scene_tree.cpp:418
#34 0x00000000011db3ec in InputDefault::_parse_input_event_impl (this=0x4c0e880, p_event=..., p_is_emulated=false) at main/input_default.cpp:442
#35 0x00000000011da2b0 in InputDefault::parse_input_event (this=0x4c0e880, p_event=...) at main/input_default.cpp:259
#36 0x00000000011dc512 in InputDefault::flush_accumulated_events (this=0x4c0e880) at main/input_default.cpp:679
#37 0x00000000011c9dc1 in OS_X11::process_xevents (this=0x7fffffffd240) at platform/x11/os_x11.cpp:2461
#38 0x00000000011cce27 in OS_X11::run (this=0x7fffffffd240) at platform/x11/os_x11.cpp:3002
#39 0x00000000011be92d in main (argc=2, argv=0x7fffffffd9c8) at platform/x11/godot_x11.cpp:55

Steps to reproduce:

  • Open attached project
  • Select Sprite in Scene Tree dock
  • Select icon.png in FileSystem dock
  • Hit reimport in Import dock, or try to change some flags. It may crash (not 100% of the time, but it's quite easy to trigger; if need be also toggle the subinspector for the StreamTexture in the Inspector).

Minimal reproduction project:
MRP_crash_reimport.zip

@akien-mga
Copy link
Member Author

Similar to #26640 and #26721, but those were only hidden by removing flags from the subinspector. The root cause was not fixed, and it's triggered by StreamTexture::load too.

@reduz
Copy link
Member

reduz commented Mar 7, 2019

fixed by b376273 . It may fix others.

@akien-mga
Copy link
Member Author

Took me a few attempts, but it's still crashing b376273:

[1] /lib64/libc.so.6() [0x388d43cc00] (??:0)
[2] Object::_change_notify(char const*) (/home/akien/Projects/godot/godot.git/./core/object.h:567 (discriminator 2))
[3] StreamTexture::load(String const&) (/home/akien/Projects/godot/godot.git/scene/resources/texture.cpp:738)
[4] StreamTexture::reload_from_file() (/home/akien/Projects/godot/godot.git/scene/resources/texture.cpp:842)
[5] EditorNode::_resources_reimported(Vector<String> const&) (/home/akien/Projects/godot/godot.git/editor/editor_node.cpp:521)
[6] MethodBind1<Vector<String> const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/akien/Projects/godot/godot.git/./core/method_bind.gen.inc:729 (discriminator 12))
[7] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/akien/Projects/godot/godot.git/core/object.cpp:942 (discriminator 1))
[8] Object::emit_signal(StringName const&, Variant const**, int) (/home/akien/Projects/godot/godot.git/core/object.cpp:1228 (discriminator 1))
[9] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/akien/Projects/godot/godot.git/core/object.cpp:1284)
[10] EditorFileSystem::reimport_files(Vector<String> const&) (/home/akien/Projects/godot/godot.git/editor/editor_file_system.cpp:1782 (discriminator 4))
[11] ImportDock::_reimport() (/home/akien/Projects/godot/godot.git/editor/import_dock.cpp:462)
[12] ImportDock::_reimport_attempt() (/home/akien/Projects/godot/godot.git/editor/import_dock.cpp:421)
[13] MethodBind0::call(Object*, Variant const**, int, Variant::CallError&) (/home/akien/Projects/godot/godot.git/./core/method_bind.gen.inc:56 (discriminator 4))
[14] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/akien/Projects/godot/godot.git/core/object.cpp:942 (discriminator 1))
[15] Object::emit_signal(StringName const&, Variant const**, int) (/home/akien/Projects/godot/godot.git/core/object.cpp:1228 (discriminator 1))
[16] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/akien/Projects/godot/godot.git/core/object.cpp:1284)
[17] BaseButton::_gui_input(Ref<InputEvent>) (/home/akien/Projects/godot/godot.git/scene/gui/base_button.cpp:139 (discriminator 2))
[18] MethodBind1<Ref<InputEvent> >::call(Object*, Variant const**, int, Variant::CallError&) (/home/akien/Projects/godot/godot.git/./core/method_bind.gen.inc:729 (discriminator 12))
[19] Object::call_multilevel(StringName const&, Variant const**, int) (/home/akien/Projects/godot/godot.git/core/object.cpp:777 (discriminator 1))
[20] Object::call_multilevel(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/akien/Projects/godot/godot.git/core/object.cpp:883)
[21] Viewport::_gui_call_input(Control*, Ref<InputEvent> const&) (/home/akien/Projects/godot/godot.git/scene/main/viewport.cpp:1527 (discriminator 2))
[22] Viewport::_gui_input_event(Ref<InputEvent>) (/home/akien/Projects/godot/godot.git/scene/main/viewport.cpp:1899 (discriminator 3))
[23] Viewport::input(Ref<InputEvent> const&) (/home/akien/Projects/godot/godot.git/scene/main/viewport.cpp:2653 (discriminator 2))
[24] Viewport::_vp_input(Ref<InputEvent> const&) (/home/akien/Projects/godot/godot.git/scene/main/viewport.cpp:1304)
[25] MethodBind1<Ref<InputEvent> const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/akien/Projects/godot/godot.git/./core/method_bind.gen.inc:729 (discriminator 12))
[26] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/akien/Projects/godot/godot.git/core/object.cpp:942 (discriminator 1))
[27] Object::call(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/akien/Projects/godot/godot.git/core/object.cpp:867)
[28] SceneTree::call_group_flags(unsigned int, StringName const&, StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/akien/Projects/godot/godot.git/scene/main/scene_tree.cpp:262)
[29] SceneTree::input_event(Ref<InputEvent> const&) (/home/akien/Projects/godot/godot.git/scene/main/scene_tree.cpp:418 (discriminator 6))
[30] InputDefault::_parse_input_event_impl(Ref<InputEvent> const&, bool) (/home/akien/Projects/godot/godot.git/main/input_default.cpp:416)
[31] InputDefault::parse_input_event(Ref<InputEvent> const&) (/home/akien/Projects/godot/godot.git/main/input_default.cpp:260)
[32] InputDefault::flush_accumulated_events() (/home/akien/Projects/godot/godot.git/main/input_default.cpp:680)
[33] OS_X11::process_xevents() (/home/akien/Projects/godot/godot.git/platform/x11/os_x11.cpp:2462)
[34] OS_X11::run() (/home/akien/Projects/godot/godot.git/platform/x11/os_x11.cpp:3004)
[35] godot-git(main+0xbb) [0x11be96d] (/home/akien/Projects/godot/godot.git/platform/x11/godot_x11.cpp:56)
[36] /lib64/libc.so.6(__libc_start_main+0xeb) [0x388d426b0b] (??:0)
[37] godot-git(_start+0x2a) [0x11be80a] (/home/iurt/rpmbuild/BUILD/glibc-2.29/csu/../sysdeps/x86_64/start.S:122)
-- END OF BACKTRACE --

@akien-mga akien-mga changed the title Null pointer dereference or Double free or corruption when reimporting Texture shown in Inspector [Regression] Null pointer dereference or Double free or corruption when reimporting Texture shown in Inspector Mar 7, 2019
@akien-mga
Copy link
Member Author

Steps to reproduce again:

  • Open MRP
  • Select "icon" in Scene Tree dock
  • Click Texture preview in Inspector to expand subinspector
  • Select "icon.png" in FS dock
  • In Import dock, hit "Reimport" a few times, it should crash eventually

This time I got this backtrace:

Thread 1 "godot-git" received signal SIGSEGV, Segmentation fault.
0x00000000015bd43a in atomic_decrement<unsigned int> (pw=0x4100000040fffff8) at ./core/safe_refcount.h:118
118             return __sync_sub_and_fetch(pw, 1);

(gdb) bt
#0  0x00000000015bd43a in atomic_decrement<unsigned int> (pw=0x4100000040fffff8) at ./core/safe_refcount.h:118
#1  CowData<Color>::_unref (this=0x164f0a68, p_data=0x4100000041000000) at ./core/cowdata.h:197
#2  0x00000000015bc59e in CowData<Color>::~CowData (this=0x164f0a68, __in_chrg=<optimized out>) at ./core/cowdata.h:369
#3  0x00000000015bb5e0 in Vector<Color>::~Vector (this=0x164f0a60, __in_chrg=<optimized out>) at ./core/vector.h:126
#4  0x000000000306111a in RasterizerCanvas::Item::CommandPolyLine::~CommandPolyLine (this=0x164f0a20, __in_chrg=<optimized out>) at servers/visual/rasterizer.h:705
#5  0x0000000003061172 in RasterizerCanvas::Item::CommandPolyLine::~CommandPolyLine (this=0x164f0a20, __in_chrg=<optimized out>) at servers/visual/rasterizer.h:705
#6  0x000000000126182d in Object::_change_notify (this=0x6bac240, p_property=0x4099ca7 "") at ./core/object.h:567
#7  0x0000000002cd0a41 in StreamTexture::load (this=0x6bac240, p_path=...) at scene/resources/texture.cpp:737
#8  0x0000000002cd120c in StreamTexture::reload_from_file (this=0x6bac240) at scene/resources/texture.cpp:842
#9  0x0000000001c794ee in EditorNode::_resources_reimported (this=0x6ea4f50, p_resources=...) at editor/editor_node.cpp:521
#10 0x0000000001cd2137 in MethodBind1<Vector<String> const&>::call (this=0xb7e43a0, p_object=0x6ea4f50, p_args=0x7fffffffa530, p_arg_count=1, r_error=...) at ./core/method_bind.gen.inc:729
#11 0x000000000317de2b in Object::call (this=0x6ea4f50, p_method=..., p_args=0x7fffffffa530, p_argcount=1, r_error=...) at core/object.cpp:942
#12 0x000000000317f6ac in Object::emit_signal (this=0x60e0a30, p_name=..., p_args=0x7fffffffa530, p_argcount=1) at core/object.cpp:1228
#13 0x000000000317fd1b in Object::emit_signal (this=0x60e0a30, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:1284
#14 0x0000000001c26645 in EditorFileSystem::reimport_files (this=0x60e0a30, p_files=...) at editor/editor_file_system.cpp:1782
#15 0x0000000001dbf748 in ImportDock::_reimport (this=0x9357820) at editor/import_dock.cpp:461
#16 0x0000000001dbf080 in ImportDock::_reimport_attempt (this=0x9357820) at editor/import_dock.cpp:421
#17 0x000000000125a79d in MethodBind0::call (this=0x9371090, p_object=0x9357820, p_args=0x7fffffffacf0, p_arg_count=0, r_error=...) at ./core/method_bind.gen.inc:54
#18 0x000000000317de2b in Object::call (this=0x9357820, p_method=..., p_args=0x7fffffffacf0, p_argcount=0, r_error=...) at core/object.cpp:942
#19 0x000000000317f6ac in Object::emit_signal (this=0x93648e0, p_name=..., p_args=0x7fffffffacf0, p_argcount=0) at core/object.cpp:1228
#20 0x000000000317fd1b in Object::emit_signal (this=0x93648e0, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:1284
#21 0x000000000254374f in BaseButton::_gui_input (this=0x93648e0, p_event=...) at scene/gui/base_button.cpp:139
#22 0x0000000001dbb4af in MethodBind1<Ref<InputEvent> >::call (this=0x6230310, p_object=0x93648e0, p_args=0x7fffffffbb50, p_arg_count=1, r_error=...) at ./core/method_bind.gen.inc:729
#23 0x000000000317d28e in Object::call_multilevel (this=0x93648e0, p_method=..., p_args=0x7fffffffbb50, p_argcount=1) at core/object.cpp:777
#24 0x000000000317da03 in Object::call_multilevel (this=0x93648e0, p_name=..., p_arg1=..., p_arg2=..., p_arg3=..., p_arg4=..., p_arg5=...) at core/object.cpp:882
#25 0x000000000251b319 in Viewport::_gui_call_input (this=0x6883fb0, p_control=0x93648e0, p_input=...) at scene/main/viewport.cpp:1527
#26 0x000000000251ca86 in Viewport::_gui_input_event (this=0x6883fb0, p_event=...) at scene/main/viewport.cpp:1899
#27 0x0000000002520bf6 in Viewport::input (this=0x6883fb0, p_event=...) at scene/main/viewport.cpp:2653

@akien-mga
Copy link
Member Author

As advised by @reduz, I ran it through valgrind (valgrind godot -e), here's the output when reproducing the crash:

==29923== Invalid read of size 8
==29923==    at 0x126190A: Object::_change_notify(char const*) (object.h:567)
==29923==    by 0x2CD0D08: StreamTexture::load(String const&) (texture.cpp:737)
==29923==    by 0x2CD14D3: StreamTexture::reload_from_file() (texture.cpp:842)
==29923==    by 0x1C797C7: EditorNode::_resources_reimported(Vector<String> const&) (editor_node.cpp:521)
==29923==    by 0x1CD2410: MethodBind1<Vector<String> const&>::call(Object*, Variant const**, int, Variant::CallError&) (method_bind.gen.inc:729)
==29923==    by 0x317E0F2: Object::call(StringName const&, Variant const**, int, Variant::CallError&) (object.cpp:942)
==29923==    by 0x317F973: Object::emit_signal(StringName const&, Variant const**, int) (object.cpp:1228)
==29923==    by 0x317FFE2: Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (object.cpp:1284)
==29923==    by 0x1C2691E: EditorFileSystem::reimport_files(Vector<String> const&) (editor_file_system.cpp:1782)
==29923==    by 0x1DBFA0F: ImportDock::_reimport() (import_dock.cpp:461)
==29923==    by 0x1DBF347: ImportDock::_reimport_attempt() (import_dock.cpp:421)
==29923==    by 0x125A890: MethodBind0::call(Object*, Variant const**, int, Variant::CallError&) (method_bind.gen.inc:54)
==29923==  Address 0x27fe2b10 is 16 bytes inside a block of size 1,120 free'd
==29923==    at 0x51A8900: free (vg_replace_malloc.c:540)
==29923==    by 0x32AADFE: Memory::free_static(void*, bool) (memory.cpp:181)
==29923==    by 0x140F336: void memdelete<Node>(Node*) (memory.h:122)
==29923==    by 0x1C5B6C0: EditorInspector::_clear() (editor_inspector.cpp:1774)
==29923==    by 0x1C57FDF: EditorInspector::update_tree() (editor_inspector.cpp:1400)
==29923==    by 0x1C5F92D: EditorInspector::_notification(int) (editor_inspector.cpp:2177)
==29923==    by 0x1C64775: EditorInspector::_notificationv(int, bool) (editor_inspector.h:251)
==29923==    by 0x317E26F: Object::notification(int, bool) (object.cpp:952)
==29923==    by 0x24F3835: SceneTree::_notify_group_pause(StringName const&, int) (scene_tree.cpp:969)
==29923==    by 0x24F1637: SceneTree::idle(float) (scene_tree.cpp:518)
==29923==    by 0x11F8BB7: Main::iteration() (main.cpp:1883)
==29923==    by 0x11CCF9E: OS_X11::run() (os_x11.cpp:3006)
==29923==  Block was alloc'd at
==29923==    at 0x51A7753: malloc (vg_replace_malloc.c:309)
==29923==    by 0x32AAA15: Memory::alloc_static(unsigned long, bool) (memory.cpp:85)
==29923==    by 0x32AA9BE: operator new(unsigned long, char const*) (memory.cpp:42)
==29923==    by 0x21C0D41: EditorInspectorPluginTexture::parse_begin(Object*) (texture_editor_plugin.cpp:155)
==29923==    by 0x1C5831E: EditorInspector::update_tree() (editor_inspector.cpp:1443)
==29923==    by 0x1C5B97A: EditorInspector::edit(Object*) (editor_inspector.cpp:1812)
==29923==    by 0x1D06F84: EditorPropertyResource::update_property() (editor_properties.cpp:2540)
==29923==    by 0x1D07A35: EditorPropertyResource::_resource_selected() (editor_properties.cpp:2596)
==29923==    by 0x125A890: MethodBind0::call(Object*, Variant const**, int, Variant::CallError&) (method_bind.gen.inc:54)
==29923==    by 0x317E0F2: Object::call(StringName const&, Variant const**, int, Variant::CallError&) (object.cpp:942)
==29923==    by 0x317F973: Object::emit_signal(StringName const&, Variant const**, int) (object.cpp:1228)
==29923==    by 0x317FFE2: Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (object.cpp:1284)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants