-
-
Notifications
You must be signed in to change notification settings - Fork 312
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GHelper loses settings when the storage is full #3826
Comments
@Iemand005 hello, Do you mean that you fill all your drive so it's not writeable anymore (i.e. full too 100%?). I strongly advice to clean up some space, as it will introduce a lot of difficulties from windows and other apps as well. As for G-Helper's config, currently it first writes config in 2 steps.
This is done intentionally, to prevent config corruption in case if app is accidentally closed or interrupted. Line 95 in ecf10e9
I honestly don't know what else can I offer here :) If you use device in such extreme conditions why don't you just make a manual copy of the config somewhere else once ? |
P.S. I don't see any notes about broken config.json in the log. When did it happen last time and why did app crash ? |
I have a backup of my log from right after it happened I usually have free storage but sometimes opening a lot of apps or loading an LLM into memory results in a lot of paging that can easily use 10GB of storage, if I don't notice in time it happens that I'm left with 0 bytes free. Maybe it's not even caused by the full storage, I don't know what the cause is but it has happened multiple times. |
@Iemand005 ok, Let's try to figure out what exactly happens to a config in that case. Can you use this build (it will also save old broken config before erasing it) and try to reproduce the scenario ? Thanks |
Thank you! The error shows the config.json must have somehow ended up being 0 bytes large which usually a result of the storage being full and it failing to allocate more space after having created the file I assume. I don't see any out of storage errors in the logs when it erased my configs. I did notice the log actaully also fail to write sometimes when the storage is full which causes the log to be cleared. What I believe happened is:
The logs show 2 days before it attempts to read the config. What I assume happened is:
I probably have screenshots and stuff from the days on which it happened, if you want I can go look for that. Line 93 in ecf10e9
This could be tested by changing the 500ms pause into a 5 minute pause or so, filling up the storage manually within these 5 minutes and seeing if it results in an empty config, then change a setting to make it try to save again with the storage still full, then killing GHelper forcefully, freeing up space and restarting it. Would you like me to test this? |
@Iemand005 hello, I think you have mixed order of actions in your interpretations :) As mentioned above:
This is done to ensure that if any errors / full disk / etc will happen during writing a backup - main config won't be touched. Line 97 in ecf10e9
In your case both configs were corrupted, which means that backup config has passed a { + } test, but was still corrupt by some reason. Can you just run the build I linked (it will store original configs before overwriting them) - and if it happens again - upload original configs here ? I want to see what exactly was wrong with them . I can replace a { + } check with a proper json parsing, but initially this was done to save resources. |
Rules
What's wrong?
GHelper has a tendency to lose it's configuration when used while the storage is full.
There is a backup config file but this also gets reset immediately.
This caused all my settings to disappear twice. If an error occurs saving or reading the config, the backup should not be overwritten to default too. The backup should be kept or a second backup should be made.
How to reproduce the bug?
Fill your storage and make GHelper crash.
Logs
log.txt
Device and Model
Asus ROG Flow x16
Additional information.
No response
Armoury Crate
Installed
Asus Services
None
Version
0.204
OS
Windows 11 23H2
The text was updated successfully, but these errors were encountered: