Bug report: errors after restart/auto-recovery

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, Bob Hansen, MudGuard

Post Reply
zhenya
Posts: 5
Joined: Fri Dec 15, 2023 12:11 am

Bug report: errors after restart/auto-recovery

Post by zhenya »

There have been several feature requests to make TextPad play nice with Windows restart manager and auto-recover unsaved documents/changes when Windows forcefully restarts (usually because of an update) and or power failure. The latest version of Textpad is able to auto-recover unsaved changes/documents. But this introduced several new errors.

Error 1: TextPad reports an incorrect path for a recovered document.
  1. Start TextPad with a new document.
  2. Add some content to the document without saving it.
  3. Restart the computer (or I suppose logging off will also work).
  4. Upon restart select the option to recover the unsaved document.
  5. Wait a while (I don't know the exact time it takes).
  6. TextPad will popup an error saying the document contains an incorrect path.
textpad1.png
textpad1.png (69.74 KiB) Viewed 3437 times

Error 2: TextPad erroneously reports that another application has updated the file with recovered changes
  1. Open an existing file.
  2. Make changes to the content without saving the changes.
  3. Restart the computer (or I suppose logging off will also work).
  4. Upon restart select the option to recover the unsaved changes.
  5. Wait a while (I don't know the exact time it takes).
  6. TextPad will report that another application has changed the file.
textpad2.png
textpad2.png (77.68 KiB) Viewed 3437 times

Note that these errors also happen in various combinations if a workspace contains multiple saved and new documents with recovered content. I was able to consistently replicate them. I also had an instance of the first error occurring without having explicitly recovered content (or after it was saved).
Last edited by AmigoJack on Wed Feb 28, 2024 7:36 am, edited 1 time in total.
Reason: list (and heading) formatting
User avatar
bbadmin
Site Admin
Posts: 878
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Re: Bug report: errors after restart/auto-recovery

Post by bbadmin »

The second issue occurs because TextPad checks that timestamps on files are different, rather than newer than the one loaded. This gives you the opportunity to revert to the unmodified original.

Will look into the first. It's occurring in Microsoft's code. Closing and reopening the workspace should work around it.
Manole24
Posts: 3
Joined: Tue Feb 13, 2024 10:52 am

Re: Bug report: errors after restart/auto-recovery

Post by Manole24 »

It's unfortunate to hear about the errors you've encountered, specifically the incorrect path and the erroneous report of other applications updating the file. Such issues can indeed disrupt the workflow. Considering these glitches, it might be helpful to communicate directly with TextPad's support team. They could offer insights into potential fixes or workarounds. Providing them with detailed steps to replicate the errors would aid in their troubleshooting efforts.
User avatar
bbadmin
Site Admin
Posts: 878
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Re: Bug report: errors after restart/auto-recovery

Post by bbadmin »

Does this happen other than after the monthly Windows Update has automatically rebooted your PC?
User avatar
bbadmin
Site Admin
Posts: 878
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Re: Bug report: errors after restart/auto-recovery

Post by bbadmin »

This happens if a workspace containing modified new documents is open at the time Windows Update automatically restarts the operating system. To work around it, either close or save the new documents. This will be fixed in the next release.
zhenya
Posts: 5
Joined: Fri Dec 15, 2023 12:11 am

Re: Bug report: errors after restart/auto-recovery

Post by zhenya »

Sorry for the late reply.

@bbadmin, looks like you got it. Just to clarify, you can replicate the issue on command, all you have to do is log off when there are unsaved documents, then log back on and wait. Great that it will be fixed.

Regarding the second issue. I understand technically why it happens. But this is a bug. Consider the workflow:
I log back on, and TextPad explicitly asks me if I want to recover unsaved documents.
I click YES.
At this point, it makes no sense for TextPad to notify me a second later that the document has been changed by another application. I don't see any scenario where that makes sense.
I guess you need to take a snapshot of the timestamps at the time of recovery and ignore it when checking for changes.
User avatar
bbadmin
Site Admin
Posts: 878
Joined: Mon Feb 17, 2003 8:54 pm
Contact:

Re: Bug report: errors after restart/auto-recovery

Post by bbadmin »

@zhenya, Regarding the second issue, you've made a convincing case so this will also be fixed in the next release.
Post Reply