-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Exception "Collection was modified" in System.Windows.Input.StylusWisp on remote desktop #7222
Comments
Can you provide us a sample repro application ? |
Unfortunately not, it happened just one time when I connected via remote desktop. |
@Lumoryel I review the code and I find all the wpf/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispLogic.cs Lines 3336 to 3339 in 368f0e8
|
@lindexi You're right. I can't find code that modifies __penContextsMap without a lock. By the way I saw that not all methods are in lock(__penContextsLock) when accessing __penContextsMap e.g. via TryGetValue(). But this shouldn't be the cause for the exception. Sure that this source code also applies for .net framework 4.8 ? |
How about this one wpf/src/Microsoft.DotNet.Wpf/src/PresentationCore/System/Windows/Input/Stylus/Wisp/WispLogic.cs Line 1365 in 368f0e8
@Lumoryel is correct that this enumerates the collection without locking from You can use ILSpy to check whether the assemblies you are using on that machine contain the code you are looking for, both 3.0 and latest version of PresentationCore do seem to include these locks though. If you can reproduce, time travel would be helpful. |
@Lumoryel Do we have any more inputs on this? A TTD trace or some reliable sample repro? |
@singhashish-wpf I never saw this bug again. Actually I'm confused about where to look for 4.8 and 4.8.1 code? (I had this problem here with a 4.8 framework application: #6319) |
Just had this happen with our application. The user RDP'd from their laptop (with touch/pen support) to their desktop (without pen support) where our aplication was already running. Our app is using .NET 6, and both PCs are running Windows 11. Unfortunately we don't have any good repro steps for it. Just wanted to mention another sighting |
I do have a minidump of the crash if it would be helpful. |
Had this issue occurred once on my app, when a DisplayLink touch screen was removed from USB. |
Hi there,
got this exception today on a remote machine directly after connecting via windows remote desktop:
We have a .NET Framework 4.8 WPF Program running in the background, the window was not visible at that moment.
Running on Windows 11 Pro.
The text was updated successfully, but these errors were encountered: