Skip to content

[1.7.106.0] 将偏移值调为空导致崩溃 #1419

@unDefFtr

Description

@unDefFtr

检查清单

  • 我已更新到最新版 最新的版本号最新的版本号 测试,并看过 最新提交,确认这一 Bug 还没有修复。我也已在 Issues 中检索,确认这一 Bug 未被提交过,并且在 常见问题 中没有解决方案。
  • 我已经仔细阅读过选项里的内容,并且知道这个选项不用勾选。
  • 我已知晓并同意,此处仅用于汇报程序中存在的问题(关于其他非程序本身的问题应当在 Discussion 板块提出)。

期望的行为

将时间偏移调为空后,自动回到默认,或弹出提示

实际结果

程序崩溃。

Image Image

重现步骤

  1. 修改偏移值为空
  2. 关闭窗口

堆栈跟踪(可选)

在向开发者提交问题时请保留以下信息:
TraceID: 8805f6dd5c71455c922bff1b7de4fe98
================================
System.ArgumentException: .NET number values such as positive and negative infinity cannot be written as valid JSON. To make it work when using 'JsonSerializer', consider specifying 'JsonNumberHandling.AllowNamedFloatingPointLiterals' (see https://learn.microsoft.com/dotnet/api/system.text.json.serialization.jsonnumberhandling).
   at System.Text.Json.ThrowHelper.ThrowArgumentException_ValueNotSupported()
   at System.Text.Json.Serialization.Metadata.JsonPropertyInfo`1.GetMemberAndWriteJson(Object obj, WriteStack& state, Utf8JsonWriter writer)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryWrite(Utf8JsonWriter writer, T value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.TryWrite(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.JsonConverter`1.WriteCore(Utf8JsonWriter writer, T& value, JsonSerializerOptions options, WriteStack& state)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.Serialize(Utf8JsonWriter writer, T& rootValue, Object rootValueBoxed)
   at System.Text.Json.JsonSerializer.WriteString[TValue](TValue& value, JsonTypeInfo`1 jsonTypeInfo)
   at System.Text.Json.JsonSerializer.Serialize[TValue](TValue value, JsonSerializerOptions options)
   at ClassIsland.Shared.Helpers.ConfigureFileHelper.SaveConfig[T](String path, T o) in /_/ClassIsland.Shared/Helpers/ConfigureFileHelper.cs:line 124
   at ClassIsland.Services.SettingsService.SaveSettings(String note) in /_/ClassIsland/Services/SettingsService.cs:line 153
   at ClassIsland.Views.SettingsWindowNew.SettingsWindowNew_OnClosing(Object sender, WindowClosingEventArgs e) in /_/ClassIsland/Views/SettingsWindowNew.axaml.cs:line 432
   at Avalonia.Controls.Window.OnClosing(WindowClosingEventArgs e)
   at Avalonia.Controls.Window.ShouldCancelClose(WindowClosingEventArgs args)
   at Avalonia.Controls.Window.CloseCore(WindowCloseReason reason, Boolean isProgrammatic, Boolean ignoreCancel)
   at Avalonia.Controls.Window.Close()
   at FluentAvalonia.UI.Windowing.MinMaxCloseControl.OnButtonClick(Object sender, RoutedEventArgs e)
   at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e)
   at Avalonia.Interactivity.EventRoute.RaiseEvent(Interactive source, RoutedEventArgs e)
   at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e)
   at Avalonia.Controls.Button.OnClick()
   at Avalonia.Controls.Button.OnPointerReleased(PointerReleasedEventArgs e)
   at Avalonia.Reactive.LightweightObservableBase`1.PublishNext(T value)
   at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e)
   at Avalonia.Interactivity.EventRoute.RaiseEvent(Interactive source, RoutedEventArgs e)
   at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e)
   at Avalonia.Input.TouchDevice.ProcessRawEvent(RawInputEventArgs ev)
   at Avalonia.Controls.TopLevel.<>c.<HandleInput>b__150_0(Object state)
   at Avalonia.Threading.Dispatcher.Send(SendOrPostCallback action, Object arg, Nullable`1 priority)

诊断信息

SystemOsVersion: Microsoft Windows 10.0.19045
SystemOsArch: X64
SystemDeviceName: MT71A-SHG
SystemDeviceVendor: SEEWO
AppPackageRoot: D:\HugoMoveData\User\seewo\Downloads\ClassIsland_app_windows_x64_selfContained_folder (2)\
AppRoot: D:\HugoMoveData\User\seewo\Downloads\ClassIsland_app_windows_x64_selfContained_folder (2)\data
AppCurrentDirectory: D:\HugoMoveData\User\seewo\Downloads\ClassIsland_app_windows_x64_selfContained_folder (2)\app-1.7.106.0-0
AppExecutingEntrance: D:\HugoMoveData\User\seewo\Downloads\ClassIsland_app_windows_x64_selfContained_folder (2)\ClassIsland.exe
AppCurrentMemoryUsage: 653,733,888.00
AppStartupDurationMs: 1413
AppVersion: 1.7.106.0-Khaslana-22d5f1f4(HEAD) (Core 2.0.0.0)
AppSubChannel: windows_x64_full_folder
AppIsAssetsTrimmed: False
DiagnosticFirstLaunchTime: 2025/8/30 15:58:09
DiagnosticStartupCount: 111
DiagnosticMemoryKillCount: 0
DiagnosticLastMemoryKillTime: 2025/8/30 15:58:09
DiagnosticMemoryKillFreqDay: 0.000

最后一步

  • 我认为上述的描述已经足以详细,以允许开发人员能复现该问题。如果我的 issue 没有按照上述的要求填写,可能会被无条件关闭。

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bug在使用 ClassIsland 的过程中遇到了 Bug优先级:无短期内不会计划完成的事项待查看等待开发者查看此 Issue

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions