JekSun97 / gdTree3D

Plugin for procedural generation of 3D trees of varying complexity for Godot Engine.
Other
202 stars 11 forks source link

Project Crashing in Godot 4.3 #13

Open TravsVoid opened 2 months ago

TravsVoid commented 2 months ago

I installed from the asset library and placed the .dll files for 4.3 and windows but it's causing Godot to crash when I create a Tree3D scene. This actually broke my main project after I instantiated a tree scene into my main level and it crashed every time I opened my project. I had to then edit the scene file to remove the tree references to get back into it.

https://github.com/user-attachments/assets/a6be4b53-6b75-42bd-8301-15291cb96735

Also I see debug, release, 32bit, and 64bit versions of the dll's. Do I need both the debug and release dll along with both 32 and 64 bit? Folder

Godot Project:

treeissue.zip

FibreFoX commented 2 months ago

Don't clone the repository, create a fresh project and add the binaries from the GitHub Actions: https://github.com/JekSun97/gdTree3D/actions/runs/10851955753

grafik

Can you check with that files?

TravsVoid commented 2 months ago

I can confirm the same issue is occurring for me using that download in a fresh project.

FibreFoX commented 2 months ago

@TravsVoid Can you post a fresh project with these files? The first one contained too much distracting stuff. Just an empty project with the changes required for the crash (including the addon).

Sounds very interesting, like a general bug. Will try to check on other OS systems too when having that project (to rule out it being an OS dependent issue).

FibreFoX commented 2 months ago

Another question: have you checked if the issue is present in older versions of Godot?

JekSun97 commented 2 months ago

Try running the project from the console to see the errors that have occurred. I migrated my project from 4.2 to 4.3 using Windows as well, but I don't have such problems

TravsVoid commented 2 months ago

Here is the new 4.3 test, but I did try out the 4.2 version and the same crash is happening for me.

https://github.com/user-attachments/assets/f98bf7b1-8936-4ccf-9cea-082dd6de98a8

treetest.zip

vabrador commented 2 months ago

I'm experiencing this crash as well in 4.3: Engine version: Godot Engine v4.3.stable.official (77dcf97d82cbfe4e4615475fa52ca03da645dbd8) (note: my stack trace is from a custom build so I have some debug symbols) Renderer: Forward+ Addon binary: binaries-windows-godot4.3-x86_64

The reproduction steps are as in TravsVoid's video above; specifically, the crash only occurs when changing editor tabs to a scene with a Tree3D in it. For me, I can have the editor successfully start up into a scene containing a Tree3D, and it crashes if I tab away to a different scene and back.

Here's the most detailed backtrace I could get, from using my own built version of 4.3 x64 godot_cpp, and my own built editor of 4.3, which is a mostly-unchanged Godot 4.3 build (the crash occurs whether I use my own build or 4.3-stable):

