D'Andrëw Box
Member
Hello 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?
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:
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:
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:
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!
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:
- Projects imported from GMS1 to GMS2.3, or
- 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:
- YYP Maker.
- The official YoYo Games guide on how to remove the "Blank IdReference found" warnings.
- Remove 1 by 1 sprites until you find less error messages.
- Revert to the last commit. (this could fix it too but if you have this problem for so long like me, this is a no no)
- Re-import your corrupted project into a new project.
- Check all "Propieties > Viewports and Cameras > Object Following" on your rooms.
- Deleting all your project and starting again (?)
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:
- Create a "Variable Definition" variable in an object,
- then change it in some instance of that object inside a room,
- and then remove this variable from the object in the "Variable Definition" tab.
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!