You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating a custom implementation of GraphNode and adding custom logic inside _has_point and _get_tooltip, the behavior of these methods differs between DEBUG and RELEASE builds.
On debug builds, these methods are called whereas for RELEASE builds they are not.
It's important to note that the class hierarchy is GraphNode --> MyGraphNode --> MyGraphNodeComment. These virtual methods are implemented on the comment node only.
A workaround appears to be that to have consistent behavior across builds, the overridden methods must also be overridden in the MyGraphNode class with default implementations, i.e.:
When you talk about debug vs release builds, are you referring to debug/release builds of Godot or debug/release builds of your GDExtension? Or, always paired (debug Godot build with debug GDExtension build, and vice versa for release)?
Unfortunately, I've been unable to reproduce this so far. I tried adding a test case which makes a sub-sub-class with _get_tooltip() which is in this patch.
I tried running the tests with Godot 4.2.1-stable with the editor (debug) running a debug build of the test GDExtension, the editor (debug) with a release build of the test GDExtension, and exporting the project (so, release template of Godot 4.2.1-stable) with a release build of the test GDExtension -- the tests passed in every combination.
Can you provide an MRP or more instructions on how to reproduce? Thanks!
Godot version
4.2.0-stable
godot-cpp version
4.2.0-stable
System information
Windows 11, MSVC 2022
Issue description
When creating a custom implementation of
GraphNode
and adding custom logic inside_has_point
and_get_tooltip
, the behavior of these methods differs between DEBUG and RELEASE builds.On debug builds, these methods are called whereas for RELEASE builds they are not.
It's important to note that the class hierarchy is
GraphNode
-->MyGraphNode
-->MyGraphNodeComment
. These virtual methods are implemented on the comment node only.A workaround appears to be that to have consistent behavior across builds, the overridden methods must also be overridden in the
MyGraphNode
class with default implementations, i.e.:Steps to reproduce
MyGraphNode
that is derived fromGraphNode
.MyGraphNodeComment
that derives fromMyGraphNode
._has_point
and_get_tooltip
with custom behavior insideMyGraphNodeComment
, i.e.Editor - 4.2 stable official
Godot CPP - Checkout hash 4.2.0-stable
0f78fc45bd9208793736afda6c56ff7e85d4d285
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: