Skip to content
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

[Bug]: 遇到了无法恢复的致命错误 #2240

Closed
1 task done
Seeridia opened this issue Nov 25, 2024 · 6 comments
Closed
1 task done

[Bug]: 遇到了无法恢复的致命错误 #2240

Seeridia opened this issue Nov 25, 2024 · 6 comments
Labels
area-LifeCycle App生命周期问题 已完成 This issue is completed
Milestone

Comments

@Seeridia
Copy link

Seeridia commented Nov 25, 2024

Windows 版本

27754.1000

Snap Hutao 版本

1.12.4.0

设备 ID

98C20035CC4D682D75C5332E2515A91A

问题分类

安装和环境

发生了什么?

程序打开后过数秒闪退,之后跳出两个相同的窗口提示 遇到了无法恢复的致命错误

重装不能解决问题

Snap Hutao 1.12.4.0
Windows 10.0.27754.1000
System Architecture: X64
Process Architecture: X64
Framework: .NET 9.0.0

Exception Data:
[string]:FileName:Avatar/10000002 - 副本

System.Text.Json.JsonException: JSON deserialization for type 'Snap.Hutao.Model.Metadata.Avatar.Avatar' was missing required properties including: 'NameCard'.
at System.Text.Json.ThrowHelper.ThrowJsonException_JsonRequiredPropertyMissing(JsonTypeInfo parent, BitArray requiredPropertiesSet)
at System.Text.Json.Serialization.Converters.ObjectDefaultConverter1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value) at System.Text.Json.Serialization.JsonConverter1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
at System.Text.Json.Serialization.JsonConverter1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state) at System.Text.Json.Serialization.Metadata.JsonTypeInfo1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, T& value)
at System.Text.Json.Serialization.Metadata.JsonTypeInfo1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken) at Snap.Hutao.Service.Metadata.MetadataService.FromCacheOrScatteredFile[T](MetadataFileStrategy strategy, String cacheKey, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataService.cs:line 119 at Snap.Hutao.Service.Metadata.MetadataService.FromCacheOrFileAsync[T](MetadataFileStrategy strategy, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataService.cs:line 72 at Snap.Hutao.Service.Metadata.MetadataServiceImmutableDictionaryExtension.<>c__DisplayClass23_02.<b__0>d.MoveNext() in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataServiceImmutableDictionaryExtension.cs:line 240
--- End of stack trace from previous location ---
at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func2 factory, MemoryCacheEntryOptions createOptions) at Snap.Hutao.Service.Metadata.MetadataServiceImmutableDictionaryExtension.FromCacheAsDictionaryAsync[TKey,TValue](IMetadataService metadataService, MetadataFileStrategy strategy, Func2 keySelector, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataServiceImmutableDictionaryExtension.cs:line 238
at Snap.Hutao.Service.Metadata.ContextAbstraction.MetadataServiceContextExtension.GetContextAsync[TContext](IMetadataService metadataService, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\ContextAbstraction\MetadataServiceContextExtension.cs:line 83
at Snap.Hutao.Service.GachaLog.GachaLogService.InitializeAsync(CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\GachaLog\GachaLogService.cs:line 48
at Snap.Hutao.ViewModel.GachaLog.GachaLogViewModelSlim.LoadAsync() in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\ViewModel\GachaLog\GachaLogViewModelSlim.cs:line 25
at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()

你期望发生的行为?

No response

最后一步

  • 我认为上述的描述已经足以详细,以允许开发人员能复现该问题
@Seeridia Seeridia added the priority:none Priority not set label Nov 25, 2024
@dgp-bot
Copy link

dgp-bot bot commented Nov 25, 2024

device_id: 98C20035CC4D682D75C5332E2515A91A

Exception Data:
[string]:FileName:Avatar/10000002 - 副本
----------------------------------------
System.Text.Json.JsonException: JSON deserialization for type 'Snap.Hutao.Model.Metadata.Avatar.Avatar' was missing required properties including: 'NameCard'.
   at System.Text.Json.ThrowHelper.ThrowJsonException_JsonRequiredPropertyMissing(JsonTypeInfo parent, BitArray requiredPropertiesSet)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, T& value)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
   at Snap.Hutao.Service.Metadata.MetadataService.FromCacheOrScatteredFile[T](MetadataFileStrategy strategy, String cacheKey, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataService.cs:line 119
   at Snap.Hutao.Service.Metadata.MetadataService.FromCacheOrFileAsync[T](MetadataFileStrategy strategy, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataService.cs:line 72
   at Snap.Hutao.Service.Metadata.MetadataServiceImmutableDictionaryExtension.<>c__DisplayClass23_0`2.<<FromCacheAsDictionaryAsync>b__0>d.MoveNext() in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataServiceImmutableDictionaryExtension.cs:line 240
--- End of stack trace from previous location ---
   at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory, MemoryCacheEntryOptions createOptions)
   at Snap.Hutao.Service.Metadata.MetadataServiceImmutableDictionaryExtension.FromCacheAsDictionaryAsync[TKey,TValue](IMetadataService metadataService, MetadataFileStrategy strategy, Func`2 keySelector, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataServiceImmutableDictionaryExtension.cs:line 238
   at Snap.Hutao.Service.Metadata.ContextAbstraction.MetadataServiceContextExtension.GetContextAsync[TContext](IMetadataService metadataService, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\ContextAbstraction\MetadataServiceContextExtension.cs:line 83
   at Snap.Hutao.Service.GachaLog.GachaLogService.InitializeAsync(CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\GachaLog\GachaLogService.cs:line 48
   at Snap.Hutao.ViewModel.GachaLog.GachaLogViewModelSlim.LoadAsync() in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\ViewModel\GachaLog\GachaLogViewModelSlim.cs:line 25
   at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()
Exception Data:
[string]:FileName:Avatar/10000002 - 副本
----------------------------------------
System.Text.Json.JsonException: JSON deserialization for type 'Snap.Hutao.Model.Metadata.Avatar.Avatar' was missing required properties including: 'NameCard'.
   at System.Text.Json.ThrowHelper.ThrowJsonException_JsonRequiredPropertyMissing(JsonTypeInfo parent, BitArray requiredPropertiesSet)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, T& value)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
   at Snap.Hutao.Service.Metadata.MetadataService.FromCacheOrScatteredFile[T](MetadataFileStrategy strategy, String cacheKey, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataService.cs:line 119
   at Snap.Hutao.Service.Metadata.MetadataService.FromCacheOrFileAsync[T](MetadataFileStrategy strategy, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataService.cs:line 72
   at Snap.Hutao.Service.Metadata.ContextAbstraction.MetadataServiceContextExtension.GetContextAsync[TContext](IMetadataService metadataService, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\ContextAbstraction\MetadataServiceContextExtension.cs:line 30
   at Snap.Hutao.ViewModel.Calendar.CalendarViewModel.CreateWeekDays() in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\ViewModel\Calendar\CalendarViewModel.cs:line 145
   at Snap.Hutao.ViewModel.Calendar.CalendarViewModel.LoadAsync() in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\ViewModel\Calendar\CalendarViewModel.cs:line 46
   at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()
Exception Data:
[string]:FileName:Avatar/10000002 - 副本
----------------------------------------
System.Text.Json.JsonException: JSON deserialization for type 'Snap.Hutao.Model.Metadata.Avatar.Avatar' was missing required properties including: 'NameCard'.
   at System.Text.Json.ThrowHelper.ThrowJsonException_JsonRequiredPropertyMissing(JsonTypeInfo parent, BitArray requiredPropertiesSet)
   at System.Text.Json.Serialization.Converters.ObjectDefaultConverter`1.OnTryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value)
   at System.Text.Json.Serialization.JsonConverter`1.TryRead(Utf8JsonReader& reader, Type typeToConvert, JsonSerializerOptions options, ReadStack& state, T& value, Boolean& isPopulatedValue)
   at System.Text.Json.Serialization.JsonConverter`1.ReadCore(Utf8JsonReader& reader, T& value, JsonSerializerOptions options, ReadStack& state)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.ContinueDeserialize(ReadBufferState& bufferState, JsonReaderState& jsonReaderState, ReadStack& readStack, T& value)
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo`1.DeserializeAsync(Stream utf8Json, CancellationToken cancellationToken)
   at Snap.Hutao.Service.Metadata.MetadataService.FromCacheOrScatteredFile[T](MetadataFileStrategy strategy, String cacheKey, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataService.cs:line 119
   at Snap.Hutao.Service.Metadata.MetadataService.FromCacheOrFileAsync[T](MetadataFileStrategy strategy, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataService.cs:line 72
   at Snap.Hutao.Service.Metadata.MetadataServiceImmutableDictionaryExtension.<>c__DisplayClass23_0`2.<<FromCacheAsDictionaryAsync>b__0>d.MoveNext() in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataServiceImmutableDictionaryExtension.cs:line 240
--- End of stack trace from previous location ---
   at Microsoft.Extensions.Caching.Memory.CacheExtensions.GetOrCreateAsync[TItem](IMemoryCache cache, Object key, Func`2 factory, MemoryCacheEntryOptions createOptions)
   at Snap.Hutao.Service.Metadata.MetadataServiceImmutableDictionaryExtension.FromCacheAsDictionaryAsync[TKey,TValue](IMetadataService metadataService, MetadataFileStrategy strategy, Func`2 keySelector, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\MetadataServiceImmutableDictionaryExtension.cs:line 238
   at Snap.Hutao.Service.Metadata.ContextAbstraction.MetadataServiceContextExtension.GetContextAsync[TContext](IMetadataService metadataService, CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\Metadata\ContextAbstraction\MetadataServiceContextExtension.cs:line 83
   at Snap.Hutao.Service.GachaLog.GachaLogService.InitializeAsync(CancellationToken token) in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\Service\GachaLog\GachaLogService.cs:line 48
   at Snap.Hutao.ViewModel.GachaLog.GachaLogViewModelSlim.LoadAsync() in C:\Users\Public\appveyor\Snap.Hutao-c53280n3iveyayo5\src\Snap.Hutao\Snap.Hutao\ViewModel\GachaLog\GachaLogViewModelSlim.cs:line 25
   at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()

@dgp-bot dgp-bot bot added the area-LifeCycle App生命周期问题 label Nov 25, 2024
@qhy040404
Copy link
Member

前往数据文件夹删除 Metadata 文件夹
默认位置在 %USERPROFILE%\Documents\Hutao

@qhy040404 qhy040404 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2024
@dgp-bot dgp-bot bot removed the priority:none Priority not set label Nov 25, 2024
@Lightczx Lightczx reopened this Nov 26, 2024
@dgp-bot dgp-bot bot added the priority:none Priority not set label Nov 26, 2024
@Lightczx
Copy link
Member

@qhy040404 Metadata loading behavior can be changed to avoid this issue

@dgp-bot
Copy link

dgp-bot bot commented Nov 27, 2024

4d59e12 已完成此议题

@dgp-bot dgp-bot bot added 已完成 This issue is completed 等待发布 This issue fix is going to be applied in the next release labels Nov 27, 2024
@dgp-bot dgp-bot bot moved this to 完成 in Snap Hutao Development Nov 27, 2024
@dgp-bot dgp-bot bot removed the priority:none Priority not set label Nov 27, 2024
@dgp-bot dgp-bot bot added this to the 1.12.5 milestone Dec 4, 2024
@dgp-bot
Copy link

dgp-bot bot commented Dec 4, 2024

包含解决该问题的程序版本 1.12.5 已发布。

@dgp-bot dgp-bot bot removed the 等待发布 This issue fix is going to be applied in the next release label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-LifeCycle App生命周期问题 已完成 This issue is completed
Projects
Development

No branches or pull requests

3 participants