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

[Wine][Ch.8] InvalidCastException on startup when registering key hooks #130

Open
drojf opened this issue Aug 23, 2024 · 0 comments
Open

Comments

@drojf
Copy link
Contributor

drojf commented Aug 23, 2024

I saw this error on the logs, likely due to lack of error checking in KeyHook.cs

InvalidCastException: Cannot cast from source type to destination type.
  at System.Diagnostics.ProcessModuleCollection.get_Item (Int32 index) [0x00000] in <filename unknown>:0 
  at System.Diagnostics.Process.get_MainModule () [0x00000] in <filename unknown>:0 
  at (wrapper remoting-invoke-with-check) System.Diagnostics.Process:get_MainModule ()
  at Assets.Scripts.Core.KeyHook.SetHook (Assets.Scripts.Core.LowLevelKeyboardProc proc) [0x00000] in <filename unknown>:0 
  at Assets.Scripts.Core.KeyHook..ctor () [0x00000] in <filename unknown>:0 
  at Assets.Scripts.Core.GameSystem.Initialize () [0x00000] in <filename unknown>:0 
  at Assets.Scripts.Core.GameSystem.CheckInitialization () [0x00000] in <filename unknown>:0 
  at Assets.Scripts.Core.GameSystem.Update () [0x00000] in <filename unknown>:0 

Full Log: log.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant