After restart, torrent is moved sometimes back to downloading as if a portion of it is missing
After BBT clean restart, some torrents (this one in particular happens often) which were downloaded 100%, get their progress reset, so they restart downloading.
The reset is not to 0%, but seems to be a random percentage each time.

This issue happens even if BBT is closed normally, and not force-closed (killed by task manager or windows shutdown). Right now it happened when i updated from B2.5.0.1_B10 to B2.5.0.1_B11. Other times it happened whenever i turned of BBT, and afterwards started it again, no update in between.
I noticed that before the torrent progress was reset, it got into different states: Allocating, then Recheck, then Allocating again, then Recheck again, then finally Downloading.
If i stop the download, then click force recheck (via that yellow button), the torrent is checked sucessfully, and it appears as 100% downloaded (which i believe it is correct)

I attached the debug file generated from BBT.
Java 15 (64 bit) Oracle Corporation c:\program files\java
SWT v4930r7, win32, zoom=100, dpi=96 Windows 10 v10.0, amd64 (64 bit) B2.5.0.1_B11/4 az3
Hmm, that's a weird one - is it always the same torrent that gets reset? Unfortunately the log file doesn't shown anything obvious, I would expect to see something about pieces failing hash checks but there's a lot of other crud in there that might have caused the log to cycle and messages get lost.
is it always the same torrent that gets reset
I'm not 100% sure if it happened only for this torrent and for none other, however I'm very confident that for this torrent it happened multiple times (and i do remember the percentage of completion to be different).
but there's a lot of other crud in there that might have caused the log to cycle and messages get lost.
can i increase log size or increase their number (i'm happy to have log folder of 1GB, just in case)?
The log file size can be set via Options->Logging: Maximum size of the specific log files in the 'logs' folder
I forgot to ask before, is this a new thing or something that's be happening a while?
Has been happening since i started "testing" BBT, roughly in February 2020.
and by testing i mean 100% using it on all my devices
I can verify the OP problems, I too very occasionally get the same thing happening, it seem to happen in my case only to a small subset of torrents (ie only some, but never others). Why I don't know, there doesn't seem to be any common factor (ie tracker, file size or file location)? It happens completely at random (may go weeks without, then every start up for a few days in a row then stops again).
Its annoying, but just so random, it would be seemingly hard to pin down. :(
I've ruled out memory/disk corruption on my 2 systems (gone so far as swapping components out and extensive testing of components).
Sorry I can't provide any insight ATM.
I think that is related to this other issue: https://github.com/BiglySoftware/BiglyBT/issues/1798 but on the other hand it can also be a file handling error.
@GDXN i'm not sure if they're related. For me this "state corruption" happens for torrents which are active (before restarting BBT).
What is the maximum number of "files opened for read/write" in BiglyBT options as is it to high or unlimited it can cause problems like that a file is market missing as BiglyBT cannot open it due access error ( 32 to 64 is a good compromise number depending of the ram ).
For me, that's 120.
That value normally don't have to cause any issue (normally the problem is for 0 or very high values that are dependent of the OS and any value lower than 256 can be considered low), I assume that you also have activated fast resume & enforce exclusive write access. Other possible cause can be the memory but I doubt that is your cause as you have to have bad RAM, bork the JavaVM options or have very little RAM and to much torrents.
bad RAM
Not the case i would argue, as i have multiple programs running 24/7 and they don't have issues.
bork the JavaVM options or have very little RAM and to much torrents
Not the case. Jvm has 2GB Xmx and the JVM options are BBT default. The only "not as standard" setting might be that i use JDK 15 to run BBT, instead of the default 8.
I assume that you also have activated fast resume & enforce exclusive write access.
yep. those seemed sensible (when i searched through all the BBT settings some months ago)