Updating from Godot 4.2.2 to 4.3 broke something in my custom resources

(sorry for the double post, in a sleep-deprived mania I thought I had solved it, but no, I had just opened 4.2.2 instead of 4.3 by mistake.)

Godot 4.2.2 → 4.3

My project broke on updating from 4.2.2 to 4.3, and I’m not quite sure why, so I thought I’d ask here to see if I’m missing something, if there’s an obvious fix, or if I should be making a bug report.

I have a custom resource which I was planning to expand later, but right now it’s very simple, just 4 int variables. This is the entirety of the resource script:

class_name Infusion
extends Resource

@export var air: int = 0
@export var earth: int = 0
@export var fire: int = 0
@export var ice: int = 0

Another resource (CombatCard) uses this resource as an export variable, like so:

@export var infusion:= Infusion.new()

In 4.2.2, this all works as I expected. I could set specific Infusion values in the editor for testing purposes, and if I did not set an Infusion in the editor it would just make a new one with the default values.

In 4.3, running the project quickly gives me this error:

(image redacted, new users can only upload one media item per post)

Additional investigation shows that if I try to make a new Infusion from code (or possibly any custom resource, haven’t gotten to work around this to see whether anything else is broken) then the autocomplete for the custom resource looks off.

It, and all my other custom resources, do not have the little resource icon next to them (as they do in 4.2.2,) making me think Godot is not recognizing them as resources for some reason?

(image redacted, new users can only upload one media item per post)

A bit of sleuthing reveals that it still works fine in 4.3-rc1, but 4.3-rc2 onward gives me the issue. I’ve tried a few ways to fix it, including removing all instances of Infusion.new() and trying to set everything through the editor, messing around with _init(), rebooting the editor, my computer, but no luck. CombatCards in 4.3 just can’t be made to have Infusions and I don’t know why.

It would be one thing if it didn’t work in 4.2.2 either, I’d just refactor it (and may do so anyway, there’s no real reason for something this simple to be its own resource rather than just member variables of the first resource.) The fact that it used to work and no longer does gives me pause, however, and makes me concerned that I’m misunderstanding something fundamental about custom resources, or export variables, or constructors, or etc. I’m also concerned that if it’s a bug, I’m just going to have future problems once I implement a simple workaround.

I haven’t been able to create a minimal reproducible project, which makes me think maybe it has something to do with loading or preloading of resources/scenes? Maybe?

My attempt at a MRP does replicate the “no resource icon in autocomplete” thing, but it works, so maybe that’s just a 4.3 change.

(image redacted, new users can only upload one media item per post)

If you know what I’m doing wrong, let me know. If you have an idea on how to narrow down what’s going wrong or generate a minimal reproducible project, even better! I’m open to suggestions.

I’d personally slow down and file a bug report. It sounds like the version itself is causing the issue.

Don’t be so hasty to trust Godot. There’s an age-old saying, “If you think it’s a compiler bug, it’s not.”

But Godot is very fussy and irrational. I’m using 4.2.2, and I just now wasted many hours, until I found out that assigning a non-zero integer to a bool TypedArray silently assigns false, which is not at all the expected behavior I expected.

Which version of 4.3 you’re using? Is the stable, dev, beta, rc? Because i remember a similar bug like that in the dev/beta version but that was already solved

v4.3.stable.official [77dcf97d8]

Yeah, that’s the next step. I just hate filing bug reports if I can’t make it reproducible, or at least provide more useful descriptions.

That’s odd, as @Tatrabbit said the way is open a bug report in github so this bug can be properly fixed: Sign in to GitHub · GitHub