• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!
  • 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.

Windows Very Odd Error

samspade

Member
In a project which was working and to which I made no major changes, I am suddenly getting two very unusual errors. The first error is this:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
at System.Collections.Generic.List`1.get_Item(Int32 index)
at GMAssetCompiler.GMInstance.(GMAssets , GMInstance , GMOverriddenProperty )
at GMAssetCompiler.GMInstance.(GMAssets )
at GMAssetCompiler.GMAssets.(GMProject , String )
at GMAssetCompiler.Loader.(String )
at GMAssetCompiler.Loader.(String )
at GMAssetCompiler.Program.(List`1 )
at GMAssetCompiler.Program.Main(String[] _args)
It shows up in the output window and the game refuses to compile. What causes it to occur is trying to use object variables in the room editor. I can put an object with object variables in the room, but if I make those variables editable, even if I do not edit them (e.g. leave them at their default values) I get that error.

I thought that was weird, so I ran the game without making them editable and got the second strange error. The game compiles and runs, but none of the objects are being created. I didn't notice this initially because none of the objects are drawn to the screen, but when inspecting in the debugger, the debugger shows a completely empty room. There's only one room, only four objects, and one script asset in the whole project.

I'm at a loss for what is going on. The only changes I made from when it did work to didn't is making two of the three objects and making them children of the first and giving them object variables.

I did try cleaning the cache.


Edit: I deleted the room and created a new room. GM now gives me a compile error saying: "Error : Could not find any rooms in the project - could be caused by project file corruption (check for errors on project load)" The IDE recognizes that the room exists.
1607889791182.png

Edit 2: More strangeness. I have version control on this project, so I checkout the last working commit. It gives me a blank project except for an empty room—which is definitely not what is actually there and I can verify that by opening the actual GM folder in windows explorer which has all the files it should. If I checkout a different branch (which I just happened to do in this project) there are no issues.

At this point, I think I can say it is bugged, but I don't know how or why or what to do to fix it, especially since GM won't even read its own folder correctly.

Edit 3: Exiting and reloading GM has the same results, but gives me the following message (which it won't let me copy and past so I have to post a picture). So it knows the resources are there but is unable to load them for some reason.
1607890388492.png
 
Last edited:

kburkhart84

Firehammer Games
I'm not currently having this issue, but I know I had a very similar issue during the beta cycle for 2.3, and it was eventually fixed. I'm guessing it wasn't fully fixed, and is something with the software, not something you have done wrong. Sorry I don't have a fix but I wanted to let you know.
 

samspade

Member
It's a small project and since all the code is backed up in a worst case I can just start a new project and then copy and paste everything over. At this point I do feel convinced it is a bug and want to report it, but I'm not sure how to or what to point to since as far as I can tell, it just suddenly freaked out.
 

Amon

Member
Send them the project as it is now and see if they can repro. That would be the best thing to do I think.
 

samspade

Member
Well, it was easy enough to "recover" the project by simply copy pasting 100% of the code from object to object in a new project. I opened the .gml files in a text editor and copy and pasted it into the correct events. I didn't want to import existing objects in case that was where the issue was. This was doable because the project is so small. Everything works as intended in the new project. I'll report it to YoYo and send them the project file. The only thing I can think of is that I changed the project's name at one point. But it was working after that, so I'm not sure if that did it, or if it was something else.

Does anyone know if there's an issue with sending the entire folder with the git repository in it (i.e. does the git repository itself contain my git password for example)?
 

kburkhart84

Firehammer Games
Does anyone know if there's an issue with sending the entire folder with the git repository in it (i.e. does the git repository itself contain my git password for example)?
I'm no expert on GIT(though I'm using it for my stuff). I don't think passwords are stored in the .git folders. That said, if you include it, you are making the file bigger, so I don't think its worth including.
 
Top