PCL-CE icon indicating copy to clipboard operation
PCL-CE copied to clipboard

[C#]: 在获取正版玩家皮肤时点击取消按钮会弹出【未观测到的异步任务异常】

Open Cakihub111 opened this issue 5 months ago • 3 comments

检查项 / Checklist

  • [x] 我已在 Issues 页面 中搜索,确认了这一 Bug 未被提交过 / I have searched the Issues page and confirmed that this bug has not been reported yet.
  • [ ] 我确认只是全部选中而没有仔细确认就直接提交了这个 Issue,并且同意这个 Issue 可以直接被关闭 / I confirm that I checked all boxes without carefully reading them, and agree that this issue may be closed directly.
  • [x] 我确认正在使用当前更新分支的最新版 PCL CE,若不是,此 Issue 可能会被直接关闭(更新方式:启动器 设置-关于-软件更新 检查更新,或在 Releases 页面下载) / I confirm that I am using the latest PCL CE version on the current update channel. If not, this issue may be closed directly. To update, check for updates in Settings → About → Updates, or download the latest version from the Releases page.
  • [x] 我确认会详细描述我所遇到的问题,并附上日志和截图,而不是随便填点东西敷衍了事 / I will describe the problem in detail, attach logs and screenshots, and avoid submitting vague or incomplete information.

描述 / Description

在【工具】一栏的选项卡【百宝箱】中,有一个下载正版玩家皮肤的地方。当你随便填入一个玩家名称,它弹出一个保存皮肤文件的窗口时,点击取消按钮,再随便返回任意一个地方或者多试几次,就会100%出现【未观测到的异步任务异常】。

重现步骤 / Steps to Reproduce

1.点击【工具】 2.点击【百宝箱】 3.找到【下载正版玩家皮肤】选项卡 4.随便输一个正版玩家名,如‘Cakihub’ 5.点击【保存皮肤】 6.待其弹出【保存文件】的窗口时点击【取消】按钮 7.这时bug复现(如果没有就多试几次,或随便切一切页面)

日志与附件 / Logs & Attachments

https://github.com/user-attachments/assets/b5315645-d25a-49b1-88c0-2e1ff586121a

PCL_CE_Logs_20260628103551.zip

Cakihub111 avatar Jun 28 '26 02:06 Cakihub111

发现:为什么【未观测到的异步任务异常】在pcl ce中触发的格外多。

Cakihub111 avatar Jun 28 '26 02:06 Cakihub111

[10:19:54.476] [ERR!] [#2] [生命周期|lifecycle] 未观测到的异步任务异常
System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (复制文件出错:C:\Users\Administrator\AppData\Local\Temp\PCLCE\Cache\Skin\6276552374959431663.png → D:\现D盘文件\MC\)
 ---> System.Exception: 复制文件出错:C:\Users\Administrator\AppData\Local\Temp\PCLCE\Cache\Skin\6276552374959431663.png → D:\现D盘文件\MC\
 ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'D:\现D盘文件\MC\'.
   at System.IO.FileSystem.CopyFile(String sourceFullPath, String destFullPath, Boolean overwrite)
   at PCL.ModBase.CopyFile(String fromPath, String toPath)
   --- End of inner exception stack trace ---
   at PCL.ModBase.CopyFile(String fromPath, String toPath)
   at PCL.PageToolsTest.<>c__DisplayClass24_1.<BtnSkinSave_Click>b__1()
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   --- End of inner exception stack trace ---

FAF 导致的,不过应该不影响使用

发现:为什么【未观测到的异步任务异常】在pcl ce中触发的格外多。

因为上游项目根本就没有异步代码

RyogiMutsuki avatar Jun 29 '26 04:06 RyogiMutsuki

彳亍

Cakihub111 avatar Jun 29 '26 13:06 Cakihub111