YoYoGames / GameMaker-Bugs

Public tracking for GameMaker bugs
15 stars 7 forks source link

Resource not indexed in .yyp file can still appear in the Asset Browser #6255

Open shichen85 opened 3 weeks ago

shichen85 commented 3 weeks ago

Description

During IDE updates, our project somehow deleted a sprite resource from the yyp file but kept the actual yy file and related resources. In the IDE's Asset Browser, this sprite can be seen and assigned to objects. However, when performing draw events with this sprite, it will fail.

We expect the IDE to be able to warn or correct the situation. Otherwise, it is confusing to see an existing resource not working at runtime.

Steps To Reproduce

  1. Open the sample in IDE
  2. See that the resource grc_o_spine_async_event_test is visible and assignable to objects.
  3. Run the project and see the animation event does not trigger
  4. Open the yyp file and see the resource is not indexed

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?

Mac 12.7.5

4fefce1d-b78f-45ac-af16-1af2a5dfb7fc

stuckie commented 3 weeks ago

The project attached doesn't have the problem sprite in it ( grc_player_fallfromspace_spine by the looks of things ) Trying to add that in to where it should be still doesn't trigger the problem here. Could you zip up the project and attach it, as the YYZ export must have sanitised it somewhat... although the project is "broken", it runs through ProjectTool to null the bad reference, so I cannot reproduce what you are seeing here.

shichen85 commented 2 weeks ago

Hello @stuckie, I have attached the project here. However, in case it triggers ProjectTool again, you can try the following steps:

  1. Run the project to confirm that the animation event triggers
  2. Close the IDE and edit the yyp file to remove the resource grc_player_fallfromspace_spine on line 43
  3. Open the project in IDE and run again to see the animation event not triggering
  4. See that the resource grc_o_spine_async_event_test is visible in asset browser and assignable to objects.

skeletonanimation.zip

stuckie commented 3 days ago

I don't get the animation playing, at all... even when going back to both the initial version of the bug report, and the one that saved the project. However, when I remove the line in the yyp, I do still get the object showing up in the project, so I can at least look into why it's doing that now, thanks!

Project is haunted.

shichen85 commented 2 days ago

I don't get the animation playing, at all... even when going back to both the initial version of the bug report, and the one that saved the project. However, when I remove the line in the yyp, I do still get the object showing up in the project, so I can at least look into why it's doing that now, thanks!

Project is haunted.

That sounds like the right problem: the resource is not in the YYP file but still shows up in the project. As long as the IDE can be aware of this discrepancy and handle it properly, it will be an improvement!