Jump to content

Paint.net crashes every time session data uses up all of the C: Drive's space


Recommended Posts

As most hobbyists with mid-end computers can relate, the C drive does not have a lot of space, especially mine, which usually only has 1 GB free of storage when there are no temporary files. I also work on high resolution images for hours and hours on end without saving due to superstition with a hope that I would be able to save when I am finished. As such, I frequently run into crashes every time I work for a long time on these large images and I am looking for a way to solve this. Is it possible and efficient to redirect the session data folder into the D drive where I have more space even though I have heard it is a slower drive, and if it is a viable solution, how do I do it? 

 

Also, since these sessiondata folders are so large, how can it be that it cannot be reopened by paint.net and restored? I read an answer by an administrator on another post that these session data files cannot be read by any program, but then how is it read while the session is still active? Is there truly no way to restore a session from these large folders?

 

Lastly, the very obvious feature to (at least) implement if redirecting session data folder to D drive is impossible/unviable, is preventing you from making any changes to the image until there is enough free space on the C drive. It should be a pop-up similar to when you're trying to copy to clipboard when there is not enough free space on your drive. It shouldn't crash. It should never crash.

Edited by iSyriux
Feature implement
Link to comment
Share on other sites

What @BoltBait said, plus:

 

1 hour ago, iSyriux said:

As most hobbyists with mid-end computers can relate, the C drive does not have a lot of space, especially mine, which usually only has 1 GB free of storage when there are no temporary files.


This is a ridiculously small amount of free space on your Windows primary drive. You need to solve that problem.

Are your C and D drives on two separate physical disks? If so, you need to buy a larger disk for your C drive. Search online for transferring Windows to a new disk.

However, it is perhaps more likely that your C and D drives are 2 partitions on the same physical drive. In which case you can repartition the space allocated to C and D.

There are lots of free partitioning tools available; for example:

 

https://www.resize-c.com/

https://www.paragon-software.com/free/pm-express/#features

 

There are lots of others you could look at.

Link to comment
Share on other sites

My questions still haven't been answered. First, is it viable to relocate the sessiondata folder to the D drive, which is a separate disk, since I am using a desktop computer, even though I heard it is slower? If it is viable, is it even possible, and how do I do it?

 

Secondly, is it absolutely impossible to restore sessiondata, even though these files become gigabytes large, and why would it be impossible if it is?

 

And lastly, why can't there be a pop-up saying you cannot perform this action until the disk has enough space instead of just straight up crashing? I mean, copying to clipboard already has this pop-up.

Link to comment
Share on other sites

Right now it's not possible to redirect the folder that Paint.NET uses for storing session files like history data. There just hasn't been much demand for such a feature, but it probably wouldn't be a huge task to add a registry key to let you configure it (adding UI would be a larger chunk of work, and probably not necessary since this is very niche). You might also be able to use some kind of low-level file system junction or hardlink to force it to redirect to some other location, but I've never done that and I have no idea how well it would work, if at all. Worth a shot though.

 

It is not possible to restore session data. The app is not architected for this case and it would be an incredible amount of work to redesign large parts of the app to support pulling that state in at app startup, verifying its integrity, blocking it if the app version doesn't match, etc. etc. etc. In addition, not all of the data for history entries is even stored in those files. Only the "big" parts are, like bitmap diffs and selection data. Other parts, like for "you moved layer 3 up by 1 slot", are not stored on disk because there's no need to serialize a handful of bytes -- it just resides in memory. So that would all need to be changed. It's all very doable but it's also just a ton of work and there's a lot of other stuff ahead of it in the priority queue. You'll probably also ask "well why can't it ...", well I'm not answering that, I'm just detailing how it works today. Old engineering decisions from when nobody had even heard of "Paint.NET" are still with us today and are being slowly untangled.

 

Windows is supposed to give you a warning when your disk space gets too low. Paint.NET can't currently do this because it often happens in the middle of code that is not able to surface an error to the user that wouldn't cause more problems. There is no "abort or retry" capability in these sections of the code. I've looked into what it would take to rearchitect all the necessary systems to support this, because I do badly want things to work this way (esp. to support recovery in the event of crash/reboot/power loss, but it would/will be an enormous amount of work. Other things are just ahead of it in the priority queue.

 

My pragmatic advice for right now is: save early, save often. Free up disk space on C. You already know what the limitations are for your system, the software, and the way you use them, so it's a good idea to make accommodations for that. By not saving, and by keeping so little space on your C drive, you're forcing a crash to be inevitable right now. Things will improve over time -- both for Paint.NET, and because eventually you'll certainly have a newer computer with more disk space -- but that's just the reality of today.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

On 6/12/2022 at 12:55 PM, iSyriux said:

And lastly, why can't there be a pop-up saying you cannot perform this action until the disk has enough space instead of just straight up crashing? I mean, copying to clipboard already has this pop-up.

 

To elaborate on this, operations like "copy to clipboard" can easily have this popup because it's not a big deal if the operation fails and isn't performed. It's just packaging up data and throwing it over the wall, so to speak.

 

For many actions that go into the history, the story is different. Some actions make multiple edits to the image that are tracked by (hidden) history entries that are combined into the one history entry that you see in the UI. Let's say an action actually comprises 3 of those edits or "hidden" history items. If the 3rd one fails, what do you do? Let's say you ask the user if they want to abort or retry. If they retry, then we just keep retrying the 3rd edit, and keep re-asking the user if it fails. If the user wants to abort (aka cancel), then we actually have to undo the 2nd and then the 1st edit in order to get back to the original state of the image. Undoing that edit is also something that can fail! We end up in this situation where we're going around in this combinatorial circle of failure and it's a corner case that's hard to debug and reason about. This can be solved by making certain simplifications to the system (like only having "retry" as an option, not abort/cancel), or by buffering those edits in a better way somehow, but again ... tons of work, and it's just not at the right spot in the priority queue yet.

The Paint.NET Blog: https://blog.getpaint.net/

Donations are always appreciated! https://www.getpaint.net/donate.html

forumSig_bmwE60.jpg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...