-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Custom Resources that worked in 4.2.2 do not in 4.3 (does not recognize as resource?) #95789
Comments
Added MRP to OP. This project makes it to the main menu in 4.2.2, but throws the error in 4.3 |
With the mrp i was able to reproduce the error, bisected to #94871 A detail is if i copy the infusion.gd to another project and use |
CC @rune-scape |
stacktrace of where the call error flag is set,
it goes like this: seems like a dependancy issue with resources, where 'combat_card.gd' is valid and in the scripts could maybe have a shallow flag and call reload on themselves if instantiated when shallow, but the system is kinda complicated and that seems like patchwork solution that could create more problems an error print when trying to instantiate a partially loaded script would be helpful for users |
Tested versions
No issue in v4.2.2.stable.official [15073af] and previous
First visual(?) errors in v4.3.rc1.official [e343dbb]
First game-ending exception occurs in v4.3.rc2.official [3978628] and later (rc3 and 4.3 tested)
System information
Godot v4.3.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1080 (NVIDIA; 32.0.15.6081) - Intel(R) Core(TM) i5-7600 CPU @ 3.50GHz (4 Threads)
Issue description
Short version, something's wacky with my custom resources since I updated to 4.3 from 4.2.2
I have a very simple resource which looks like this:
Which is used by another custom resource (CombatCard) as an export variable, like so:
@export var infusion:= Infusion.new()
In 4.2.2, this worked as I expected, with CombatCards that did not have a custom Infusion set defaulting to a new Infusion instance with 0s across the board. Additionally, the autocomplete had that custom resource icon (the cube thing) for the resources, as shown.
This is not the case when I load that same project in 4.3.rc1 or later:
You'll notice that the Infusion resource (which extends Resource) has no symbol. Additionally, QuestInfoScreen now shows the icon for ColorRect, which is what that class extends, whereas previously it also had the cube icon. I don't know if that's intentional.
The project still seems to run fine despite this in 4.3.rc1. In 4.3.rc2, rc3, or 4.3, however, it causes the project to crash when run with the following error.
Steps to reproduce
I've been able to reproduce the visual portion of this issue in a brand new project (here, MyCustomResource is another dead simple class that extends Resource and has a single member variable of type int, not even exported)
I've not been able to reproduce the crash yet. I suspect it has something to do with loading or preloading of the parent CombatCard resource, or scenes which use that resource? I don't really know, feel free to ask if you want more info.
My next plan is to try removing the Infusion class and just storing those variables in the parent resource, and see whether anything else is broken. I should also have access to Linux Mint in the short term to check if it's OS related.
If you think an MRP would help, I can try to pare down my main project a bit and upload that. I'm open to suggestions, if there's anything I can do to help let me know, in the meantime I'll carry on development in 4.2.2
Minimal reproduction project (MRP)
95789MRP.zip
EDIT: Did some hacking and slashing on the project, and got an MRP. It probably won't run well, but the important thing is that it results in the issue for me (before any other issue, anyway)
Step 1: Open Project
Step 2: Run Project
Project will throw the error before showing the main menu
The text was updated successfully, but these errors were encountered: