Comments (10)
win7需要安装.NET Framework 4.8运行时,然后就可以运行;
下面两个功能因为用到了win10的系统通知,会有一些问题:
任务提醒:我没有做捕获异常,在win7上会闪退;
米游社签到:不会有通知提醒;
其他功能应该不会受系统影响。
from keqingniuza.
好的,谢谢
from keqingniuza.
[2021-10-08 06:51:56.172 | Launcher 2.1.0]
System.Threading.Tasks.TaskCanceledException: 已取消一个任务。
在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 KeqingNiuza.Launcher.MainWindow.d__39.MoveNext() 位置 D:\a\KeqingNiuza\KeqingNiuza\src\KeqingNiuza.Launcher\MainWindow.xaml.cs:行号 336
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 KeqingNiuza.Launcher.MainWindow.d__38.MoveNext() 位置 D:\a\KeqingNiuza\KeqingNiuza\src\KeqingNiuza.Launcher\MainWindow.xaml.cs:行号 300
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 KeqingNiuza.Launcher.MainWindow.<Window_Loaded>d__36.MoveNext() 位置 D:\a\KeqingNiuza\KeqingNiuza\src\KeqingNiuza.Launcher\MainWindow.xaml.cs:行号 237
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
在 System.Windows.Threading.DispatcherOperation.InvokeImpl()
在 MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Windows.Threading.DispatcherOperation.Invoke()
在 System.Windows.Threading.Dispatcher.ProcessQueue()
在 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
在 System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
在 MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
在 System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
在 System.Windows.Application.RunDispatcher(Object ignore)
在 System.Windows.Application.RunInternal(Window window)
在 KeqingNiuza.Launcher.App.Main() 位置 D:\a\KeqingNiuza\KeqingNiuza\src\KeqingNiuza.Launcher\obj\Release\App.g.cs:行号 52
[2021-10-08 06:57:46.265 | Launcher 2.1.0]
System.Threading.Tasks.TaskCanceledException: 已取消一个任务。
在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 KeqingNiuza.Launcher.MainWindow.d__39.MoveNext() 位置 D:\a\KeqingNiuza\KeqingNiuza\src\KeqingNiuza.Launcher\MainWindow.xaml.cs:行号 336
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 KeqingNiuza.Launcher.MainWindow.d__38.MoveNext() 位置 D:\a\KeqingNiuza\KeqingNiuza\src\KeqingNiuza.Launcher\MainWindow.xaml.cs:行号 300
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
在 System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
在 KeqingNiuza.Launcher.MainWindow.<Window_Loaded>d__36.MoveNext() 位置 D:\a\KeqingNiuza\KeqingNiuza\src\KeqingNiuza.Launcher\MainWindow.xaml.cs:行号 237
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
在 System.Windows.Threading.DispatcherOperation.InvokeImpl()
在 MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
在 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
在 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
在 MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
在 System.Windows.Threading.DispatcherOperation.Invoke()
在 System.Windows.Threading.Dispatcher.ProcessQueue()
在 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
在 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
在 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
在 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
在 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
在 System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
在 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
在 MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
在 System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
在 System.Windows.Application.RunDispatcher(Object ignore)
在 System.Windows.Application.RunInternal(Window window)
在 KeqingNiuza.Launcher.App.Main() 位置 D:\a\KeqingNiuza\KeqingNiuza\src\KeqingNiuza.Launcher\obj\Release\App.g.cs:行号 52
from keqingniuza.
启动器无法打开软件本体,但是从bin目录打开exe可以,以上为日志内容
from keqingniuza.
https://github.com/Scighost/KeqingNiuza/blob/main/src/KeqingNiuza.Launcher/MainWindow.xaml.cs#336
from keqingniuza.
你这个问题挺有意思,文档上提到了没有TaskCanceledException异常,但你又的确碰到了。
可能是网络问题,试一试这个检查更新的网页能不能打开。
from keqingniuza.
你这个问题挺有意思,文档上提到了没有TaskCanceledException异常,但你又的确碰到了。 可能是网络问题,试一试这个检查更新的网页能不能打开。
GetByteArrayAsync
[__DynamicallyInvokable]
public Task<byte[]> GetByteArrayAsync(Uri requestUri)
{
return GetContentAsync(requestUri, HttpCompletionOption.ResponseContentRead, HttpUtilities.EmptyByteArray, (HttpContent content) => content.ReadAsByteArrayAsync());
}
GetContentAsync
private Task<T> GetContentAsync<T>(Uri requestUri, HttpCompletionOption completionOption, T defaultValue, Func<HttpContent, Task<T>> readAs)
{
TaskCompletionSource<T> tcs = new TaskCompletionSource<T>();
GetAsync(requestUri, completionOption).ContinueWithStandard(delegate(Task<HttpResponseMessage> requestTask)
{
if (!HandleRequestFaultsAndCancelation(requestTask, tcs))
{
HttpResponseMessage result = requestTask.Result;
if (result.Content == null)
{
tcs.TrySetResult(defaultValue);
}
else
{
try
{
readAs(result.Content).ContinueWithStandard(delegate(Task<T> contentTask)
{
if (!HttpUtilities.HandleFaultsAndCancelation(contentTask, tcs))
{
tcs.TrySetResult(contentTask.Result);
}
});
}
catch (Exception exception)
{
tcs.TrySetException(exception);
}
}
}
});
return tcs.Task;
}
其中,此处可以引起任何异常
try
{
readAs(result.Content).ContinueWithStandard(delegate(Task<T> contentTask)
{
if (!HttpUtilities.HandleFaultsAndCancelation(contentTask, tcs))
{
tcs.TrySetResult(contentTask.Result);
}
});
}
catch (Exception exception)
{
tcs.TrySetException(exception);
}
所以是有可能出现TaskCancelException的
微软的文档不能全信
from keqingniuza.
internal static bool HandleFaultsAndCancelation<T>(Task task, TaskCompletionSource<T> tcs)
{
if (task.IsFaulted)
{
tcs.TrySetException(task.Exception.GetBaseException());
return true;
}
if (task.IsCanceled)
{
tcs.TrySetCanceled();
return true;
}
return false;
}
from keqingniuza.
你这个问题挺有意思,文档上提到了没有TaskCanceledException异常,但你又的确碰到了。 可能是网络问题,试一试这个检查更新的网页能不能打开。
能打开
from keqingniuza.
修复了「已取消一个任务」时的闪退,但是不能保证正常更新。
from keqingniuza.
Related Issues (20)
- 大佬,3.0更新了抽卡历史界面,好像用不了了。谢谢你的更新。 HOT 2
- 似乎无法更新图片卡池信息 HOT 1
- 不知道是不是特例,自动签到显示执行成功但米游社并未成功签到 HOT 1
- 导入记录
- 软件报毒 HOT 2
- 导入由genshin-wish-export导出的数据时,报错 HOT 7
- 未将对象引用设置到对象的实例 如何解决
- 关于祈愿网址的获取 HOT 2
- 多账号只能识别第一个 HOT 4
- 大小保底识别问题 HOT 1
- 关于无法云备份,查看统计、设置界面和米游社签到的报错 HOT 3
- 导入抽卡数据和设置 开始游戏前提醒 时报错
- 播放抽卡BGM希望增加音频通道自定义 HOT 2
- 更新导致所有数据丢失 HOT 3
- 启动时强制更新,但因未知原因无法更新,且更新失败后启动器被删除 HOT 4
- 更新后自动签到失效
- 关于下载地址 CDN 的备用方案 HOT 3
- 不知道发在哪里比较好,提个issue说声作者辛苦啦! HOT 2
- 请求接口时出现异常:invalid request(签到) HOT 8
- 抽卡记录页面更新,获取不到祈愿网址了,期待最终版适配一下 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keqingniuza.