且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

算术运算导致InputLanguageChangingEventArgs中溢出

更新时间:2023-11-10 16:25:52

之前经历过这样的行为,我在Greenshot看到了OverflowException,在这里我研究了我到达这里。 / p>

以下是有关问题的其他信息:
在MSDN上有一些注释: https://msdn.microsoft.com/en-us/library/windows/desktop/ms632630( v = vs85).aspx
据说Windows消息不会发布在例如Windows 7,我可以确认我从来没有看到它,不能复制它。



这里还有一些信息输入语言信息是什么?: a href =http://www.siao2.com/2006/05/16/598980.aspx =nofollow> http://www.siao2.com/2006/05/16/598980.aspx



我目前认为,对于我的应用程序,消息并不重要,所以我添加了Torvin的解决方案来忽略它...


I am having an issue with a user where my application just throws and unhandled exception for no particular reason. I am not sure what is causing this as the application itself does not check nor handle anything remotely related to and Input Language change event. The exception is pretty vague as it stands with no inner exception or any other information that tells what is going on as it seems to be an arithmetic overflow exception.

Here is the exception message and stack trace:

Type:        System.OverflowException
Message:     算術演算の結果オーバーフローが発生しました。
Source:      System.Windows.Forms
Stack Trace: 場所 System.Windows.Forms.InputLanguageChangingEventArgs..ctor(InputLanguage inputLanguage, Boolean sysCharSet)
   場所 System.Windows.Forms.Control.WmInputLangChangeRequest(Message& m)
   場所 System.Windows.Forms.Control.WndProc(Message& m)
   場所 System.Windows.Forms.ButtonBase.WndProc(Message& m)
   場所 System.Windows.Forms.Button.WndProc(Message& m)
   場所 System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

The exception message is "Arithmetic operation resulted in an overflow". Has anyone experienced such behaviour before

I have seen the "OverflowException" in Greenshot, where I researched this I arrived here.

Here is some additional information to the issue: On MSDN there are some comments to it: https://msdn.microsoft.com/en-us/library/windows/desktop/ms632630(v=vs.85).aspx It is said that the Windows-Message is not posted on e.g. Windows 7, which I can confirm I have never seen it and can't reproduce it.

Here is also some information "WHAT BROKE THE INPUT LANGUAGE MESSAGES?": http://www.siao2.com/2006/05/16/598980.aspx

I currently think that for my application the message is not important, so I added Torvin's solution to ignore it...