[Run] - System.Text.Json.JsonException: '0x00' is an invalid start of a value.
See original GitHub issueVersion: 1.0.0 OS Version: Microsoft Windows NT 10.0.18363.0 IntPtr Length: 8 x64: True Date: 08/12/2020 09:43:11 Exception: System.Text.Json.JsonException: ‘0x00’ is an invalid start of a value. Path: $ | LineNumber: 0 | BytePositionInLine: 0. —> System.Text.Json.JsonReaderException: ‘0x00’ is an invalid start of a value. LineNumber: 0 | BytePositionInLine: 0. at System.Text.Json.ThrowHelper.ThrowJsonReaderException(Utf8JsonReader& json, ExceptionResource resource, Byte nextByte, ReadOnlySpan`1 bytes) at System.Text.Json.Utf8JsonReader.ConsumeValue(Byte marker) at System.Text.Json.Utf8JsonReader.ReadFirstToken(Byte first) at System.Text.Json.Utf8JsonReader.ReadSingleSegment() at System.Text.Json.Utf8JsonReader.Read() at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack) — End of inner exception stack trace — at System.Text.Json.ThrowHelper.ReThrowWithPath(ReadStack& readStack, JsonReaderException ex) at System.Text.Json.JsonSerializer.ReadCore(JsonSerializerOptions options, Utf8JsonReader& reader, ReadStack& readStack) at System.Text.Json.JsonSerializer.ReadCore(Type returnType, JsonSerializerOptions options, Utf8JsonReader& reader) at System.Text.Json.JsonSerializer.Deserialize(String json, Type returnType, JsonSerializerOptions options) at System.Text.Json.JsonSerializer.Deserialize[TValue](String json, JsonSerializerOptions options) at PowerLauncher.SettingsWatcher.OverloadSettings() at PowerLauncher.SettingsWatcher…ctor(Settings settings) at PowerLauncher.App.<>c__DisplayClass16_0.<OnStartup>b__1() at Wox.Infrastructure.Stopwatch.Normal(String message, Action action) at PowerLauncher.App.OnStartup(Object sender, StartupEventArgs e) at System.Windows.Application.OnStartup(StartupEventArgs e) at System.Windows.Application.<.ctor>b__1_0(Object unused) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Related StackOverflow Question
@crutkas: Just to expand on Divyansh’s comments above, because we are initiating the save operations via IPC messages, the code doesn’t block while writing to the disk, and we attempt to read the settings before the file has been written. I was proposing that we implement a callback system over IPC, and turn the SettingsUtils.Save method into a blocking function, and/or add an Async alternative. This won’t get done for .21 obviously. Divyansh’s fix should mitigate the crash, but doesn’t do anything for other modules, and from our testing the issue is pretty hard to repro. I was proposing that we implement the correct fix for .22 and not bother with the mentioned PR at this point, but wanted to get your opinion. What are your thoughts?
@enricogior : ^^ for visibility.
Fixed in 0.23 of PowerToys. https://github.com/microsoft/PowerToys/releases/