YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
13 stars 5 forks source link

In-Game: asset_add_tags() crash/code error if called in the Create event for an object created by a method elsewhere that has exactly one argument #5823

Closed KormexGit closed 2 weeks ago

KormexGit commented 3 weeks ago

Description

Today on weird bugs from the help channels, we have a silent crash under very specific circumstances! The method must have EXACTLY 1 argument. Whether anything is passed for this argument or not when called makes no difference. Having 0 arguments does not crash at all. Adding more than 1 argument instead gives this error message, which is also a bug since no 3rd argument is passed to asset_add_tags:

image

Steps To Reproduce

Object 1 create event:

asset_add_tags(object_index, "pause");

Object 2 create event:

make_an_object = function(arg1) {
    instance_create_depth(0, 0, 0, Crasher);
}

Object 2 step event:

if keyboard_check_pressed(vk_space) {
    make_an_object();
}

Which version of GameMaker are you reporting this issue for?

IDE v2024.4.0.137 Runtime v2024.4.0.168

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

Windows 10.0.22631.0

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

Windows

bf62064f-581a-42b8-b46e-96411e383c39

caitlinrmcintyre commented 3 days ago

Verified fix in IDE v2024.600.0.561 Runtime v2024.600.0.579, thanks.