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

Export variable of array type will ignore its own type and use the value's type when pasting value #78630

Closed
Rindbee opened this issue Jun 23, 2023 · 3 comments · Fixed by #90265

Comments

@Rindbee
Copy link
Contributor

Rindbee commented Jun 23, 2023

Godot version

v4.0.stable.official [92bee43], v4.1.beta.custom_build [19e7490]

System information

Linux Mint 21.1 (Vera) - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1050 Ti (nvidia; 515.105.01) - Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz (4 Threads)

Issue description

Peek.2023-06-24.07-21.mp4

Export variable of array type will ignore its own type and use the value's type when pasting a value of a different type.

ERROR: Invalid method 'size' for type 'int'.
   at: _variant_call_error (core/variant/variant.cpp:3625)
ERROR: Invalid method 'resize' for type 'int'.
   at: _variant_call_error (core/variant/variant.cpp:3625)

Steps to reproduce

  1. Export an array;
  2. Copy a value from another property of a different type;
  3. Paste into that exported variable;
  4. An error message will be output, but it still looks like an Array in the Inspector.

Minimal reproduction project

N/A

@Rindbee Rindbee changed the title Array types of exported variables will ignore their own type and use the value's type when pasting value Export variable of array type will ignore their own type and use the value's type when pasting value Jun 23, 2023
@Rindbee Rindbee changed the title Export variable of array type will ignore their own type and use the value's type when pasting value Export variable of array type will ignore its own type and use the value's type when pasting value Jun 23, 2023
@ajreckof
Copy link
Member

ajreckof commented Apr 5, 2024

this was fixed by #80977

@akien-mga akien-mga added this to the 4.2 milestone Apr 5, 2024
@Rindbee
Copy link
Contributor Author

Rindbee commented Apr 5, 2024

Doesn't seem to be fixed.
Pasting values of non-matching types causes non-empty arrays to appear as "(Nil)Array".

0

The editor will crash while clicking the Add Element button or the revert icon.

================================================================
handle_crash: Program crashed with signal 11
Engine version: Godot Engine v4.3.dev.custom_build (79de2eaae7fb3bb8f13031ac2ec9b19128b6f471)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[1] /lib/x86_64-linux-gnu/libc.so.6(+0x42520) [0x720704042520] (??:0)
[2] Object::notification(int, bool) (/opt/godot/godot/core/object/object.cpp:899)
[3] CanvasItem::set_visible(bool) (/opt/godot/godot/scene/main/canvas_item.cpp:84)
[4] EditorPropertyArray::update_property() (/opt/godot/godot/editor/editor_properties_array_dict.cpp:407)
[5] EditorProperty::gui_input(Ref<InputEvent> const&) (/opt/godot/godot/editor/editor_inspector.cpp:729)
[6] Control::_call_gui_input(Ref<InputEvent> const&) (/opt/godot/godot/scene/gui/control.cpp:1800)
[7] Viewport::_gui_call_input(Control*, Ref<InputEvent> const&) (/opt/godot/godot/scene/main/viewport.cpp:1538)
[8] Viewport::_gui_input_event(Ref<InputEvent>) (/opt/godot/godot/scene/main/viewport.cpp:1768)
[9] Viewport::push_input(Ref<InputEvent> const&, bool) (/opt/godot/godot/scene/main/viewport.cpp:3229)
[10] Window::_window_input(Ref<InputEvent> const&) (/opt/godot/godot/scene/main/window.cpp:1630)
[11] void call_with_variant_args_helper<Window, Ref<InputEvent> const&, 0ul>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, Callable::CallError&, IndexSequence<0ul>) (/opt/godot/godot/./core/variant/binder_common.h:304)
[12] void call_with_variant_args<Window, Ref<InputEvent> const&>(Window*, void (Window::*)(Ref<InputEvent> const&), Variant const**, int, Callable::CallError&) (/opt/godot/godot/./core/variant/binder_common.h:419)
[13] CallableCustomMethodPointer<Window, Ref<InputEvent> const&>::call(Variant const**, int, Variant&, Callable::CallError&) const (/opt/godot/godot/./core/object/callable_method_pointer.h:104)
[14] Callable::callp(Variant const**, int, Variant&, Callable::CallError&) const (/opt/godot/godot/core/variant/callable.cpp:58)
[15] Variant Callable::call<Ref<InputEvent> >(Ref<InputEvent>) const (/opt/godot/godot/./core/variant/variant.h:855)
[16] DisplayServerX11::_dispatch_input_event(Ref<InputEvent> const&) (/opt/godot/godot/platform/linuxbsd/x11/display_server_x11.cpp:4012)
[17] DisplayServerX11::_dispatch_input_events(Ref<InputEvent> const&) (/opt/godot/godot/platform/linuxbsd/x11/display_server_x11.cpp:3989)
[18] Input::_parse_input_event_impl(Ref<InputEvent> const&, bool) (/opt/godot/godot/core/input/input.cpp:772)
[19] Input::flush_buffered_events() (/opt/godot/godot/core/input/input.cpp:1044)
[20] DisplayServerX11::process_events() (/opt/godot/godot/platform/linuxbsd/x11/display_server_x11.cpp:5101)
[21] OS_LinuxBSD::run() (/opt/godot/godot/platform/linuxbsd/os_linuxbsd.cpp:934)
[22] godot-llvm-dev(main+0x18e) [0x5c466f1c78fe] (/opt/godot/godot/platform/linuxbsd/godot_linuxbsd.cpp:86)
[23] /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x720704029d90] (??:0)
[24] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x720704029e40] (??:0)
[25] godot-llvm-dev(_start+0x25) [0x5c466f1c76a5] (??:?)
-- END OF BACKTRACE --
================================================================

@ajreckof
Copy link
Member

ajreckof commented Apr 5, 2024

the nil part is intended it is reverted to null because the value is considered absurd. the crash on the other hand is a totally different bug which is introduced by #80706.

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

Successfully merging a pull request may close this issue.

4 participants