akorb / SteamShutdown

Automatic shutdown after Steam download(s) has finished.
MIT License
362 stars 28 forks source link

Crash on startup #45

Closed valery-kirichenko closed 2 years ago

valery-kirichenko commented 3 years ago

The app crashes with the following log:

07.10.2021 1:21:16: System.TypeInitializationException: The type initializer for 'SteamShutdown.Steam' threw an exception. ---> Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: W. Path '', line 0, position 0.
   at Newtonsoft.Json.JsonTextReader.ParseValue()
   at Newtonsoft.Json.JsonTextReader.Read()
   at Newtonsoft.Json.JsonReader.ReadAndMoveToContent()
   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.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at SteamShutdown.Steam.FileToAppInfo(String filename)
   at SteamShutdown.Steam.UpdateAppInfos(IEnumerable`1 libraryPaths)
   at SteamShutdown.Steam..cctor()
   --- End of inner exception stack trace ---
   at SteamShutdown.Steam.add_AppInfoChanged(AppInfoChangedEventHandler value)
   at SteamShutdown.CustomApplicationContext..ctor()
   at SteamShutdown.SteamShutdown.Main()
ShadowDuke commented 2 years ago

Same.

akorb commented 2 years ago

Hi, can you still reproduce this error? If yes, please execute the following version and cause this error to appear. SteamShutdown.zip

This will create a file called debugging.txt on your desktop. Please share this file with me. Also, if the last line of this text file says something like: <date> <time> FileToAppInfo: <path to an acf file> please attach this acf file as well.

valery-kirichenko commented 2 years ago

Yeah it was reproducible. Thanks to a debugging.txt I have found multiple corrupted acf files (some of them were binary, others had text content they shouldn't have had), deleted them and the app is now working just fine.

Seems like better handling of such files would be nice

akorb commented 2 years ago

Do you have a copy of these corrupted files? Would be helpful to pinpoint what went wrong and making the code more robust. Otherwise I can only guess what went wrong

Valery Kirichenko @.***> schrieb am Fr., 25. Feb. 2022, 23:10:

Yeah it was reproducible. Thanks to a debugging.txt I have found multiple corrupted acf files (some of them were binary, others had text content they shouldn't have had), deleted them and the app is now working just fine.

Seems like better handling of such files would be nice

— Reply to this email directly, view it on GitHub https://github.com/akorb/SteamShutdown/issues/45#issuecomment-1051311625, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTBIYIOMLWSWDWOQ4CBBETU4746LANCNFSM5FP34PMA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

valery-kirichenko commented 2 years ago

appmanifest.zip