Sharex: Program doesn't save settings on reboot.

Created on 20 May 2015  ·  62Comments  ·  Source: ShareX/ShareX

I've rebooted my computer twice while using the program after going through all the settings and getting it working how I want it to, but right after the reboot, everything is undone. Safe to say I won't be using this program until it's fixed because it takes so much time to fine tune all of the settings.

Bug

Most helpful comment

This issue can still happen. If you have the program set to start on startup, and you do a bunch of fast reboots/windows crashed, the settings will reset, despite you not even touching the program.
Really annoying if you are doing a overclocking session and your settings keep resetting.

All 62 comments

Even when each setting windows or main window close it saving settings. You can check debug log to see it yourself. So I don't know why it not saves for you.

I think I know what's going on. I had described problem when set up specific personal folder for ShareX in Application settings. Meanwhile in other utility I set up the same folder for automatic cleaning. Therefore ShareX settings removed every time during the deleting files by the utility trigger. I think it is not obvious that setting "ShareX personal folder" affects to ShareX user upload settings.

I could reproduce with ShareX 10.0! The program settings saves fine. But the dropdown list on the side of the application. Those settings don't save on reboot most of the time!

People could reproduce it 8 years ago in ZScreen too. And still I have no idea why in few people Windows not waits for all applications to close before shutdown. Because Windows terminates ShareX before it can save settings I think.

I will reopen this issue in case maybe someone having this issue in his software too and found solution to it.

On Windows 10 Ent. 64bit and ShareX 10.1, this issue seems to happen everytime.

Can I manually modify the settings anywhere? (doesn't seem to be in %appdata% as most programs do these days)

Many people reported here in Windows 10 upgrade their Documents/ShareX folder have ownership problems therefore ShareX couldn't save.

Thank you for the response.

I had a fresh install of Windows 10 though. (64bit Enterprise, formatted my drive before installation)

When you close ShareX manually is it saving settings?

No.
I also had process monitor (from sysinternals.com) turned on,
and I didn't see any relevant file access events either.

procmon screenshot

Can you check Debug -> Debug log is there any error.

Sorry, but can you point me to it?
I don't know where the debug log is.

I suppose there's a switch somewhere? or?
Sorry for being noobish...
Tray Right Click Pic

Seriously?

Do I need to build ShareX from source?

It is in main window.

Oh I see... Now I really feel stupid.
I've actually never dbl-clicked the tray icon.

Okay, so here's what I got.

No error messages to begin with.

  1. When I set the settings through the right-click menu, nothing happens (ie. Nothing shows up in the log)
  2. When I set the settings through the Main window, nothing happens until I close the main window. (The settings are also successfully saved this way)

The log

2015-08-24 06:32:55.418 - ShareX 10.1 started
2015-08-24 06:32:55.418 - Operating system: Microsoft Windows NT 10.0.10240.0
2015-08-24 06:32:55.418 - Command line: "C:\Program Files\ShareX\ShareX.exe" -silent
2015-08-24 06:32:55.418 - Personal path: C:\Users\lnishan\Documents\ShareX
2015-08-24 06:32:55.419 - Git: https://github.com/ShareX/ShareX/tree/ffb8d351394653e32418ed7e5555982158ee0426
.
.
.
2015-08-24 06:37:04.052 - ApplicationConfig save started: C:\Users\lnishan\Documents\ShareX\ApplicationConfig.json
2015-08-24 06:37:04.054 - HotkeysConfig save started: C:\Users\lnishan\Documents\ShareX\HotkeysConfig.json
2015-08-24 06:37:04.055 - UploadersConfig save started: C:\Users\lnishan\Documents\ShareX\UploadersConfig.json
2015-08-24 06:37:04.184 - UploadersConfig save successful: C:\Users\lnishan\Documents\ShareX\UploadersConfig.json
2015-08-24 06:37:04.189 - HotkeysConfig save successful: C:\Users\lnishan\Documents\ShareX\HotkeysConfig.json
2015-08-24 06:37:04.226 - ApplicationConfig save successful: C:\Users\lnishan\Documents\ShareX\ApplicationConfig.json

So it might be a minor bug with the right-click context menu I guess.

Both main window and tray menu using same function to open Settings windows and in both cases it saves settings when window close.

The settings are saved only when "Main" window is closed.
Exiting "Settings" windows does not trigger that.

Exiting settings window trigger that.

I'll do a screen recording. Hold on... (I'll edit this comment when completed)

