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

Code Editor (Visual): If Object At Place, If Collision Shape, and If Collision Point all cause in-game memory leaks if their "Free Target" option is checked #6069

Closed
KormexGit opened this issue May 31, 2024 — with GM Bug Reporter · 4 comments
Assignees
Labels
ide-bug Bugs with the GameMaker IDE project This issue has a sample project attached
Milestone

Comments

@KormexGit
Copy link

KormexGit commented May 31, 2024

Description

If you use a collision block in visual and check both "return list" and "free target", the generated GML code will have a memory leak. This is because it still runs is_real(list) before destroying the list, which will never be true due to the recent ref changes.

image

image

Steps To Reproduce

Add the "If object at place" block. Check "return list", set "free target" to true, and set "target" to a variable set in the create event.

Which version of GameMaker are you reporting this issue for?

IDE v2024.4.1.152 Runtime v2024.4.1.201

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

Windows 10.0.22631.0

ac8b2660-9c6b-4150-87a1-dd721645fb4a

@gm-bug-reporter gm-bug-reporter bot added ide-bug Bugs with the GameMaker IDE project This issue has a sample project attached labels May 31, 2024
@stuckie stuckie added this to the 2024.6 milestone Jun 3, 2024
@toby-yoyo
Copy link

The following blocks should now correctly free the target list, regardless of whether it is represented by a real or a handle:

@mgeddesGM
Copy link

still present as of Beta IDE v2024.600.0.579 Runtime v2024.600.0.605

@mgeddesGM mgeddesGM reopened this Jun 24, 2024
@mgeddesGM
Copy link

retested and the issue was gone when new blocks, inc obj +at place, were used in the sample project Beta IDE v2024.600.0.579 Runtime v2024.600.0.605

@YYDan
Copy link
Collaborator

YYDan commented Jun 24, 2024

For anyone who has this issue - you do actually need to delete your existing copies of these Visual nodes and re-add them in order to pick up this fix!

@YYDan YYDan changed the title GML Visual: Using a collision list block with "Free Target" checked causes a memory leak Code Editor (Visual): If Object At Place, If Collision Shape, and If Collision Point all cause in-game memory leaks if their "Free Target" option is checked Jun 26, 2024
@YYDan YYDan closed this as completed Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ide-bug Bugs with the GameMaker IDE project This issue has a sample project attached
Projects
Status: Verified
Development

No branches or pull requests

5 participants