CrashHandlerException: Program crashed
Engine version: Godot Engine v4.3.1.rc.custom_build (94ac6d4c38cee511f193459dd2070fbc4371bcb3)
Dumping the backtrace. Please include this when reporting the bug to the project developer.
[0] <couldn't map PC to fn name>
[1] <couldn't map PC to fn name>
[2] <couldn't map PC to fn name>
[3] <couldn't map PC to fn name>
[4] <couldn't map PC to fn name>
[5] GDExtensionMethodBind::call (C:\Users\vabs\dev\godot_dev\godot\core\extension\gdextension.cpp:251)
[6] ClassDB::get_property (C:\Users\vabs\dev\godot_dev\godot\core\object\class_db.cpp:1560)
[7] Object::get (C:\Users\vabs\dev\godot_dev\godot\core\object\object.cpp:328)
[8] EditorFolding::_fill_folds (C:\Users\vabs\dev\godot_dev\godot\editor\editor_folding.cpp:116)
[9] EditorFolding::_fill_folds (C:\Users\vabs\dev\godot_dev\godot\editor\editor_folding.cpp:128)
[10] EditorFolding::save_scene_folding (C:\Users\vabs\dev\godot_dev\godot\editor\editor_folding.cpp:148)
[11] EditorNode::_set_current_scene_nocheck (C:\Users\vabs\dev\godot_dev\godot\editor\editor_node.cpp:3874)
[12] EditorNode::_set_current_scene (C:\Users\vabs\dev\godot_dev\godot\editor\editor_node.cpp:3869)
[13] CallableCustomMethodPointer<EditorNode,int>::call (C:\Users\vabs\dev\godot_dev\godot\core\object\callable_method_pointer.h:103)
[14] Callable::callp (C:\Users\vabs\dev\godot_dev\godot\core\variant\callable.cpp:58)
[15] Object::emit_signalp (C:\Users\vabs\dev\godot_dev\godot\core\object\object.cpp:1190)
[16] Node::emit_signalp (C:\Users\vabs\dev\godot_dev\godot\scene\main\node.cpp:3902)
[17] Object::emit_signal<int> (C:\Users\vabs\dev\godot_dev\godot\core\object\object.h:936)
[18] EditorSceneTabs::_scene_tab_changed (C:\Users\vabs\dev\godot_dev\godot\editor\gui\editor_scene_tabs.cpp:75)
[19] CallableCustomMethodPointer<EditorSceneTabs,int>::call (C:\Users\vabs\dev\godot_dev\godot\core\object\callable_method_pointer.h:103)
[20] Callable::callp (C:\Users\vabs\dev\godot_dev\godot\core\variant\callable.cpp:58)
[21] Object::emit_signalp (C:\Users\vabs\dev\godot_dev\godot\core\object\object.cpp:1190)
[22] Node::emit_signalp (C:\Users\vabs\dev\godot_dev\godot\scene\main\node.cpp:3902)
[23] Object::emit_signal<int> (C:\Users\vabs\dev\godot_dev\godot\core\object\object.h:936)
[24] TabBar::gui_input (C:\Users\vabs\dev\godot_dev\godot\scene\gui\tab_bar.cpp:287)
[25] Control::_call_gui_input (C:\Users\vabs\dev\godot_dev\godot\scene\gui\control.cpp:1831)
[26] Viewport::_gui_call_input (C:\Users\vabs\dev\godot_dev\godot\scene\main\viewport.cpp:1570)
[27] Viewport::_gui_input_event (C:\Users\vabs\dev\godot_dev\godot\scene\main\viewport.cpp:1799)
[28] Viewport::push_input (C:\Users\vabs\dev\godot_dev\godot\scene\main\viewport.cpp:3259)
[29] Window::_window_input (C:\Users\vabs\dev\godot_dev\godot\scene\main\window.cpp:1680)
[30] CallableCustomMethodPointer<Window,Ref<InputEvent> const &>::call (C:\Users\vabs\dev\godot_dev\godot\core\object\callable_method_pointer.h:103)
[31] Callable::callp (C:\Users\vabs\dev\godot_dev\godot\core\variant\callable.cpp:58)
[32] Callable::call<Ref<InputEvent> > (C:\Users\vabs\dev\godot_dev\godot\core\variant\variant.h:876)
[33] DisplayServerWindows::_dispatch_input_event (C:\Users\vabs\dev\godot_dev\godot\platform\windows\display_server_windows.cpp:3557)
[34] Input::_parse_input_event_impl (C:\Users\vabs\dev\godot_dev\godot\core\input\input.cpp:775)
[35] Input::flush_buffered_events (C:\Users\vabs\dev\godot_dev\godot\core\input\input.cpp:1056)
[36] DisplayServerWindows::process_events (C:\Users\vabs\dev\godot_dev\godot\platform\windows\display_server_windows.cpp:3025)
[37] OS_Windows::run (C:\Users\vabs\dev\godot_dev\godot\platform\windows\os_windows.cpp:1666)
[38] widechar_main (C:\Users\vabs\dev\godot_dev\godot\platform\windows\godot_windows.cpp:181)
[39] _main (C:\Users\vabs\dev\godot_dev\godot\platform\windows\godot_windows.cpp:208)
[40] main (C:\Users\vabs\dev\godot_dev\godot\platform\windows\godot_windows.cpp:220)
[41] __scrt_common_main_seh (D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288)
[42] <couldn't map PC to fn name>

Admittedly I haven't figured out how to get debug symbols in a GDExtension; I looked around but couldn't find a straight-forward guide for this and I'm pretty green to using GDExtension. If anybody has a tip here I can try to get better debug information.

FibreFoX commented 2 months ago

To sum up the video:

thanks @TravsVoid for the video and the clean project, that helps

thanks @vabrador too, not sure about the debug-information inside the GDExtensions, they "should" be included in the binaries, but maybe they are (still) compiled somehow wrong (documentation from Godot is a bit wonky there)

I will experiment with creating the binaries with a Windows VM again, maybe that will give some dbg files again to find the problem

Yora0 commented 1 month ago

When I start a new project and add the plugin from the Asset Library, and then reload the current project, I'm getting these errors:

Tree3D.gdextensions is present in /addons/Tree3D, but it can not be viewed in the Inspector when double clicking it in the FileSystem.

In the file manager of my OS, I can open Tree3D.gdextensions. Inside it is referencing four linux libraries that should be located in /addons/Tree3D as well, but they are not.

FibreFoX commented 1 month ago

@Yora0 this is a different issue you are having, please iopen a different bug issue

JekSun97 commented 3 weeks ago

There is a suspicion that the crash problem is somehow related to this problem #1, probably the links to the meshes are lost somewhere...

dootus commented 5 days ago

I can confirm this happening in the linux build as well. Crashes on changing editor tab to a scene that contains a Tree3D.

One possible workaround is to always close any scene that contains a tree and open it from the FileSystem browser instead of changing tabs. It can open the scene without crashing, but it's inconvenient.