You don't need to do screen recording i know how saving works.

Changing the settings through the tray menu doesn't leave any logs, nor does it change the config file.

I don't know the structure of ShareX.
My guess is the Settings Saving function is probably binded to the wrong event (on main window close, instead of on setting window exit), given your description of it.

Nothing is wrong...

It saves when Settings windows closed or Main window minimized to tray or ShareX itself closed. I already excessively saving unlike other softwares.

It saves when Settings windows closed

Maybe you can check this part.

Because if I close settings page AND minimize Main window,
I'm seeing only 1 batch of logs
image

I already checked it saves when I close window.

Then it's really really weird I guess...

Thank you for taking time to look into it regardless...

Is this a joke? So this problem exists since half a year and still not fixed? The program is useless if theres some bug with saving the settings. Give a simple option to export and import settings to json/csv/xml file.

@makedir this is a small problem that affects a small amount of people. One
that has proven difficult to replicate.
On Oct 15, 2015 2:40 AM, "makedir" [email protected] wrote:

Is this a joke? So this problem exists since half a year and still not
fixed?


Reply to this email directly or view it on GitHub
https://github.com/ShareX/ShareX/issues/702#issuecomment-148296210.

Give import/export option, give option to select db/config folder, or put it under documents not in appdata.

This problem exists for last 8 years and it is not fixable. Also I can't reproduce it too.

Cant reproduce?? I just installed it normally on a normal Windows 10
installation, and there it happened...

On 15 October 2015 at 09:08, Jaex [email protected] wrote:

This problem exists for last 8 years and it is not fixable. Also I can't
reproduce it too.


Reply to this email directly or view it on GitHub
https://github.com/ShareX/ShareX/issues/702#issuecomment-148300217.

I'm using ShareX for last 8 years and don't remember my settings reset while shutdown/restart Windows.

And I didn't put it under appdata. It is in documents. Also you can select config path too.

@makedir I've used ShareX on two desktops, one laptop, and one tablet (Atom processor) with WIndows 10 and had no issue, local accounts and a Microsoft account.

My best guess would be a permissions issue. Try opening ShareX as an administrator (close it first though), set your settings, close it from the taskbar (right click > quit) and then restart.

My guess is Windows 10 shut downs too fast and not let ShareX complete its setting save. Dunno why this happens too. Normally it is supposed to wait for process to close.

I would second @zikeji 's guess.
From what I observed, it does look like a permission issue. (if we rule out the possibility of bugs with source code)

@Inishan From when I was writing an uploader for ShareX their logging / debugging backend is fairly catch-all. If any bug caused it'd it would have been fixed right now.

The destination settings window saves when you close that window, but the rest save when the application is closed completely. It may be worthwhile to add a button / menu item somewhere to force save the running settings or save them whenever a setting is changed.

I was think about adding timer to save like every 10 minutes but then it won't be clean solution.

Why is there no save button or warning if closing window does not save
settings, like normal software does? As good as the program is and I really
like it, it has tons of bad human machine interaction designs. Or message
that settings were saved. Also no option for config folder. Or option to
put configs in local documents folder. Also I did start the program as
admin the first time which did actually mess things up in the first place I
assume not saving the configs with the correct user rights. And as an
offtopic... I just saw the "tools" like irc, ping, hash, twitter and so one
and I was... really?? Why does a screencap tool has included irc clients,
ping tester, dns tester, twitter client, and whatsoever... Was the dev
really that bored? Also option "index folder" is really bad named and no
one can know what it does until it is too late and automatically uploading
your private files so pastebin...

On 15 October 2015 at 21:50, Jaex [email protected] wrote:

I was think about adding timer to save like every 10 minutes but then it
won't be clean solution.


Reply to this email directly or view it on GitHub
https://github.com/ShareX/ShareX/issues/702#issuecomment-148502317.

Why is there no save button or warning if closing window does not save
settings

The following menus save once you close their respective menu:

  • Destination settings...
  • Applications settings...
  • Task settings...
  • Hotkey settings...

So the majority of the settings do save when you need them to.

But the settings in these menus:

  • After capture tasks
  • After upload tasks
  • Destinations

    • (excluding Destination settings...)

Do not save until you completely shut down ShareX. You can check the debug log to see when particular settings are saved and test for yourself.

As good as the program is and I really like it, it has tons of bad human machine interaction designs.

This is superuser software, it's meant to be powerful. In fact, I would say the human-machine interaction is better than other software I've used for similar purposes. It's all laid out very plainly, capture captures, upload uploads, etc.

Or message that settings were saved.

Click Debug and then Debug Log to see when it gets saved.

Also no option for config folder. Or option to put configs in local documents folder.

Now I'm starting to think you're just trolling us. Config folder by default is in your Documents/ShareX folder, AND you can change that location for the hotkey settings and the uploaders settings (granted it's missing tasks and application settings).

Also I did start the program as admin the first time which did actually mess things up in the first place I assume not saving the configs with the correct user rights.

Oh man that would have been nice to know a long while ago.

  • Go to your documents folder, find the folder named "ShareX", delete it.
  • Uninstall ShareX.
  • Install ShareX.

See if that helps.

And as an offtopic... I just saw the "tools" like irc, ping, hash, twitter and so one and I was... really?? Why does a screencap tool has included irc clients, ping tester, dns tester, twitter client, and whatsoever...

Major flaw in your logic there: ShareX is not "screencap software", it's sharing software. Link sharing, file sharing, text sharing, & image sharing. Those tools are just to allow powerusers more functionality. If you want to automatically share on your favorite IRC channel, automatically share to twitter, etc. I agree the DNS changer & ping tester are kind of random, but when you're dealing with uploading stuff they are relevant.

Oh man that would have been nice to know a long while ago.

  • Go to your documents folder, find the folder named "ShareX", delete it.
  • Uninstall ShareX.
  • Install ShareX.

That won't fix it unless you terminate the process immediately after install.

Long story short: the ShareX installer runs ShareX as an administrator instead of the currently logged in user. Any (config) files that didn't exist before that will be owned by the administrator account, effectively "disabling" (config) saving.

This can not be reproduced on a system where the UAC is disabled.

When task completed if there is no active task going on (if this is last active task) then ShareX will save all settings async now. This way even if save fails in Windows shutdown still you will have up to date settings. I don't like frequent saves like this but I don't see any other solutions if Windows not let ShareX to save settings while shutdown happens for few people. Especially this system is handy for people who using %i in file naming, so %i number will save after each task, otherwise if save fail in shutdown %i won't be up to date. But also gonna be annoying to see save settings after each tasks in debug log.

Not sure if related, but the program fails to save its settings (any of them) if the settings file is for some reason hidden.

Just had this happen on Win10 after first time install. Had set custom URL shortening as well as FTP upload, really can't be arsed to re-do them since they were (with other custom settings) complicated.

Just checked other settings and can verify what @hmksq said about it being the dropdowns. Sadly, my custom FTP and bit.ly settings were also wiped. Seems to be Destinations doesn't get saved.

Same issue here. FTP settings are intact shortcut intact, but some other settings lost. Sorry I wish I had time to be more precise. Do you need a log or something to repro this bug?
It happens on Reboot of Windows 10 x64 1709 / ShareX v12.1.1

This will keep happening because the program runs with admin permissions after you install/update it.

Once you restart ShareX it will not be able to update any of the configs that were created as an admin, because you lack the permissions to do so.

This has to be fixed in the installer, to make sure that ShareX runs as the logged in user and not as an admin.

My path settings aren't saved, even as admin.

3668 fixes the problem about not be able to save settings on Windows shutdown.

Sorry, what is the actual fix for this? I am confused.

This issue can still happen. If you have the program set to start on startup, and you do a bunch of fast reboots/windows crashed, the settings will reset, despite you not even touching the program.
Really annoying if you are doing a overclocking session and your settings keep resetting.

This issue can still happen. If you have the program set to start on startup, and you do a bunch of fast reboots/windows crashed, the settings will reset, despite you not even touching the program.
Really annoying if you are doing a overclocking session and your settings keep resetting.

I was able to reproduce this issue on ShareX 13.1. I turned off my PC last night, but it decided to boot up on its own again, so I waited until Windows showed the login screen and then I shutdown my PC from there. Windows starts loading your session in the background even when you're not logged in, so I think ShareX managed to be loading up when I stopped the PC again.

This is very annoying because I had a bunch of custom uploaders and passwords that I did not have elsewhere.

EDIT: For anyone that comes across this issue:
If you happen to be affected by this, go to your Documents folder, then Sharex and then Backup. I found out ShareX has been backing up my configs, maybe it's doing the same thing with yours and you can just restore from them easily.

I have to say that my settings aren't saved either. Stuff like hotkeys, theme (I prefer light), after capture tasks are reset after reboot. I tried to edit the settings file manually and even explicitly quit ShareX manually before reboot. Settings are restored when starting ShareX manually again, but after reboot settings are gone.

Debug log: 2020-04-01 09:03:42.035 - ApplicationConfig save successful: C:\Users\\Documents\ShareX\ApplicationConfig.json
ShareX 13.1
Windows 10 (1809)

I've noticed that when I set things up while running the program as administrator, the configurations I made stays after rebooting, otherwise is goes away.

@dv2y Tried that, but in the end my configuration was lost again.

I have to add that it not happens after every reboot, it just happens "all of the sudden". I configure the app to my needs and after a while it's gone again.

Additional notes:

  • I'm not using hibernation, I shut down every day.
  • It's a computer from work.
  • I have admin rights.
  • Antivirus is Kaspersky.

I hope that this long standing issue gets resolved somehow, because it's annoying to reconfigure again and again.

@Jaex , is it possible to reopen this issue? Clearly multiple people are having this issue.

I hope that this long standing issue gets resolved somehow, because it's annoying to reconfigure again and again.

@Jaex , is it possible to reopen this issue? Clearly multiple people are having this issue.

Past 11 years I'm trying to figure out why peoples settings reset and added like 5 different protections to make sure in case of corruption in one action still setting can be kept, yet it still wiping. So no, I can't figure it out.

Like even 6 hours ago I added one more protection as you can see from here: https://github.com/ShareX/ShareX/commit/14b9491664db82ffcce4207267fc7e446c594d26 which shows that I'm still trying to figure it out all this time.

Thanks @Jaex! I wasn't sure this issue was still being worked on since it is marked as closed. Glad to hear you're still trying to fix it.

I'm happy to provide you with logs or things alike whenever I run into the problem. The thing is I don't use the app every day, but I'll keep a close eye to it for a while.

Yesterday before I shutdown my computer, I took a backup of the settings files to a completely different folder. Today I compared the backups with the files in the application folder and noticed that the application settings files are not json but binary or something.

Snippet of ApplicationConfig.json:

V™Ö,Ô=5!‹kÉô–õA÷§SÔùȨ!ÒÑuxR×B’ܵs<<£¼)[¤XN¢ž1½[Áuóg¯h¾ÜZÔ¿&'„,“t^Ì¿Cvžð£P¸… SÐy™¾ìªÝ&DžB…
÷åzx9tœEr#åìiå§À ?´Ã(<šPß:.CqÅ’é¡DX0H7i4Âг…>
 +¢µ³Þ•§zI5oÀtIº+ktšáÒø…z0hÚ),ªÈVÇ·Iîá·JËê}”Þâ:¿4#»«ns+è˜òÞgÔ¿ÐJ׳ºò0—d» \ zGù´¥)ÌŽl¸YÝTp¾êxE¹OHߨéìÏÿhÒ2÷Àß"¬¸zñ_ƒ5Ù\¤×Ñø’tÁ’ôŒ¦!ŽõìtìÍ»KB
Ìñ“cZÁquoÁ
y¯!óçE‹öÔÞ)Â_÷ºÖJLÐcÒ~
ÒfÀ¢"ÎL!Iæ‰nÓLFŒÐþeÕ“J‰Ÿf+
Eý‰,J8;¤uˆh„[¢•õäÃ[@ë寑xG]…K¸«ë{Æ­¦é“ÚgÔÃ"Ç´ìôC‡3ëÏö¬¬YæcJ؈I”u˜D
çíFè= >ªœC£s^´+Ï]¶ÂUÔj¢?z0DizLÓóÅò=q ¥”lÕ
É× þÿ Ü67D_-|Õ­w’²ôë`¸ç$ÁgÊfÞÀçtœ“
ê’\:öÉ
›LK“0BdÖ™ìŸS¨ÐÒ(˶ÿh+­±11íÓ„»„xÕÂã‰Ù±ÂJTšß¦º88É¡ykøÂLó\#kÀ­ÆlcáR(P<qï°ˆ²®5XJï¢þ{º×êolÒÄ.§çH¹2¦;S¤—³ºO¹4²èÄâ½P&
z8ë…Â'f±ÔÔÅ·äµÕC®WY;4wˆ0rÁعKöοä;4ŽS5ÀûÜ^½

Makes me wonder: could it be due to hard disk encryption, because that's enabled on my machine? On the other hand, other (text based) files are just fine in the same directory, like the bak files (not sure how they got in there, they are almost 2y old) or the logs in de logs subdirectory. Or maybe saving during shutdown causes this? Is saving during exit required, because settings are saved immediately after changing them?

I compared the files after a second boot this morning, forgot about it when I first booted up. Seeing the logs, the error appeared after the second boot. I was connected to a VPN when I restarted the computer.

A workaround could be to restore settings from the backup folder if the application is unable to read the "current" settings. Maybe have it as an option to do so.

Just thinking out load here and giving you as much information as possible.

Log file extract from yesterday till after second reboot:

2020-05-07 18:31:23.661 - ShareX closing.
2020-05-07 18:31:23.680 - ApplicationConfig save started: C:\Users\<username>\Documents\ShareX\ApplicationConfig.json
2020-05-07 18:31:24.174 - ApplicationConfig save successful: C:\Users\<username>\Documents\ShareX\ApplicationConfig.json
2020-05-07 18:31:24.174 - UploadersConfig save started: C:\Users\<username>\Documents\ShareX\UploadersConfig.json
2020-05-07 18:31:24.349 - UploadersConfig save successful: C:\Users\<username>\Documents\ShareX\UploadersConfig.json
2020-05-07 18:31:24.350 - HotkeysConfig save started: C:\Users\<username>\Documents\ShareX\HotkeysConfig.json
2020-05-07 18:31:24.539 - HotkeysConfig save successful: C:\Users\<username>\Documents\ShareX\HotkeysConfig.json
2020-05-07 18:31:24.540 - ShareX closed.
2020-05-08 08:38:52.053 - ShareX starting.
2020-05-08 08:38:52.075 - Version: 13.1
2020-05-08 08:38:52.113 - Build: Release
2020-05-08 08:38:52.113 - Command line: "C:\Program Files\ShareX\ShareX.exe" -silent
2020-05-08 08:38:52.113 - Personal path: C:\Users\<username>\Documents\ShareX
2020-05-08 08:38:52.128 - Operating system: Windows 10 Enterprise (64-bit)
2020-05-08 08:38:52.128 - Running as elevated process: False
2020-05-08 08:38:52.135 - Flags: SilentRun
2020-05-08 08:38:52.170 - ApplicationConfig load started: C:\Users\<username>\Documents\ShareX\ApplicationConfig.json
2020-05-08 08:38:54.056 - ApplicationConfig load finished: C:\Users\<username>\Documents\ShareX\ApplicationConfig.json
2020-05-08 08:38:54.076 - UploadersConfig load started: C:\Users\<username>\Documents\ShareX\UploadersConfig.json
2020-05-08 08:38:54.076 - MainForm init started.
2020-05-08 08:38:55.291 - UploadersConfig load finished: C:\Users\<username>\Documents\ShareX\UploadersConfig.json
2020-05-08 08:38:55.302 - HotkeysConfig load started: C:\Users\<username>\Documents\ShareX\HotkeysConfig.json
2020-05-08 08:38:55.373 - HotkeysConfig load finished: C:\Users\<username>\Documents\ShareX\HotkeysConfig.json
2020-05-08 08:38:55.645 - MainForm init finished.
2020-05-08 08:38:57.408 - Startup time: 5513 ms
2020-05-08 08:38:57.411 - CommandLine: silent
2020-05-08 08:38:57.462 - Hotkey registered: Hotkey: Ctrl + Print Screen, Description: Capture region, Job: RectangleRegion
2020-05-08 08:38:57.463 - Hotkey registered: Hotkey: Print Screen, Description: Capture entire screen, Job: PrintScreen
2020-05-08 08:38:57.463 - Hotkey registered: Hotkey: Alt + Print Screen, Description: Capture active window, Job: ActiveWindow
2020-05-08 08:38:57.463 - Hotkey registered: Hotkey: Shift + Print Screen, Description: Start/Stop screen recording using custom region, Job: ScreenRecorder
2020-05-08 08:38:57.463 - Hotkey registered: Hotkey: Ctrl + Shift + Print Screen, Description: Start/Stop screen recording (GIF) using custom region, Job: ScreenRecorderGIF
2020-05-08 08:38:57.466 - HotkeyManager started.
2020-05-08 08:38:57.468 - WatchFolderManager started.
2020-05-08 09:13:29.110 - ShareX closing.
2020-05-08 09:13:29.135 - ApplicationConfig save started: C:\Users\<username>\Documents\ShareX\ApplicationConfig.json
2020-05-08 09:13:30.105 - ApplicationConfig save successful: C:\Users\<username>\Documents\ShareX\ApplicationConfig.json
2020-05-08 09:13:30.107 - UploadersConfig save started: C:\Users\<username>\Documents\ShareX\UploadersConfig.json
2020-05-08 09:13:30.365 - UploadersConfig save successful: C:\Users\<username>\Documents\ShareX\UploadersConfig.json
2020-05-08 09:13:30.366 - HotkeysConfig save started: C:\Users\<username>\Documents\ShareX\HotkeysConfig.json
2020-05-08 09:13:30.652 - HotkeysConfig save successful: C:\Users\<username>\Documents\ShareX\HotkeysConfig.json
2020-05-08 09:13:30.653 - ShareX closed.
2020-05-08 09:16:09.318 - ShareX starting.
2020-05-08 09:16:09.358 - Version: 13.1
2020-05-08 09:16:09.377 - Build: Release
2020-05-08 09:16:09.391 - Command line: "C:\Program Files\ShareX\ShareX.exe" -silent
2020-05-08 09:16:09.391 - Personal path: C:\Users\<username>\Documents\ShareX
2020-05-08 09:16:09.392 - Operating system: Windows 10 Enterprise (64-bit)
2020-05-08 09:16:09.393 - Running as elevated process: False
2020-05-08 09:16:09.395 - Flags: SilentRun
2020-05-08 09:16:09.518 - ApplicationConfig load started: C:\Users\<username>\Documents\ShareX\ApplicationConfig.json
2020-05-08 09:16:09.991 - ApplicationConfig load failed: C:\Users\<username>\Documents\ShareX\ApplicationConfig.json:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: V. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   at ShareX.HelpersLib.SettingsBase`1.LoadInternal(String filePath, String backupFolder)
2020-05-08 09:16:10.023 - ApplicationConfig load started: C:\Users\<username>\Documents\ShareX\Backup\ApplicationConfig.json
2020-05-08 09:16:10.143 - ApplicationConfig load failed: C:\Users\<username>\Documents\ShareX\Backup\ApplicationConfig.json:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: V. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   at ShareX.HelpersLib.SettingsBase`1.LoadInternal(String filePath, String backupFolder)
2020-05-08 09:16:10.144 - Loading new ApplicationConfig instance.
2020-05-08 09:16:10.341 - MainForm init started.
2020-05-08 09:16:10.744 - UploadersConfig load started: C:\Users\<username>\Documents\ShareX\UploadersConfig.json
2020-05-08 09:16:10.946 - UploadersConfig load failed: C:\Users\<username>\Documents\ShareX\UploadersConfig.json:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: �. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   at ShareX.HelpersLib.SettingsBase`1.LoadInternal(String filePath, String backupFolder)
2020-05-08 09:16:11.794 - MainForm init finished.
2020-05-08 09:16:11.937 - Startup time: 3389 ms
2020-05-08 09:16:11.940 - CommandLine: silent
2020-05-08 09:16:12.183 - UploadersConfig load started: C:\Users\<username>\Documents\ShareX\Backup\UploadersConfig.json
2020-05-08 09:16:12.208 - UploadersConfig load failed: C:\Users\<username>\Documents\ShareX\Backup\UploadersConfig.json:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: �. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   at ShareX.HelpersLib.SettingsBase`1.LoadInternal(String filePath, String backupFolder)
2020-05-08 09:16:12.208 - Loading new UploadersConfig instance.
2020-05-08 09:16:12.389 - HotkeysConfig load started: C:\Users\<username>\Documents\ShareX\HotkeysConfig.json
2020-05-08 09:16:12.465 - HotkeysConfig load failed: C:\Users\<username>\Documents\ShareX\HotkeysConfig.json:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: �. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   at ShareX.HelpersLib.SettingsBase`1.LoadInternal(String filePath, String backupFolder)
2020-05-08 09:16:12.537 - HotkeysConfig load started: C:\Users\<username>\Documents\ShareX\Backup\HotkeysConfig.json
2020-05-08 09:16:12.657 - HotkeysConfig load failed: C:\Users\<username>\Documents\ShareX\Backup\HotkeysConfig.json:
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: �. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonSerializer.Deserialize[T](JsonReader reader)
   at ShareX.HelpersLib.SettingsBase`1.LoadInternal(String filePath, String backupFolder)
2020-05-08 09:16:12.657 - Loading new HotkeysConfig instance.
2020-05-08 09:16:12.677 - Hotkey registered: Hotkey: Ctrl + Print Screen, Description: Capture region, Job: RectangleRegion
2020-05-08 09:16:12.677 - Hotkey registered: Hotkey: Print Screen, Description: Capture entire screen, Job: PrintScreen
2020-05-08 09:16:12.677 - Hotkey registered: Hotkey: Alt + Print Screen, Description: Capture active window, Job: ActiveWindow
2020-05-08 09:16:12.677 - Hotkey registered: Hotkey: Shift + Print Screen, Description: Start/Stop screen recording using custom region, Job: ScreenRecorder
2020-05-08 09:16:12.677 - Hotkey registered: Hotkey: Ctrl + Shift + Print Screen, Description: Start/Stop screen recording (GIF) using custom region, Job: ScreenRecorderGIF
2020-05-08 09:16:12.680 - HotkeyManager started.
2020-05-08 09:16:12.683 - WatchFolderManager started.

I installed Windows 10 virtual machine to test corruption issue by turning off vm (electricity loss or bsod simulation) or shutting it down (pressing power button in your pc case). And I could reproduce setting corruption in latest ShareX stable build. Later I downloaded dev build which contains this fix: https://github.com/ShareX/ShareX/commit/c63c37fd192d0bae651e580ed8105875111ba3a6 and I could not corrupt settings anymore. And I was sure that I could mimic same situation because ShareX logs were getting corrupted, yet settings were intact.

This fix involves bypassing os cache while writing settings to hard drive. You can read more info about os cache here: https://superuser.com/a/866732/223867

But there is a lot of reasons that peoples settings could be not saving at all too, for example if anti virus software is blocking ShareX access to Documents folder. I just hopefully fixed corrupting settings on shutdown/electricity lose issue.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MoistLemon picture MoistLemon  ·  25Comments

carasius picture carasius  ·  19Comments

EngineExt picture EngineExt  ·  18Comments

tx-trainwreck picture tx-trainwreck  ·  46Comments

SKILLEDxKILLAH picture SKILLEDxKILLAH  ·  19Comments