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

In-Game: [Windows] Function declaration is broken in object inheritance starting in runtime 2024.1300.0.762 #9591

Closed
gm-bug-reporter bot opened this issue Feb 28, 2025 · 1 comment
Assignees
Labels
project This issue has a sample project attached runner-bug In-game bugs with the "GameMaker Studio 2" runtimes
Milestone

Comments

@gm-bug-reporter
Copy link

Description

We are observing a regression of #8129 starting in runtime 2024.1300.0.762. The sample's test case worked in pre-762 runtimes but started failing in 762.

Steps To Reproduce

  1. Run the sample in Windows VM under the dev configuration
  2. See that the child object grc_o_helper_blank_child calls the parent object's init_instance_variables() instead of its own.

Which version of GameMaker are you reporting this issue for?

IDE v2024.1300.0.758 Runtime v2024.1300.0.768

Which operating system(s) are you seeing the problem on?

Windows 10.0.26100.0

Which platform(s) are you seeing the problem on?

Windows

79a2798a-c019-41b8-b691-ca0745ebf91f

@gm-bug-reporter gm-bug-reporter bot added project This issue has a sample project attached runner-bug In-game bugs with the "GameMaker Studio 2" runtimes labels Feb 28, 2025
@stuckie stuckie moved this from Triage to Todo in Team Workload Mar 3, 2025
@stuckie stuckie added this to the 2024.13 milestone Mar 3, 2025
@rwkay
Copy link

rwkay commented Mar 3, 2025

This is not a bug, but it was a change in the 2024.11 runtime / compiler - within an object the compiler will choose the quickest method for calling a function, in this case the init_instance_variables function is declared (as a named function) within the event since you are using the direct syntax the compiler does not know that you are intending this to be overridden and it should use the method variables and not the direct call. If you change the code within the grc_o_helper_blank to be explicit that you want to use a instance method variable rather than a direct call so self.init_instance_variables() OR you declared the functions as init_instance_variables = function() { ..... } rather than a named function (then the compiler would default to the instance method)

@rwkay rwkay closed this as not planned Won't fix, can't repro, duplicate, stale Mar 3, 2025
@github-project-automation github-project-automation bot moved this from Todo to Done in Team Workload Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project This issue has a sample project attached runner-bug In-game bugs with the "GameMaker Studio 2" runtimes
Projects
Status: Done
Development

No branches or pull requests

2 participants