-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
GDScript PR #90601 broke addon compatibility and segfaults #92021
Comments
CC @rune-scape @adamscott (you commented on #90601 today) |
reproduced it with a stacktrace on windows template_debug 64520fe stacktrace:
|
it seems like this is caused by godot/modules/gdscript/gdscript_compiler.cpp Line 3219 in 64520fe
and returning an error code, but the script is still valid,, and then returns: godot/modules/gdscript/gdscript.cpp Lines 802 to 817 in 64520fe
before it initializes the static vars: godot/modules/gdscript/gdscript.cpp Lines 834 to 839 in 64520fe
then a method is called on an script that should be invalid,, and it segfaults if valid was set to true in the proper place, and GDScript::callp() checked if the script was valid before calling:godot/modules/gdscript/gdscript.cpp Lines 879 to 894 in 64520fe
that should fix this, and it does, im making a PR :) (i do not know why #90601 brought this out but it doesnt seem to have anything to do with it directly) (Edit: #90601 made the cache resolve dependant parsers as a part of fully resolving a script and that might have brought out this other bug) |
@rune-scape Thanks for your quick assessment! |
Hey, I'm testing latest Godot build (v4.3.beta.custom_build [be56cab]) in order to see if this would fix projects using addon "Dialogic" (see issue mentioning this one just above - but in the meantime I tried this issue's MWE and it also uses Dialogic, so it should be the same cause). Since the Export Template Manager says "Download from: (no templates for developments builds)", and I can only download up to the 4.3.dev6 export template from the website, I had to duplicate 4.3.dev6 template folder ~/.local/share/godot/export_templates/4.3.dev6 to 4.3.beta (and also change version.txt content to 4.3.beta), then that Godot custom build allowed exporting to Linux. Then I ran both the MWE provided in this issue and 2 of my own MWE:
=> looks like duplicating that template was not clean, I need to know how to test export template for Godot dev build properly
ERROR: Failed to load script "res://addons/dialogic/Resources/CharacterResourceLoader.gd" with error "Compilation failed". So, are we certain that the fix actually fixed the issue for Dialogic? And how can I test it properly with export templates on latest Godot, if it doesn't have dedicated export templates? |
Hi thanks for testing again. I would ask you to also build the templates for your commit you try to test. Please also have a look at: #92337 |
You need to compile export templates from source to test, as export templates are not guaranteed to be compatible across different dev builds. |
Thanks, in the meantime the plugin dev told me to update to their Alpha 14 and it fixed this particular issue even on Godot 4.2.1, so it was apparently unrelated to this Godot issue. For 92337 (custom ResourceLoader not registered) I'm not sure how they fixed it on plugin side, maybe it's not totally fixed on editor side and that would explain some tool errors, but I see no errors at runtime anymore in the terminal. Anyway, it's still good to know how to build templates for later. I remember it was written on the build doc page now. |
Reopening the issue. While it is not automatically crashing any more, the project still doesn't run. So it seems like it is not resolved yet. |
When running the repro project you should see a basic dialog, but with the latest build, you only see a gray screen. The errors are:
It also crashes when closing the project (also noticed that the editor does the same, so not sure if related with this project or not) |
@coppolaemilio thanks for taking a second look - what you describe here is mentionend in: #92337 there is also a workaround where i got the dialog working. |
There shouldn't be a need to change any setting like this from version to version when running from the editor works but not in its exported version, so I think this issue is still unresolved |
Can confirm this also happens for me 😘 |
Interesting, I ran into that same error, and perhaps the same issue, I wrote about it here. I thought it would be related to the cyclic reference issue: I could not create an MRP of it though. I managed to get a work around. I'm also getting that error in the editor itself but not sure if it's the same cause or a different cause. |
Tested versions
v4.3.dev6.official 64520fe
System information
Linux, Windows & macos
Issue description
If you run the MRP from the editor, it works no problem, but when trying to run the project exported it crashes. This wasn't the case in previous versions.
Enabling the Plugin and exporting the Project causes a segfault during runtime.
Steps to reproduce
Open project -> reboot to bypass the plugin loading bug -> run the project normally from the editor ✅
Open project -> export it -> run the exported project 🚫
Minimal reproduction project (MRP)
https://github.com/godotengine/godot/files/15337905/reprobug.zip
The text was updated successfully, but these errors were encountered: