• Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

GMS 2.3+ How to fix error "Blank IdReference found" with a project that still compiles

imagen_2021-03-31_205458.pngHello forum!

This is a tutorial and recap on how to fix the "Blank IdReference found - could be that the project is corrupt" when you already tried everything and nothing works BUT your project still compiles and nothing seems to fail because of this.
What do I mean with that?
  • No black screens.
  • No files duplicated on the assets browser tab.
  • No in-game errors related to missing assets.
  • Nothing that seems to change because of "corrupted" assets.

CONTEXT
This error started appearing since GMS2.3, i saw a lot of people complaining and a lot of people giving solutions, for some it was a sprite and indexing problem, others for duplicate files, others even had junk files, however, all these came to similar solutions. Most of the time the solution was to re-import assets, delete or duplicate them and rename them.

I still don't understand why this error happens, however, it seems to have to do with:
  1. Projects imported from GMS1 to GMS2.3, or
  2. Something to do with GIT implementation.

WHAT I TRIED (SOME POSSIBLE SOLUTIONS FOR YOU)
I has this problem for so long (since 2.3.1 first beta at least), but never knew how to solve it even looking a lot of tutorials on how to fix it here on the forums, reddit, youtube and even facebook groups, so if you are on this post, it means you already tried:
... and the "Blank IdReference found - could be that the project is corrupt" message everytime you compile still persists.

But if you not, feel free to try any of these solutions before continue.

MY SOLUTION
TL;DR:
Check .yyp room files for "propertyId":{"name":"".

Today, working on another project other than the corrupt one, I opened the "corrupt" one by mistake, when it loaded I went to "Home" and opened the project I wanted to work on from the shortcut and a "warning" window popped up.
7 "id not referenced" messages appeared in this window but this time it appeared with a long string of readeable characters like a file path, and 7 was the "Blank IdReference found - could be that the project is corrupt" messages that the compiler output tab gave me everytime i compiled the game.

I don't have an image on how it looks, but it says something like: warning (...) <your_asset_name> on <path> (...). example: "warning (...) room_test on layers/0/instances/55/propieties/1/propertyId (...)."

As i said, that's what i did to show that new warning window, but i don't know how to recreate this, but anyway, the next step is the solution and you can apply it to every asset files you need to, my suspicion is that this happens only on room files because all the assets i had to do this next step were rooms.

So after looking for the assets from the window i opened them using Visual Studio Code and search first for "layers", then go to the first index (taking the example as this case, it would be 0), look for "instances", then go 55 lines below, and find "propieties", here i find that every room that has this problems has an array on "propieties" that contains a lot of "propertyId" after them. So, keep using the example, i go to the second line after the definition (index 1) and the "propertyId" always started with "propertyId":{"name":"" , and some has ,path":"" after that, so i removed the line and reload the rooms on my project.

So my solution was pressing CTRL+F inside the file on Visual Studio, find all "propertyId":{"name":"" on every room file listed on the warning window and then remove that line.

CONCLUSIONS
Investigating a little and doing some tests, it seems that this error, for this specific case, happens when you:
  1. Create a "Variable Definition" variable in an object,
  2. then change it in some instance of that object inside a room,
  3. and then remove this variable from the object in the "Variable Definition" tab.
and this causes GameMaker to remove the data for that "property", but not the line of code that contained that struct or variable definition.

Now, I don't know if this happens due to GIT or it will be a GameMaker problem. However I hope I have helped someone with this very specific problem, and thank you for reading!
 
Top