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

Pressing the mouse side button will cause the program to crash #98

Closed
loktindyi opened this issue Oct 10, 2020 · 2 comments · Fixed by #113
Closed

Pressing the mouse side button will cause the program to crash #98

loktindyi opened this issue Oct 10, 2020 · 2 comments · Fixed by #113
Assignees
Labels
Bug Something isn't working Enhancement New feature or request Good First Issue Good for newcomers

Comments

@loktindyi
Copy link

Pressing the mouse side button will cause the program to crash.
But when I play a full screen FPS game and press the side mouse button, it doesn't crash, but the volume bar still appears.
In addition, it is recommended to stop detecting caps when a game is detected.

@ShankarBUS
Copy link
Member

Pressing the mouse side button will cause the program to crash.
But when I play a full screen FPS game and press the side mouse button, it doesn't crash.

I don't have a gaming mouse so it may take me some time to find the cause of the crash.

but the volume bar still appears.

The volume bar appearing while pressing those buttons is weird. There's already an issue regarding this. I'll try to find a workaround for this.

In addition, it is recommended to stop detecting caps when a game is detected.

I can feel your inconvenience. I'll do my best.

@ShankarBUS ShankarBUS added Bug Something isn't working Enhancement New feature or request Good First Issue Good for newcomers labels Oct 10, 2020
@yume-chan
Copy link
Contributor

yume-chan commented Oct 16, 2020

FYI the exception is:

System.OverflowException
  HResult=0x80131516
  Message=Arithmetic operation resulted in an overflow.
  Source=System.Private.CoreLib
  StackTrace:
   at System.IntPtr.op_Explicit(IntPtr value)
   at ModernFlyouts.FlyoutHandler.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) in C:\Users\Simon\Documents\git\ModernFlyouts\ModernFlyouts\FlyoutHandler.cs:line 293
   at System.Windows.Interop.HwndSource.PublicHooksFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   at System.Windows.Threading.Dispatcher.Run()
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at System.Windows.Application.Run()
   at ModernFlyouts.Program.Main(String[] args) in C:\Users\Simon\Documents\git\ModernFlyouts\ModernFlyouts\Program.cs:line 27

That's

https://github.com/ShankarBUS/ModernFlyouts/blob/1063dd4f27318ec0b913a5340ee86b19182b1e71/ModernFlyouts/FlyoutHandler.cs#L293-L297

And the value of lParam is 0x0000000080020000.


It's funny that the crash didn't happen on my main PC so I meant to debug #88.

But when I use Remote Desktop to connect to my dev PC and run your code inside Visual Studio, it suddenly crashed.

More interestingly, it still "successfully" popped on my main PC so I was confused for one second.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working Enhancement New feature or request Good First Issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants