-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Possible regression with validated calls? #83016
Comments
I added some asserts to check for null pointers (https://github.com/lilizoey/gdextension/tree/feature/ptrcall-errors), and it appears that we're getting null pointers as return pointers in some cases
In fact i think methods that return |
Hm. Looking at the code, I think If the return value isn't going to be used at all by the caller, it seems like it's better to pass in However, I'm not 100% sure I'm understanding this all correctly :-) |
Er, actually, I just noticed this:
So, perhaps it is giving us a Variant to store the return value (but it's type |
We had a similar issue today when trying to return a Variant from a singleton (implemented with godot-cpp). We will check out the proposed PR tomorrow. |
I'd love it if someone could share a simple MRP?
Personally, I haven't managed to reproduce this with godot-cpp. One of the automated tests returns a |
What we have is that in MethodBind::bind_ptrcall() r_return is null for some reason, and the Variant assignment crashes because of that. The code was not pushed yet, so we will have to wait until tomorrow. |
Tried your commit 188650d in this CI run, but I still get a crash 🤔 |
Ok, thanks, then it must be the other branch! That means we need make a temporary variant so we always have something to pass to the ptrcall (but throw it away, because we can't pass back to the caller). I'll update the PR, so you can try that variation. |
Unfortunately still fails, with commit 74eccb1. Maybe kisg could come up with a minimal godot-cpp example, that might be easier to investigate? |
Godot version
4.2-dev (2 versions, see below)
System information
Windows 10
Issue description
Our godot-rust CI has started failing with recent Godot
master
versions; there were two events. I did a bisect-style mass test run to find where exactly the behavior changed.GDScript: Replace ptrcalls on MethodBind to validated calls #79893, commit 4a7d49a, CI run
This one made a particular test fail, but seems relatively deterministic. The PR looks GDScript-focused at first, but changes the way how calls work.
GDExtension: Convert
validated_call()
toptrcall()
(rather thancall()
) #82794, commit a6a2d0d, CI runThis one fails even before actual tests are run.
It's of course possible that we are doing something wrong, i.e. godot-rust contained a bug that was already present and only manifested now. If that's the case, any ideas in which direction to look? Have others encountered similar issues?
For 2., we also have a stacktrace in the CI job. Click to expand...
Steps to reproduce
Build Godot
4a7d49a89a381f78f19d0b989c5cb5b500f098c9
Build godot-rust/gdext
master
(a92164bb3a98108b95506f80769408583421e6dc
)Run integration test suite
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: