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

X86 hook方式添加游戏,选择获取文本后,确认方法报错 #302

Open
wswdatao opened this issue Jun 25, 2023 · 2 comments
Open
Labels
bug Something isn't working

Comments

@wswdatao
Copy link

还有个问题是,电脑是64位,我选择X64注入后无法获取文本,所以才选择86

==============System Info================
System:Microsoft Windows NT 10.0.19045.0
CurrentTime:2023/6/25 19:23
dotNetVersion:4.0.30319.42000
MisakaTranslatorVersion:2.12.2.0
==============Exception Info================
ExceptionType:UI Thread
ExceptionName:System.ArgumentOutOfRangeException
ExceptionSource:mscorlib
ExceptionMessage:索引超出范围。必须为非负值并小于集合大小。
参数名: index
ExceptionStackTrace: 在 System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
在 System.Collections.Generic.List`1.get_Item(Int32 index)
在 TextHookLibrary.TextHookHandle.d__37.MoveNext() 位置 D:\a\MisakaTranslator\MisakaTranslator\TextHookLibrary\TextHookHandle.cs:行号 350
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
在 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 Info================
System:Microsoft Windows NT 10.0.19045.0
CurrentTime:2023/6/25 19:23
dotNetVersion:4.0.30319.42000
MisakaTranslatorVersion:2.12.2.0
==============Exception Info================
ExceptionType:Non UI Thread
ExceptionName:System.ArgumentOutOfRangeException
ExceptionSource:mscorlib
ExceptionMessage:索引超出范围。必须为非负值并小于集合大小。
参数名: index
ExceptionStackTrace: 在 System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
在 System.Collections.Generic.List`1.get_Item(Int32 index)
在 TextHookLibrary.TextHookHandle.d__37.MoveNext() 位置 D:\a\MisakaTranslator\MisakaTranslator\TextHookLibrary\TextHookHandle.cs:行号 350
--- 引发异常的上一位置中堆栈跟踪的末尾 ---
在 System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__6_0(Object state)
在 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()

@wswdatao wswdatao added the bug Something isn't working label Jun 25, 2023
@imba-tjd
Copy link
Collaborator

看不出原因。TextHookHandle.cs:行号 350 啥也没有

@wswdatao
Copy link
Author

那问题就不确定了,然后刚刚试了下,先使用ocr的方式添加 再切换到hook就正常了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants