You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WPF StylusPointPropertyInfo may throw ArgumentException in some machine #8826
I'm sorry, this is not a good feedback issues, and I can not find the reproduction steps and machine. My users are reporting to me about app crashes with the exception:
System.ArgumentException: "{0}" must be greater than or equal to "{1}". (Parameter 'maximum');
at System.Windows.Input.StylusPointPropertyInfo..ctor(StylusPointProperty stylusPointProperty, Int32 minimum, Int32 maximum, StylusPointPropertyUnit unit, Single resolution)
at System.Windows.Input.PenContext.InitStylusPointDescription()
at System.Windows.Input.PenContext.FirePenInRange(Int32 stylusPointerId, Int32[] data, Int32 timestamp)
at System.Windows.Input.PenThreadWorker.FireEvent(PenContext penContext, Int32 evt, Int32 stylusPointerId, Int32 cPackets, Int32 cbPacket, IntPtr pPackets)
at System.Windows.Input.PenThreadWorker.ThreadProc()
at System.Threading.Thread.StartHelper.Callback(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Thread.StartCallback();
By the ways, I think the PenThreadWorker will crash the application when receive any exception, and how about we catch the exception and fallback to disable the touch?
Activity
lindexi commentedon Feb 20, 2024
By the ways, I think the PenThreadWorker will crash the application when receive any exception, and how about we catch the exception and fallback to disable the touch?
Fix StylusPointPropertyInfo crash from invalid HID min/max values