hanmin0822 / MisakaTranslator

御坂翻译器—Galgame/文字游戏/漫画多语种实时机翻工具
GNU General Public License v3.0
4.93k stars 434 forks source link

RegisterHotKey不支持F区按键 #251

Open szlysms opened 2 years ago

szlysms commented 2 years ago

问题描述 打开之后闪退,删除settings文件夹之后可以打开,但下一次还是会一打开就闪退

应用版本 2.11 (我尝试了debug版,也有这样的问题) 系统信息 版本 Windows 10 企业版 LTSC 版本号 21H2 安装日期 ‎2022/‎3/‎27 操作系统内部版本 19044.1620 体验 Windows Feature Experience Pack 120.2212.4170.0

LOG1 ==============System Info================ System:Microsoft Windows NT 10.0.19044.0 CurrentTime:2022/9/8 18:52 dotNetVersion:4.0.30319.42000 MisakaTranslatorVersion:2.11.0.0 ==============Exception Info================ ExceptionType:Non UI Thread ExceptionName:System.ArgumentException ExceptionSource:mscorlib ExceptionMessage:未找到请求的值“DF12”。 ExceptionStackTrace: 在 System.Enum.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument) 在 System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult) 在 System.Enum.Parse(Type enumType, String value, Boolean ignoreCase) 在 System.Enum.Parse(Type enumType, String value) 在 KeyboardMouseHookLibrary.GlobalHotKey.RegisterHotKeyByStr(String str, IntPtr handle, HotKeyCallBackHandler callback) 位置 C:\Users\Administrator\Downloads\MisakaTranslator-master\KeyboardMouseHookLibrary\GlobalHotKey.cs:行号 97 在 MisakaTranslator_WPF.MainWindow.MainWindow_SourceInitialized(Object sender, EventArgs e) 位置 C:\Users\Administrator\Downloads\MisakaTranslator-master\MisakaTranslator-WPF\MainWindow.xaml.cs:行号 142 在 System.EventHandler.Invoke(Object sender, EventArgs e) 在 System.Windows.Window.OnSourceInitialized(EventArgs e) 在 HandyControl.Controls.Window.OnSourceInitialized(EventArgs e) 在 System.Windows.Window.CreateSourceWindow(Boolean duringShow) 在 System.Windows.Window.CreateSourceWindowDuringShow() 在 System.Windows.Window.SafeCreateWindowDuringShow() 在 System.Windows.Window.ShowHelper(Object booleanBox) 在 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() 在 System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state) 在 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.Threading.Dispatcher.PushFrame(DispatcherFrame frame) 在 System.Windows.Application.RunDispatcher(Object ignore) 在 System.Windows.Application.RunInternal(Window window) 在 System.Windows.Application.Run(Window window) 在 System.Windows.Application.Run() 在 MisakaTranslator_WPF.App.Main()

LOG2 ==============System Info================ System:Microsoft Windows NT 10.0.19044.0 CurrentTime:2022/9/8 18:52 dotNetVersion:4.0.30319.42000 MisakaTranslatorVersion:2.11.0.0 ==============Exception Info================ ExceptionType:UI Thread ExceptionName:System.ArgumentException ExceptionSource:mscorlib ExceptionMessage:未找到请求的值“DF12”。 ExceptionStackTrace: 在 System.Enum.EnumResult.SetFailure(ParseFailureKind failure, String failureMessageID, Object failureMessageFormatArgument) 在 System.Enum.TryParseEnum(Type enumType, String value, Boolean ignoreCase, EnumResult& parseResult) 在 System.Enum.Parse(Type enumType, String value, Boolean ignoreCase) 在 System.Enum.Parse(Type enumType, String value) 在 KeyboardMouseHookLibrary.GlobalHotKey.RegisterHotKeyByStr(String str, IntPtr handle, HotKeyCallBackHandler callback) 位置 C:\Users\Administrator\Downloads\MisakaTranslator-master\KeyboardMouseHookLibrary\GlobalHotKey.cs:行号 97 在 MisakaTranslator_WPF.MainWindow.MainWindow_SourceInitialized(Object sender, EventArgs e) 位置 C:\Users\Administrator\Downloads\MisakaTranslator-master\MisakaTranslator-WPF\MainWindow.xaml.cs:行号 142 在 System.EventHandler.Invoke(Object sender, EventArgs e) 在 System.Windows.Window.OnSourceInitialized(EventArgs e) 在 HandyControl.Controls.Window.OnSourceInitialized(EventArgs e) 在 System.Windows.Window.CreateSourceWindow(Boolean duringShow) 在 System.Windows.Window.CreateSourceWindowDuringShow() 在 System.Windows.Window.SafeCreateWindowDuringShow() 在 System.Windows.Window.ShowHelper(Object booleanBox) 在 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)

imba-tjd commented 2 years ago

治标:别用F12作为截图快捷键

szlysms commented 2 years ago

治标:别用F12作为截图快捷键

不是这个原因,我后面删了重装后用默认的快捷键仍然会闪退,管理员也一样 临时解决方法:使用dism++工具箱中的春哥附体功能,之后随便折腾几乎不会闪退 image 不知道是不是因为权限不足导致的崩溃

imba-tjd commented 2 years ago

你别把不同的问题放在一个issue里说啊。本issue就是不支持F12,你还闪退那是别的问题,texttractor不存在或启动失败也是别的问题。 当然如果你强烈要求关闭某个issue也行咯