One of the pencil2d people, pleases see this

i logged in to pencil2d one time, and i worked on like 2000 keyframes, and when i loaded my project, about 80 percent of all my work was just blank white. where did it all go???

@BusyBeingLazyFridge There are unfortunately many possible issues that could have caused this problem. I’m afraid if you don’t have an existing backup or previous available, your work might not be recoverable :pensive:

The problem with white frames appearing is that most likely Pencil2D source files were deleted from hard disk before it could save them all, or the saving process was interrupted silently by the operating system or an third party app. I explain more about it on the other section…but basically there’s not much we can do :sweat:

That said you can still try following the guide we have linked below. From your description you could try the experimental recovery methods (Point #7) which shows how to use file recovery software to try to find at least one more drawing (Pencil2D saves the raw frames as PNG images)


WHY FILES MIGHT BE LOST?

Pencil2D by default uses temporary files for each file per work session. If you open a file it will unpack them on the temporary folder with a unique name.

When you “save” the temp files will be bundled as a PCLX file.

Only after you close Pencil2D normally, the temp files will then deleted from the temp folder normally (since you already saved)

If Pencil2D crashes, temp files should be retained on the system until you reopen the project.

Unfortunately since every case of the “white frame” problem is unique to each computer, we really never know what could have caused the wipe in the end.

Although this happens rarely, when it has happened we have always asked users to make sure they create backup copies of their work because to my knowledge, this is a problem that is caused mainly by external interference.

From trial & error we have identified some potential CAUSES for work loss, which I’ll share with you along what can happen:

  1. IF Pencil2D was being used on a new file, but you never saved the file at least once. Pencil2D will crash and the work will be lost. It’s impossible to recover in this case.

  2. Your hard drive was full and Pencil2D “tried” to save but it couldn’t save most of it. I’ve seen this happen. Lost work won’t be recoverable here particularly if you closed the software.

  3. IF Pencil2D was used in operating systems with very restrictive software permissions (e.g managed computers from school or work). The software might malfunction opn a guest account or an account that does not have administrator priviledges, as it was observed at least once that the software would not be able to pack, unpack or even convert the animation files to other media (export) bc the process was halted (probably identified as a P.U.P Potentially Unwanted Program).

  4. Using Pencil2D from a volatile, removable or cloud storage instead of hard disk, may sometimes cause issues when finding the resources needed to function.

  5. Saving to any location other than a hard drive might cause issues while unpacking or packing the files because losing connection could compromise the files being send to the PCLX (though I think they are sent to RAM memory first then to the drive, but I’ll have to ask)

  6. Having a “file cleaner” or antivirus software that CONSTANTLY wipes the temp folder or has an overzealous real time shield, will affect saving files.

I’ve seen it happen that people thought they saved the files, but it only saved until a certain part. In this case it’s not possible to recover what was not saved.

  1. “Closing the file immediately after saving”. While it’s not proven this can cause problems, I’ve had this happen to me before with other software that’s similar to Pencil2D and once a user had an apparently similar issue IIRC. Closing the software means half of the recovery techniques we know will no longer work.

  2. The most closely documented issue was from a user that constantly lost their work when they had a lot of frames imported and modified in a single file.

    After a lot of back and forth we recommended them to save the file as PCL (File > Save AS > change filetype to *.PCL [legacy format])

Using this file format, forces Pencil2D to ALWAYS save the animation project resources next to the actual project file instead of the temp folder while you work (so it’s arguably protected against Windows or MacOS periodical or potential temp file removal). After doing this they never experienced this problem again.

ALTERNATIVES TO PENCIL2D

Honestly. Even in this modern age, the free alternatives remain the same. But if you want to use open source apps to replace Pencil2D, try the following in order of complexity:

  • Krita
  • Opentoonz / Tahoma2D
  • Blender

If you can invest money into it, then I suggest (in order of price):

Saving to any location other than a hard drive might cause issues while unpacking or packing the files because losing connection could compromise the files being send to the PCLX (though I think they are sent to RAM memory first then to the drive, but I’ll have to ask)

Pencil2D sends the data to a file pointer, and it’s entirely up to the operating system to manage actually writing that data to the file system. Almost always, the file system will buffer the output for performance reasons. Buffering in this context means that a chunk of RAM is allocated and data is added to that chunk as it is received from the application. When that chunk is filled, or after a certain amount of time, or if you’re running low on memory, the operating system will write that data to whatever storage medium you’re targetting and clear the RAM chunk so it is ready to receive more. When application closes the file pointer, the operating system will write the remain data at some point after that. This is a simplified explanation, but it will do for this discussion.

The situation where this can go wrong is when you have detachable media device (ex. a thumb drive, a network share, etc.). The operating system may report to the application that the file has been saved, while in reality some or all of it is still in RAM. If you then remove that device suddenly, or hard-reset your computer, the remaining data can’t be written to the device. This is why you usually have to select an “Eject” option before removing a device, and choose “Shutdown” instead of yanking the plug out of the wall. If the device does not have an eject option, that usually means that the operating system is not using a buffer to write data to that device and instead writes everything immediately.

“Closing the file immediately after saving”. While it’s not proven this can cause problems, I’ve had this happen to me before with other software that’s similar to Pencil2D and once a user had an apparently similar issue IIRC.

I have actually recently discovered an issue like this in the latest nightly build, and will be looking into it further or reporting it when I get a chance. Because of the way Pencil2D saves pclx files, it’s actually more likely that the project file will be the complete previous save rather than a corrupted partial new save in this situation. Ideally, as soon as the save progress dialog is closed, you should be able to quit the application safely, but that may not be so at the moment.

After a lot of back and forth we recommended them to save the file as PCL (File > Save AS > change filetype to *.PCL [legacy format])

Using this file format, forces Pencil2D to ALWAYS save the animation project resources next to the actual project file instead of the temp folder while you work (so it’s arguably protected against Windows or MacOS periodical or potential temp file removal).

While the .pcl format should be immune to temp file removal issues, it has tradeoffs. It is much easier for a user to accidentally delete, rename, or separate the .pcl file and the .pcl.data directory, or alter the .pcl.data directory contents and cause the .pcl file to become out of sync with the data directory (Pencil2D should usually handle this alright, but this is definitely not a supported use case). Even ignoring user-induced errors, since the .pcl format is less widely used and tested, it is more likely for there for bugs to arise in Pencil2D loading or saving to it than to a pclx. These are the reasons why I personally don’t recommend saving projects in the .pcl format to people unless they are having recurring issues with project corruption.

2 Likes

@scribblemaniac Thx for clarifying those points. Appreciated :+1:

I hope the issue you found recently is easily fixable. Thank you for looking into it!