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

Adding ProjectSettings value with TYPE_OBJECT make Godot Project unrecognizable #33667

Closed
sriedi7 opened this issue Nov 17, 2019 · 2 comments · Fixed by #42616
Closed

Adding ProjectSettings value with TYPE_OBJECT make Godot Project unrecognizable #33667

sriedi7 opened this issue Nov 17, 2019 · 2 comments · Fixed by #42616

Comments

@sriedi7
Copy link

sriedi7 commented Nov 17, 2019

Godot version:
Godot 3.2 beta 1

OS/device including version:
Windows 10

Issue description:
I added to ProjectSettings value with type TYPE_OBJECT and give it a Resource value. When Godot Restarted, the Project is gone from the Project Manager.

Steps to reproduce:
o Open Project I uploaded below
o Open and Run ps_adder.gd, this will create 2 new value in Project Setting
o Open Project Setting and notice the value we created before is there
image
o Now close Godot.
o Reopen Godot, notice that this Project is Gone.
o Try reopen using import and select the project's project.godot file
o The project will not open instead The Project Manager Window opened again.
o Now locate the project.godot file and erase our 2 ProjectSetting value that we added before.
image
o Reopen Godot. Voila! Now the Project is reappear

Minimal reproduction project:
ObjectPS.zip

@Calinou
Copy link
Member

Calinou commented Nov 17, 2019

I guess we should blacklist Object from the property type list in the Project Settings editor (or fix the project.godot parsing).

@akien-mga akien-mga added this to the 4.0 milestone Oct 7, 2020
@akien-mga
Copy link
Member

I can confirm the issue in the current 3.2 branch (cc3c671).

The symptoms are slightly different as I am still able to reopen the project after adding Resources as settings, but indeed those resources are automatically removed.

After adding the resources using the ps_adder.gd tool script and closing the editor, I also get a crash:

asd
ERROR: ~List: Condition "_first != __null" is true.
   At: ./core/self_list.h:112.
ERROR: ~List: Condition "_first != __null" is true.
   At: ./core/self_list.h:112.
handle_crash: Program crashed with signal 11
Dumping the backtrace. 
[1] /lib64/libc.so.6(+0x3a4e0) [0x7fe4db4ec4e0] (??:0)
[2] StreamTexture::~StreamTexture() (/home/akien/Projects/godot/godot-3.2/scene/resources/texture.cpp:879)
[3] void memdelete<Reference>(Reference*) (/home/akien/Projects/godot/godot-3.2/./core/os/memory.h:119)
[4] Ref<Reference>::unref() (/home/akien/Projects/godot/godot-3.2/./core/reference.h:281)
[5] RefPtr::unref() (/home/akien/Projects/godot/godot-3.2/core/ref_ptr.cpp:91)
[6] Variant::clear() (/home/akien/Projects/godot/godot-3.2/core/variant.cpp:1135)
[7] Variant::~Variant() (/home/akien/Projects/godot/godot-3.2/./core/variant.h:445)
[8] ProjectSettings::VariantContainer::~VariantContainer() (/home/akien/Projects/godot/godot-3.2/core/project_settings.h:52)
[9] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element::~Element() (/home/akien/Projects/godot/godot-3.2/./core/map.h:50)
[10] void memdelete_allocator<Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element, DefaultAllocator>(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/os/memory.h:130)
[11] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[12] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[13] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[14] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[15] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[16] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[17] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[18] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[19] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[20] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[21] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[22] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[23] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[24] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::_cleanup_tree(Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::Element*) (/home/akien/Projects/godot/godot-3.2/./core/map.h:505)
[25] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::clear() (/home/akien/Projects/godot/godot-3.2/./core/map.h:661)
[26] Map<StringName, ProjectSettings::VariantContainer, Comparator<StringName>, DefaultAllocator>::~Map() (/home/akien/Projects/godot/godot-3.2/./core/map.h:682)
[27] ProjectSettings::~ProjectSettings() (/home/akien/Projects/godot/godot-3.2/core/project_settings.cpp:1232)
[28] void memdelete<ProjectSettings>(ProjectSettings*) (/home/akien/Projects/godot/godot-3.2/./core/os/memory.h:119)
[29] Main::cleanup() (/home/akien/Projects/godot/godot-3.2/main/main.cpp:2281)
[30] godot-3.2(main+0xff) [0x142b751] (/home/akien/Projects/godot/godot-3.2/platform/x11/godot_x11.cpp:59)
[31] /lib64/libc.so.6(__libc_start_main+0xea) [0x7fe4db4d8cda] (??:0)
[32] godot-3.2(_start+0x2a) [0x142b5aa] (??:?)
-- END OF BACKTRACE --
Aborted (core dumped)

Calinou added a commit to Calinou/godot that referenced this issue Jan 10, 2021
Godot doesn't support serializing objects.

This closes godotengine#33667.
akien-mga pushed a commit to akien-mga/godot that referenced this issue Jan 13, 2021
Godot doesn't support serializing objects.

This closes godotengine#33667.

(cherry picked from commit 7b84f4f)
BrooklynWelsh pushed a commit to BrooklynWelsh/godot that referenced this issue Jan 16, 2021
Godot doesn't support serializing objects.

This closes godotengine#33667.
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