dotnet / dotnet/wpf

ObjectDisposedException when PenThreadWorker.ThreadProc

Open
#7,946 0 comments 0 reactions 0 assignees View on GitHub
area-Touch Bug needs more information
Dominant language
C#
Stars
7.7k
Forks
1.3k
Avg merge
1d 11h
Merged PRs (30d)
61

Description

### Description

The `WorkerOperation.DoWork` in `PenThreadWorker.ThreadProc` will throw System.ObjectDisposedException.

This is not a good report and I lack the steps to reproduce it.

This exception info from my application telemetry.

### Reproduction Steps

None.

### Expected behavior

Work well.

### Actual behavior

Throw System.ObjectDisposedException

```
System.ObjectDisposedException: Safe handle has been closed.

Object name: 'SafeHandle'.
in void SafeHandle.DangerousAddRef(ref bool success)
in bool Kernel32.SetEvent(SafeWaitHandle handle)
in bool EventWaitHandle.Set()
in void WorkerOperation.DoWork()
in void PenThreadWorker.ThreadProc()
in void Thread.StartCallback()
```

### Regression?

_No response_

### Known Workarounds

_No response_

### Impact

_No response_

### Configuration

OS: Microsoft Windows 10.0.19041

.NET: .NET 6.0.1

### Other information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.