[BUG] Unclean shutdown of PDFX, sometimes clears many saved settings

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

JimmyD
User
Posts: 129
Joined: Sun Mar 27, 2016 7:01 am

[BUG] Unclean shutdown of PDFX, sometimes clears many saved settings

Post by JimmyD »

Unclean shutdown of PDFX, sometimes clears many saved settings, such as saved sessions, saved settings like "Generate Bookmarks from Page Text" and input box history from "Find and Replace Bookmark Text", etc.

This happened to me recently after I had to restart my Windows due to an update, when PDFX was still open. Toolbars and preferences were unaffected.

This also happened to me twice before over the years.

See also here are some related issues.

https://forum.pdf-xchange.com/viewtopic.php?t=5271

https://forum.pdf-xchange.com/viewtopic.php?t=35538
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7388
Joined: Wed Mar 25, 2009 10:37 pm

Re: [BUG] Unclean shutdown of PDFX, sometimes clears many saved settings

Post by Paul - PDF-XChange »

Hi Jimmy,

well the settings are stored in RAM until you close, which triggers writing them to the registry in HKEY_CURRENT_USER\SOFTWARE\Tracker Software\PDFXEditor\3.0\Settings

What I would ask you to do is export these to file as a back up that you can reload any time. It doesn't explain what happened, it sounds like the Editor closed without triggering that save, this can happen if the app is closed by the system or even a user via the Task Manager. Could that be the case here? That the Editor was not properly shut down?

Just like saving your settings to file, you can also export the entire reg key HKEY_CURRENT_USER\SOFTWARE\Tracker Software\PDFXEditor\3.0\Settings as a back up that can be imported to restore your settings.

Does that help?
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
JimmyD
User
Posts: 129
Joined: Sun Mar 27, 2016 7:01 am

Re: [BUG] Unclean shutdown of PDFX, sometimes clears many saved settings

Post by JimmyD »

Paul - Tracker Supp wrote: Tue Sep 06, 2022 2:34 pm well the settings are stored in RAM until you close, which triggers writing them to the registry in HKEY_CURRENT_USER\SOFTWARE\Tracker Software\PDFXEditor\3.0\Settings

What I would ask you to do is export these to file as a back up that you can reload any time.
Yes, I know how PDFX stores its settings and I regularly export them.

Paul - Tracker Supp wrote: Tue Sep 06, 2022 2:34 pmIt doesn't explain what happened, it sounds like the Editor closed without triggering that save, this can happen if the app is closed by the system or even a user via the Task Manager. Could that be the case here? That the Editor was not properly shut down?
Yes, I explained that in my post.
But I think PDFX should be be more resilient in these situations, and at least keep the previous settings intact, instead of clearing them completely.
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7388
Joined: Wed Mar 25, 2009 10:37 pm

Re: [BUG] Unclean shutdown of PDFX, sometimes clears many saved settings

Post by Paul - PDF-XChange »

Thanks for that,
But I think PDFX should be be more resilient in these situations, and at least keep the previous settings intact, instead of clearing them completely.
Well it is designed already to do this. If the settings were changed then that implies the registry was also changed. It should simply use whatever was there last time. The only reason not to that I can think of is if something other than our software changed the registry. Do you have any security software that may have done this? Certain AV and Malware apps can and do do this.

If this becomes an issue and repeats itself it might be worth setting up some registry monitor to catch the process that makes changes. If it is one of ours we will investigate, but from what I am seeing it shouldn't be possible.

You say it is very infrequent, perhaps keep an eye on this and it it becomes a repeating issue we can start digging deeper by using one of the free tools to monitor and catch what is causing the changes. I found a few compared here: https://windowsreport.com/monitor-regis ... es-windows
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
JimmyD
User
Posts: 129
Joined: Sun Mar 27, 2016 7:01 am

Re: [BUG] Unclean shutdown of PDFX, sometimes clears many saved settings

Post by JimmyD »

Paul - Tracker Supp wrote: Tue Sep 06, 2022 6:06 pm Thanks for that,
But I think PDFX should be be more resilient in these situations, and at least keep the previous settings intact, instead of clearing them completely.
Well it is designed already to do this. If the settings were changed then that implies the registry was also changed. It should simply use whatever was there last time. The only reason not to that I can think of is if something other than our software changed the registry. Do you have any security software that may have done this? Certain AV and Malware apps can and do do this.
I haven't run any 3rd-party security software since the Windows XP era, so I'm pretty sure the issue is caused by a bug in PDFX itself.
If this becomes an issue and repeats itself it might be worth setting up some registry monitor to catch the process that makes changes. If it is one of ours we will investigate, but from what I am seeing it shouldn't be possible.
Well, other people have faced similar issues too.

https://forum.pdf-xchange.com/viewtopic.php?t=5271

https://forum.pdf-xchange.com/viewtopic.php?t=35538
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7388
Joined: Wed Mar 25, 2009 10:37 pm

Re: [BUG] Unclean shutdown of PDFX, sometimes clears many saved settings

Post by Paul - PDF-XChange »

Hi Jimmy,

I can ask the devs what happened in those two cases, but I am not as sure as you that this was the Editor doing this. The Editor will use defaults unless there are settings in the registry. An empty reg key means "Use the default value" for all settings. So the question is, what overwrote the registry.

You are right that it is a possibility the Editor itself caused this. The only way I am aware of to determine what caused the change is to monitor the registry for changes. I am however not sure if the monitoring will reveal the process that caused the changes. The few tools I tested could show the changes made but not identify what process caused the change.

I will consult the devs about this and see what they think.
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com
User avatar
Paul - PDF-XChange
Site Admin
Posts: 7388
Joined: Wed Mar 25, 2009 10:37 pm

Re: [BUG] Unclean shutdown of PDFX, sometimes clears many saved settings

Post by Paul - PDF-XChange »

Hi again Jimmy,

the devs have responded that they will make some changes to what we do when saving the settings to the registry to make it more reliable.

RT#6220: Improvements when saving settings

I hope that helps.
Best regards

Paul O'Rorke
PDF-XChange Support
http://www.pdf-xchange.com