Download is lost when Windows restarts

Bug #1828593 reported by Tim
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DC++
Fix Committed
Low
Unassigned

Bug Description

When Windows restarts or shuts down and DC++ hasn't been closed previously, when Windows starts up again and DC++ starts, whatever download progress is lost and it has to start from the beginning. What I'm saying is if DC++ receives a WM_CLOSE message, it remembers the progress of a download and exits, but if DC++ receives a WM_DESTROY message it forgets the download progress, exits and when DC++ starts up again, that entire download has to start from the beginning again.

Revision history for this message
eMTee (realprogger) wrote (last edit ):

I can confirm that the position of a segment being downloaded is not saved when WM_DESTROY / WM_ENDSESSION received vs. it is saved upon WM_CLOSE.

In case of segmented downloads are disabled this means the whole download progress is getting lost. Probably that's happening with the reporter.
However, the looks like the temp file is there in the unifinished downloads folder, properly closed and after a restart the rechecker (Recheck integrity menu item) can restore the queue item to the previous download progress state just fine.

The saving of the queue when WM_ENDSESSION is received will not save the position of running segments because the changes indicator bit is set either at the finish of a segment or when the connection is closed before has been finished.

With default settings this problem will not cause any great loss; when it does (in case of segments disabled) then it can be still recovered manually for e.g. large files with slow speeds.

Changed in dcplusplus:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
eMTee (realprogger) wrote :

Committed a fix that is trying to disconnect all users on shutdown and save the download queue after that.

Btw. there are a couple, maybe even more other things to check above the queue on OS shutdown :

#1 when the FileMover thread is active and moving a (large) file from one drive to another - in this case, the whole file will be lost queue wise; the file will remain in temp target but the queue item has already been finished and removed in this phase so... (advanced users can revive the file with the rechecker but we know it's not a widely known feature).

#2 hashing in progress - I haven't investigated this yet but when interrupted with app termination, probably the whole hashing session's index data gain will be lost, maybe even all the hashindexes added during the whole DC++ session - to be investigated.

Changed in dcplusplus:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.