usaginya / MoeLoader-Delta

Improved branching version of MoeLoader
GNU General Public License v3.0
242 stars 35 forks source link

站点konachan短时间内获取图片数量过多后,可能导致程序报错闪退 #124

Open Mrodot opened 3 years ago

Mrodot commented 3 years ago

RT,似乎在设置较大的每页图片数值,再多次切换页面后会提示下面这个错误,然后程序就报错退出了。

2021-07-02_143922

System.ArgumentOutOfRangeException: 指定的参数已超出有效值的范围。
参数名: index
   在 System.Windows.Media.VisualCollection.get_Item(Int32 index)
   在 System.Windows.Controls.UIElementCollection.get_Item(Int32 index)
   在 MoeLoaderDelta.MainWindow.ItmSelectAll_Click(Object sender, RoutedEventArgs e)
   在 MoeLoaderDelta.MainWindow.Window_KeyDown(Object sender, KeyEventArgs e)
   在 System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   在 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   在 System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   在 System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   在 System.Windows.Input.InputManager.ProcessStagingArea()
   在 System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   在 System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   在 System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
   在 System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
   在 System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
   在 System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
   在 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)
   在 System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
   在 System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled)
   在 System.Windows.Interop.HwndSource.WeakEventPreprocessMessage.OnPreprocessMessage(MSG& msg, Boolean& handled)
   在 System.Windows.Interop.ThreadMessageEventHandler.Invoke(MSG& msg, Boolean& handled)
   在 System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG& msg)
   在 System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   在 System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   在 System.Windows.Application.RunDispatcher(Object ignore)
   在 System.Windows.Application.RunInternal(Window window)
   在 System.Windows.Application.Run(Window window)
   在 MoeLoaderDelta.Program.Main(String[] args)
usaginya commented 3 years ago

RT,似乎在设置较大的每页图片数值,再多次切换页面后会提示下面这个错误,然后程序就报错退出了。

2021-07-02_143922

System.ArgumentOutOfRangeException: 指定的参数已超出有效值的范围。
参数名: index
   在 System.Windows.Media.VisualCollection.get_Item(Int32 index)
   在 System.Windows.Controls.UIElementCollection.get_Item(Int32 index)
   在 MoeLoaderDelta.MainWindow.ItmSelectAll_Click(Object sender, RoutedEventArgs e)
   在 MoeLoaderDelta.MainWindow.Window_KeyDown(Object sender, KeyEventArgs e)
   在 System.Windows.Input.KeyEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
   在 System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
   在 System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   在 System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   在 System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   在 System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
   在 System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
   在 System.Windows.Input.InputManager.ProcessStagingArea()
   在 System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
   在 System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
   在 System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)
   在 System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG& msg, Boolean& handled)
   在 System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG& msg, ModifierKeys modifiers)
   在 System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)
   在 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)
   在 System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
   在 System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG& msg, Boolean& handled)
   在 System.Windows.Interop.HwndSource.WeakEventPreprocessMessage.OnPreprocessMessage(MSG& msg, Boolean& handled)
   在 System.Windows.Interop.ThreadMessageEventHandler.Invoke(MSG& msg, Boolean& handled)
   在 System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG& msg)
   在 System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   在 System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   在 System.Windows.Application.RunDispatcher(Object ignore)
   在 System.Windows.Application.RunInternal(Window window)
   在 System.Windows.Application.Run(Window window)
   在 MoeLoaderDelta.Program.Main(String[] args)

出现红色的解析错误是因为站点没有给出正确的结果、可能是站点拒绝请求或者站点没有更多结果 崩溃退出是因为全选的功能有点逻辑的bug、下个版本尝试修复这个bug

daialing commented 3 years ago

坐等解决 我也一直为这个问题困扰。。或者有没有更详细的软件使用说明啊