• 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.

Question - IDE Lost work when laptop shutdown

leveller

Member
Earlier today I was working on a project. I ran the project and was happy with what I had created. I chose to Save the project from the File menu, and then shutdown my laptop.

Just now I had my laptop open and working on my project. I failed to notice the battery had drained and the laptop shutdown. I plugged in the charger and turned on the laptop to carry on.

I boot up GMS2 and chose to Open my project.

The object I was last working on has vanished. Bear in mind, the object existed in my previous save that I had made during the day. I was working on the object. My laptop died. The object is gone ...

I just chose to Run the project as is, to see if the object was hidden from view somehow, and I am looking at a GMS2 error notification report:

GameMakerStudio AssetCompiler has encountered a problem. We are sorry for the inconvenience.
Object reference not set to an instance of an object.
Send Error Report.

Which I have done.

There was one reference to the object in my room. I deleted that. I re-ran the project and got another error report.

Now, because of the power loss, I have lost about 3 hours of work (1 hour ealier today, and 2 tonight), but worse than that I cannot run the project! I do not mind any of this because it is still Beta, but obviously this needs addressing. My work is totally repeatable and simplistic when compared to the real game makers out there. I dread to think about someone losing a really complicated object.

The weird thing is losing the object ... why did it get deleted on a power loss?!
How do I release the project to run again?

Better yet, how do I revert back to how the project was before the power loss?
 

leveller

Member
I appear to have also lost the room dock panel that was on the left side of the room. The dock panel where we can change the size etc.

I don't know (so far) how to get it back .....

Although, I cannot run the project at all without the Error Report popping up so I guess that is the least of my problems!

If I cannot get the project back up and running then I think it will be better for me to carry on with GMS1 for the time being - but I await help & advice to see if you guys know some tricks to rectify this.
 
Last edited:

rwkay

YoYo Games Staff
YYG Staff
If you lose a window and cannot get it back then just hit reset layout in the Layouts -> Reset Layouts menu option (when a project is open)

NOTE: This resets all the layouts back to default

Russell
 

leveller

Member
Thanks Russell, that worked great bringing back the missing panel.

I still cannot use my small project and so I have now gone back to GMS 1 until I see a fix mentioned in future release notes.

Will YoYo look at power drops, shutdowns and losing objects, and lost projects as a result?

Best of luck with bug hunting!
 

Arjailer

Member
Apologies if you know all this already, and it's too late for this time, but to allow reverting back to previous versions of projects I'd suggest looking into source control (things like Git or Mercurial).

Source control let's you go back to previous "checkpoints" in your project - so as long as you add all of your GM project files to the source control and commit your changes regularly (i.e. make checkpoints) you can pick up from previous checkpoints at any time.

If you use a hosted source control service you can also have an off-site backup of your project and can easily pull changes between different computers if that's relevant.
 
Last edited:
  • Like
Reactions: Yal

Yal

🍋 *lemon noises*
GMC Elder
Git's command line interface is amazing when it comes to backing up changes quickly, I might add... takes like 10 seconds even if you type everything out each time you make a backup.

git add -A
git commit -m "added some new objects"
git push origin master
<repository password>
 

leveller

Member
Thanks for the tips guys. I have been using Google Drive, by copying and pasting a project into the Google Drive folder. MS Onedrive was painfully slow.

Ideally it would be nice to tap a shortcut which then checks the contents of my project folder versus the content on whichever cloud service and updates files and folders that are missing or have been updated.

Since this problem tpwith GMS2, in GMS1 I have reverted back to saving versions on an hourly basis. Overkill for GMS1 but it looks like good practice in preparation to going back to GMS2.
 

Arjailer

Member
Honestly, look into GIT or Mercurial - those 4 lines Yal posted will look for changes, commit the checkpoint and sync it up to a server. Put them in a batch file - and run it as required :) No need for a custom solution - source control is designed for exactly these situations :)

I'll stop preaching now :)
 
  • Like
Reactions: Yal

gnysek

Member
Honestly, look into GIT or Mercurial - those 4 lines Yal posted will look for changes, commit the checkpoint and sync it up to a server. Put them in a batch file - and run it as required :) No need for a custom solution - source control is designed for exactly these situations :)

I'll stop preaching now :)
You can use visual tools like TortoiseGit, TortoiseHg, Source Tree, GitKraken, Github for Windows, etc... They will also try to merge in some cases (but GMS2 structure is a big fail for merging).
 

Arjailer

Member
You can use visual tools like TortoiseGit, TortoiseHg, Source Tree, GitKraken, Github for Windows, etc... They will also try to merge in some cases (but GMS2 structure is a big fail for merging).
Yeah, I use TortoiseHg myself - been using it at work for years, so very comfortable with it now. It works fine with GMS2 as a single dev - not sure how it'd work in a GMS2 team, but at work I work in a team of around 20 (non-game) devs working on a reasonably complex codebase (~1.8 million lines of code, spread over nearly 10,000 files) with up to a dozen branches going on at any one time and TortoiseHg (mostly) works really well for us.

What is it about GMS2's structure that makes merging difficult? (haven't really looked at it closely yet)

Just thought that, even if someone doesn't want to really learn a new GUI tool then a minimal batch file that does a commit and push would be a useful tool :)
 
Top