godotengine / godot

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

Crash upon opening a script. #43108

Closed archerallstars closed 4 years ago

archerallstars commented 4 years ago

Godot version:

Godot v3.2.4-beta1

OS/device including version:

Issue description:

I opened my project. And when I tried to open the script, Godot crashed. This is not happening in Godot v3.2.3-stable when opening the same project and the same script.

The errors regarding possible cyclic resource inclusion show in the logging window seem to be unrelated as they are showing in both versions.

I uploaded my screen recording of the issue here.

Steps to reproduce:

  1. Open the project.
  2. Open the script.

Minimal reproduction project:

Boss Runner.zip

akien-mga commented 4 years ago

I got a crash too the first time I opened the project:

ERROR: set_path: Another resource is loaded from path 'res://scripts/Player.vs::674' (possible cyclic resource inclusion).
   At: core/resource.cpp:82.
ERROR: set_path: Another resource is loaded from path 'res://scripts/Player.vs' (possible cyclic resource inclusion).
   At: core/resource.cpp:82.
ERROR: get_m: FATAL: Index p_index = 0 is out of bounds (size() = 2).
   At: ./core/cowdata.h:145.
WARNING: _notification: InterpolatedCamera has been deprecated and will be removed in Godot 4.0.
   At: scene/3d/interpolated_camera.cpp:40.
handle_crash: Program crashed with signal 4
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib64/libc.so.6(+0x3a4e0) [0x7f1e7c7714e0] (??:0)
[2] CowData<VMap<Object::Signal::Target, Object::Signal::Slot>::Pair>::get_m(int) (/home/akien/Projects/godot/godot-3.2/./core/cowdata.h:145 (discriminator 7))
[3] VMap<Object::Signal::Target, Object::Signal::Slot>::operator[](Object::Signal::Target const&) (/home/akien/Projects/godot/godot-3.2/./core/vmap.h:202)
[4] Object::connect(StringName const&, Object*, StringName const&, Vector<Variant> const&, unsigned int) (/home/akien/Projects/godot/godot-3.2/core/object.cpp:1534)
[5] VisualScript::add_node(StringName const&, int, Ref<VisualScriptNode> const&, Vector2 const&) (/home/akien/Projects/godot/godot-3.2/modules/visual_script/visual_script.cpp:341 (discriminator 9))
[6] VisualScript::_set_data(Dictionary const&) (/home/akien/Projects/godot/godot-3.2/modules/visual_script/visual_script.cpp:1187 (discriminator 12))
[7] MethodBind1<Dictionary const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/akien/Projects/godot/godot-3.2/./core/method_bind.gen.inc:775 (discriminator 12))
[8] ClassDB::set_property(Object*, StringName const&, Variant const&, bool*) (/home/akien/Projects/godot/godot-3.2/core/class_db.cpp:1038)
[9] Object::set(StringName const&, Variant const&, bool*) (/home/akien/Projects/godot/godot-3.2/core/object.cpp:423)
[10] ResourceInteractiveLoaderBinary::poll() (/home/akien/Projects/godot/godot-3.2/core/io/resource_format_binary.cpp:745)
[11] ResourceFormatLoader::load(String const&, String const&, Error*) (/home/akien/Projects/godot/godot-3.2/core/io/resource_loader.cpp:197)
[12] ResourceLoader::_load(String const&, String const&, String const&, bool, Error*) (/home/akien/Projects/godot/godot-3.2/core/io/resource_loader.cpp:270 (discriminator 6))
[13] ResourceLoader::load(String const&, String const&, bool, Error*) (/home/akien/Projects/godot/godot-3.2/core/io/resource_loader.cpp:404)
[14] EditorResourcePreviewGenerator::generate_from_path(String const&, Vector2 const&) const (/home/akien/Projects/godot/godot-3.2/editor/editor_resource_preview.cpp:66)
[15] EditorResourcePreview::_generate_preview(Ref<ImageTexture>&, Ref<ImageTexture>&, EditorResourcePreview::QueueItem const&, String const&) (/home/akien/Projects/godot/godot-3.2/editor/editor_resource_preview.cpp:167 (discriminator 3))
[16] EditorResourcePreview::_thread() (/home/akien/Projects/godot/godot-3.2/editor/editor_resource_preview.cpp:271)
[17] EditorResourcePreview::_thread_func(void*) (/home/akien/Projects/godot/godot-3.2/editor/editor_resource_preview.cpp:108)
[18] ThreadPosix::thread_callback(void*) (/home/akien/Projects/godot/godot-3.2/drivers/unix/thread_posix.cpp:76)
[19] /lib64/libpthread.so.0(+0x8df0) [0x7f1e7cc2bdf0] (??:0)
[20] /lib64/libc.so.6(clone+0x3f) [0x7f1e7c82d22f] (??:0)
-- END OF BACKTRACE --
Aborted (core dumped)

