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

Editor crash when resetting a Typed Array without an initial value #27345

Closed
c0rrup7eq opened this issue Mar 23, 2019 · 2 comments · Fixed by #32238
Closed

Editor crash when resetting a Typed Array without an initial value #27345

c0rrup7eq opened this issue Mar 23, 2019 · 2 comments · Fixed by #32238

Comments

@c0rrup7eq
Copy link

c0rrup7eq commented Mar 23, 2019

Godot version:
v3.1.stable.official

OS/device including version:
Windows 10 Home

Issue description:
If an exported array is declared with a type but without an initial value, then if you try to reset it to the original value in the Editor, it crashes the program.

It was mentioned in #24134 in the comments, but I haven't found a separate issue for this bug.
#24134 (comment)

Steps to reproduce:

  1. Create a new project
  2. Create a Node
  3. Attach a script and add export var array : Array to it
  4. Save and change the array in the editor
  5. Reset the array

Minimal reproduction project:
Array Test.zip

@c0rrup7eq
Copy link
Author

Fixed attached project for a correct one.

Also the crash doesn't happen with export var array : Array = Array() and resets as intended.

@qarmin
Copy link
Contributor

qarmin commented Mar 27, 2019

Backtrace:

[1] /lib/x86_64-linux-gnu/libc.so.6(+0x3ef20) [0x7f31b2d05f20] (??:0)
[2] Object::notification(int, bool) (/home/rafal/Pulpit/godot/core/object.cpp:955)
[3] Object::_predelete() (/home/rafal/Pulpit/godot/core/object.cpp:387)
[4] predelete_handler(Object*) (/home/rafal/Pulpit/godot/core/object.cpp:2011)
[5] void memdelete<VBoxContainer>(VBoxContainer*) (/home/rafal/Pulpit/godot/./core/os/memory.h:117)
[6] EditorPropertyArray::update_property() (/home/rafal/Pulpit/godot/editor/editor_properties_array_dict.cpp:261)
[7] EditorInspector::_notification(int) (/home/rafal/Pulpit/godot/editor/editor_inspector.cpp:2188)
[8] EditorInspector::_notificationv(int, bool) (/home/rafal/Pulpit/godot/editor/editor_inspector.h:251 (discriminator 14))
[9] Object::notification(int, bool) (/home/rafal/Pulpit/godot/core/object.cpp:954)
[10] SceneTree::_notify_group_pause(StringName const&, int) (/home/rafal/Pulpit/godot/scene/main/scene_tree.cpp:969)
[11] SceneTree::idle(float) (/home/rafal/Pulpit/godot/scene/main/scene_tree.cpp:518 (discriminator 3))
[12] Main::iteration() (/home/rafal/Pulpit/godot/main/main.cpp:1886)
[13] OS_X11::run() (/home/rafal/Pulpit/godot/platform/x11/os_x11.cpp:3006)
[14] /usr/bin/godot(main+0xdc) [0x1167183] (/home/rafal/Pulpit/godot/platform/x11/godot_x11.cpp:56)
[15] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f31b2ce8b97] (??:0)
[16] /usr/bin/godot(_start+0x2a) [0x1166fea] (??:?)

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