This less-known issue may corrupt your project ⚠️

0 favourites
  • 5 posts
From the Asset Store
The game will give you a dog that appeared and you must say if he appeared more, less or equal.
  • TL;DR

    Construct 3 doesn't handle missing/unwanted files within the project folder correctly, causing "corrupt project" errors. Suggested solutions include saving all files or introducing a "Force Save" option.

    (The context of the issue is when you save as a Project Folder, not as a C3P)

    While saving a project, Construct 3 intelligently detects and saves only the specific changes made within a project folder. While this smart save feature is generally a time saver, it can lead to unexpected issues, especially when collaborating on projects or using version control systems like Git.

    Consider this scenario: I have a project located at "C:\MyC3Project\src," I make some changes to Layout 1 and hit the save button. Construct 3 detects my changes and saves only Layout 1. At this point, the save button greys out, indicating that my project is saved.

    Now, for the example, I decided to delete all the contents within the "C:\MyC3Project\src" folder while my project is still running in the browser. Later, To save it again I make a few minor edits to Layout 1 and hit save. In this situation, Construct 3, only saves the changes in Layout 1 (and some other UI states files, please refer to the below image), C3 ignores the fact that the rest of the project files are missing, Consequently, Since I saved the project when I attempt to reopen the project later time, I'll be greeted with a dreaded "corrupt project" warning.

    The example described above represents an extreme case, but Projects using systems like Git can sometimes face problems when syncing changes, discarding the changes, and When multiple members work on the same project, there's a higher chance of conflicts. You will be greeted with an error message if you are not careful.

    I have encountered this issue in the past (as have others), but I couldn't figure out why it happened. Today, when it happened again, I searched for the root cause and discovered this issue.

    Here are the discussions that may be related to the context I'm discussing:

    construct.net/en/forum/construct-3/how-do-i-8/failed-open-projectcheck-163195

    construct.net/en/forum/construct-3/general-discussion-7/found-bug-c3-178294

    Again, it's important to note that many people are not aware of this issue.

    To resolve this issue, the C3 should perform the following actions, in short, to update the Save button's functionalities.

    1. Examine all files present within the project folder.

    2. Save all files within the folder, including those that might be missing but are supposed to be there.

    3. Replace any files that have been altered with the updated versions.

    4. Remove any files that are no longer relevant or within the scope of the project folder.

    This solution would ensure comprehensive project integrity and eliminate the potential pitfalls associated with missing files.

    However given the limitations that can arise since Construct 3 is running in a web browser, where it may not be feasible to perform extensive file checks, because it may/can lead to a delay in the save operations, which hinders the user experience, So in that case I propose an alternative solution. To address this challenge and ensure project consistency, I suggest the introduction of an additional save option like "Save All" or "Force Save."

    This option is self-explanatory, it would initiate the following process:

    First, it would completely clear the contents of the designated project folder, such as "C:\MyC3Project\src."

    Then, it would proceed to save all project files into the emptied folder, ensuring a fresh and comprehensive save operation.

    In conclusion, implementing this feature would provide users with peace of mind and protect their projects from unforeseen file deletions or corruption. It's a crucial enhancement, especially for those working collaboratively or with version control systems. By offering this Construct 3 can further improve the reliability and stability of its project folders.

    Thanks for the reading, please share what you think about this.

  • Posted it on GitHub/Construct-bugs

    github.com/Scirra/Construct-bugs/issues/7412

  • First, it would completely clear the contents of the designated project folder, such as "C:\MyC3Project\src."

    This sounds very dangerous if the editor is then unable to save the project for some reason.

    It should probably instead overwrite the existing files, or create a temporary copy to restore from.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Actually, if you look at it another way, it is the same thing when you save the .c3p file. .c3p file is nothing but a zip file, so whenever we save and replace c3p, construct creates a fresh .c3p, delete the previous one, and paste the new one, this is what happened in a nutshell.

  • Actually, if you look at it another way, it is the same thing when you save the .c3p file. .c3p file is nothing but a zip file, so whenever we save and replace c3p, construct creates a fresh .c3p, delete the previous one, and paste the new one, this is what happened in a nutshell.

    That's not the same as deleting all of your game's assets though, right? It just sounds way too risky, especially if you don't have any backups.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)