Skip to content
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

Invalid call. Nonexistent function 'reload' in base 'GDScript'. #92610

Closed
CsloudX opened this issue Jun 1, 2024 · 7 comments · Fixed by #92609
Closed

Invalid call. Nonexistent function 'reload' in base 'GDScript'. #92610

CsloudX opened this issue Jun 1, 2024 · 7 comments · Fixed by #92609

Comments

@CsloudX
Copy link

CsloudX commented Jun 1, 2024

Tested versions

v4.3.beta1.mono.official [a4f2ea9]

System information

Godot v4.3.beta1.mono - Windows 10.0.17763 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 31.0.15.2849) - AMD Ryzen 9 5950X 16-Core Processor (32 Threads)

Issue description

Coding like this:

extends Node

var obj = RefCounted.new()
var gds = GDScript.new()

func _ready():
	gds.source_code = "func a():return 100"
	gds.reload()
	obj.set_script(gds)
	var rs = obj.a()
	prints(rs)

image
This code work before 4.3dev6 and output 100.

Steps to reproduce

run the MRP, it report error

Minimal reproduction project (MRP)

gdstest.zip

@matheusmdx
Copy link
Contributor

Bisecting points to #92035 as the culprit:

image

@matheusmdx
Copy link
Contributor

Cherry-picked #92609 and seems to solve this issue

@rune-scape
Copy link
Contributor

this is probly bc if there were any errors compiling (possibly another gdscript bug related to built-in scripts), sets the script as not 'valid', then #92035 restricted GDScript member functions too much so that reload wasnt a valid function if the script isnt valid, thats what #92609 fixes

@CsloudX
Copy link
Author

CsloudX commented Jun 21, 2024

Oh no, this issue was broken my project. but it not fixed in 4.2beta2, so I can't update to beta2 for test my project, it make me so sad.
Can this issue fixed in the next version(4.3beta3)?

@akien-mga
Copy link
Member

@CsloudX There's a PR pending review: #92609. If you can test it and confirm it fixes your issue, that helps the review process to have confidence that it covers potentially more complex cases than the ones in MRPs. See https://docs.godotengine.org/en/stable/contributing/workflow/testing_pull_requests.html for instructions on how to test a PR.

@CsloudX
Copy link
Author

CsloudX commented Jun 21, 2024

@CsloudX There's a PR pending review: #92609. If you can test it and confirm it fixes your issue, that helps the review process to have confidence that it covers potentially more complex cases than the ones in MRPs. See https://docs.godotengine.org/en/stable/contributing/workflow/testing_pull_requests.html for instructions on how to test a PR.

Thanks, but like this pull request expired.
image

@matheusmdx
Copy link
Contributor

@CsloudX Here, i compiled the latest master with pr 92609 cherry-picked (i'm assuming you're a windows user): https://drive.google.com/file/d/1JO2erXW6G8r70B8ECaL1keojdFmHOwrk/view?usp=sharing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Release Blocker
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants