GodotExplorer / spine

Spine module for godot game engine
Other
132 stars 34 forks source link

Build error with Godot 3.1 #23

Closed bemyak closed 5 years ago

bemyak commented 5 years ago

When compiling from master branch with Godot 3.1 beta 11 I'm getting the error:

modules/spine/spine.cpp:1072:78: error: passing 'const Vector2' as 'this' argument discards qualifiers [-fpermissive]
points[idx] = Vector2(info->vertices[idx * 2], -info->vertices[idx * 2 + 1]);

If I delete all #if (VERSION_MAJOR == 3 && VERSION_MINOR >= 1) conditions and corresponding else branches (leaving only 3.1 lines) the compilations succeeds.
However, in this case I'm getting the following when I try to add resource to Spine node:

[1] /usr/lib/libc.so.6(+0x37e00) [0x7f419a5f5e00] (??:0)
[2] /usr/lib/libc.so.6(+0x15f715) [0x7f419a71d715] (??:0)
[3] /home/bemyak/Downloads/godot-3.1-beta11/bin/godot.x11.tools.64(spSkeletonJson_readSkeletonData+0x19f) [0x161a702] (/home/bemyak/Downloads/godot-3.1-beta11/modules/spine/src/spine/SkeletonJson.c:600)
[4] /home/bemyak/Downloads/godot-3.1-beta11/bin/godot.x11.tools.64(spSkeletonJson_readSkeletonDataFile+0x7d) [0x161a539] (/home/bemyak/Downloads/godot-3.1-beta11/modules/spine/src/spine/SkeletonJson.c:573)
[5] ResourceFormatLoaderSpine::load(String const&, String const&, Error*) (/home/bemyak/Downloads/godot-3.1-beta11/modules/spine/register_types.cpp:190 (discriminator 3))
[6] ResourceLoader::_load(String const&, String const&, String const&, bool, Error*) (/home/bemyak/Downloads/godot-3.1-beta11/core/io/resource_loader.cpp:272 (discriminator 6))
[7] ResourceLoader::load(String const&, String const&, bool, Error*) (/home/bemyak/Downloads/godot-3.1-beta11/core/io/resource_loader.cpp:408)
[8] EditorPropertyResource::_file_selected(String const&) (/home/bemyak/Downloads/godot-3.1-beta11/editor/editor_properties.cpp:1983)
[9] MethodBind1<String const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/./core/method_bind.gen.inc:729 (discriminator 12))
[10] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:943 (discriminator 1))
[11] Object::emit_signal(StringName const&, Variant const**, int) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:1229 (discriminator 1))
[12] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:1285)
[13] EditorFileDialog::_action_pressed() (/home/bemyak/Downloads/godot-3.1-beta11/editor/editor_file_dialog.cpp:357 (discriminator 4))
[14] EditorFileDialog::_item_dc_selected(int) (/home/bemyak/Downloads/godot-3.1-beta11/editor/editor_file_dialog.cpp:535)
[15] MethodBind1<int>::call(Object*, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/./core/method_bind.gen.inc:729 (discriminator 12))
[16] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:943 (discriminator 1))
[17] Object::emit_signal(StringName const&, Variant const**, int) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:1229 (discriminator 1))
[18] Object::emit_signal(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:1285)
[19] ItemList::_gui_input(Ref<InputEvent> const&) (/home/bemyak/Downloads/godot-3.1-beta11/scene/gui/item_list.cpp:566 (discriminator 4))
[20] MethodBind1<Ref<InputEvent> const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/./core/method_bind.gen.inc:729 (discriminator 12))
[21] Object::call_multilevel(StringName const&, Variant const**, int) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:777 (discriminator 1))
[22] Object::call_multilevel(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:884)
[23] Viewport::_gui_call_input(Control*, Ref<InputEvent> const&) (/home/bemyak/Downloads/godot-3.1-beta11/scene/main/viewport.cpp:1542 (discriminator 2))
[24] Viewport::_gui_input_event(Ref<InputEvent>) (/home/bemyak/Downloads/godot-3.1-beta11/scene/main/viewport.cpp:1844 (discriminator 3))
[25] Viewport::input(Ref<InputEvent> const&) (/home/bemyak/Downloads/godot-3.1-beta11/scene/main/viewport.cpp:2668 (discriminator 2))
[26] Viewport::_vp_input(Ref<InputEvent> const&) (/home/bemyak/Downloads/godot-3.1-beta11/scene/main/viewport.cpp:1319)
[27] MethodBind1<Ref<InputEvent> const&>::call(Object*, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/./core/method_bind.gen.inc:729 (discriminator 12))
[28] Object::call(StringName const&, Variant const**, int, Variant::CallError&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:943 (discriminator 1))
[29] Object::call(StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/bemyak/Downloads/godot-3.1-beta11/core/object.cpp:868)
[30] SceneTree::call_group_flags(unsigned int, StringName const&, StringName const&, Variant const&, Variant const&, Variant const&, Variant const&, Variant const&) (/home/bemyak/Downloads/godot-3.1-beta11/scene/main/scene_tree.cpp:262)
[31] SceneTree::input_event(Ref<InputEvent> const&) (/home/bemyak/Downloads/godot-3.1-beta11/scene/main/scene_tree.cpp:418 (discriminator 6))
[32] InputDefault::_parse_input_event_impl(Ref<InputEvent> const&, bool) (/home/bemyak/Downloads/godot-3.1-beta11/main/input_default.cpp:414)
[33] InputDefault::parse_input_event(Ref<InputEvent> const&) (/home/bemyak/Downloads/godot-3.1-beta11/main/input_default.cpp:260)
[34] InputDefault::flush_accumulated_events() (/home/bemyak/Downloads/godot-3.1-beta11/main/input_default.cpp:677)
[35] OS_X11::process_xevents() (/home/bemyak/Downloads/godot-3.1-beta11/platform/x11/os_x11.cpp:2462)
[36] OS_X11::run() (/home/bemyak/Downloads/godot-3.1-beta11/platform/x11/os_x11.cpp:3004)
[37] /home/bemyak/Downloads/godot-3.1-beta11/bin/godot.x11.tools.64(main+0xdc) [0x1179232] (/home/bemyak/Downloads/godot-3.1-beta11/platform/x11/godot_x11.cpp:56)
[38] /usr/lib/libc.so.6(__libc_start_main+0xf3) [0x7f419a5e2223] (??:0)
[39] /home/bemyak/Downloads/godot-3.1-beta11/bin/godot.x11.tools.64(_start+0x2e) [0x117909e] (??:?)
-- END OF BACKTRACE --
bemyak commented 5 years ago

The issue is still here on Godot 3.1 release version

justinluk commented 5 years ago

I'd love to use Spine for Godot 3.1

QiuleiWang commented 5 years ago

add #include "core/version.h"

bemyak commented 5 years ago

@QiuleiWang , than you, this fixed compilation issues.

But Godot is still crashes with the backtrace above when I'm trying to add a resource to spine node.

Geequlim commented 5 years ago

@bemyak The compile error for 3.1 was fixed by 090b71688bda428103fcaec84d648dfa534e800f I can't reprodce the crash error as you said. Please check the spine runtime version of your animation.