Then on subsequent attempts at opening it there was no crash (but indeed loads of errors about cyclic references and connection to nonexistent signals in GraphNode.

archerallstars commented 4 years ago

I got a crash too the first time I opened the project:

ERROR: set_path: Another resource is loaded from path 'res://scripts/Player.vs::674' (possible cyclic resource inclusion).
   At: core/resource.cpp:82.
ERROR: set_path: Another resource is loaded from path 'res://scripts/Player.vs' (possible cyclic resource inclusion).
   At: core/resource.cpp:82.
ERROR: get_m: FATAL: Index p_index = 0 is out of bounds (size() = 2).
   At: ./core/cowdata.h:145.
WARNING: _notification: InterpolatedCamera has been deprecated and will be removed in Godot 4.0.
   At: scene/3d/interpolated_camera.cpp:40.
handle_crash: Program crashed with signal 4
Dumping the backtrace. Please include this when reporting the bug on https://github.com/godotengine/godot/issues
[1] /lib64/libc.so.6(+0x3a4e0) [0x7f1e7c7714e0] (??:0)
[2] CowData<VMap<Object::Signal::Target, Object::Signal::Slot>::Pair>::get_m(int) (/home/akien/Projects/godot/godot-3.2/./core/cowdata.h:145 (discriminator 7))
[3] VMap<Object::Signal::Target, Object::Signal::Slot>::operator[](Object::Signal::Target const&) (/home/akien/Projects/godot/godot-3.2/./core/vmap.h:202)
[4] Object::connect(StringName const&, Object*, StringName const&, Vector<Variant> const&, unsigned int) (/home/akien/Projects/godot/godot-3.2/core/object.cpp:1534)
[5] VisualScript::add_node(StringName const&, int, Ref<VisualScriptNode> const&, Vector2 const&) (/home/akien/Projects/godot/godot-3.2/modules/visual_script/visual_script.cpp:341 (discriminator 9))
[6] VisualScript::_set_data(Dictionary const&) (/home/akien/Projects/godot/godot-3.2/modules/visual_script/visual_script.cpp:1187 (discriminator 12))
[7] MethodBind1<Dictionary const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/akien/Projects/godot/godot-3.2/./core/method_bind.gen.inc:775 (discriminator 12))
[8] ClassDB::set_property(Object*, StringName const&, Variant const&, bool*) (/home/akien/Projects/godot/godot-3.2/core/class_db.cpp:1038)
[9] Object::set(StringName const&, Variant const&, bool*) (/home/akien/Projects/godot/godot-3.2/core/object.cpp:423)
[10] ResourceInteractiveLoaderBinary::poll() (/home/akien/Projects/godot/godot-3.2/core/io/resource_format_binary.cpp:745)
[11] ResourceFormatLoader::load(String const&, String const&, Error*) (/home/akien/Projects/godot/godot-3.2/core/io/resource_loader.cpp:197)
[12] ResourceLoader::_load(String const&, String const&, String const&, bool, Error*) (/home/akien/Projects/godot/godot-3.2/core/io/resource_loader.cpp:270 (discriminator 6))
[13] ResourceLoader::load(String const&, String const&, bool, Error*) (/home/akien/Projects/godot/godot-3.2/core/io/resource_loader.cpp:404)
[14] EditorResourcePreviewGenerator::generate_from_path(String const&, Vector2 const&) const (/home/akien/Projects/godot/godot-3.2/editor/editor_resource_preview.cpp:66)
[15] EditorResourcePreview::_generate_preview(Ref<ImageTexture>&, Ref<ImageTexture>&, EditorResourcePreview::QueueItem const&, String const&) (/home/akien/Projects/godot/godot-3.2/editor/editor_resource_preview.cpp:167 (discriminator 3))
[16] EditorResourcePreview::_thread() (/home/akien/Projects/godot/godot-3.2/editor/editor_resource_preview.cpp:271)
[17] EditorResourcePreview::_thread_func(void*) (/home/akien/Projects/godot/godot-3.2/editor/editor_resource_preview.cpp:108)
[18] ThreadPosix::thread_callback(void*) (/home/akien/Projects/godot/godot-3.2/drivers/unix/thread_posix.cpp:76)
[19] /lib64/libpthread.so.0(+0x8df0) [0x7f1e7cc2bdf0] (??:0)
[20] /lib64/libc.so.6(clone+0x3f) [0x7f1e7c82d22f] (??:0)
-- END OF BACKTRACE --
Aborted (core dumped)

Then on subsequent attempts at opening it there was no crash (but indeed loads of errors about cyclic references and connection to nonexistent signals in GraphNode.

I want to add more info that on my side it crashes on me every time I tried to open the script.

archerallstars commented 4 years ago

I want to inform that this is fixed in Godot v3.2.4-beta2. I can open the script without crashing anymore. 👍