dwmkerr / dwmkerr/consolecontrol
Stopping process throws error
- Dominant language
- C#
- Stars
- 786
- Forks
- 166
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 1
Description
calling consoleControl.StopProcess(); from a wpf button or stopping the process from within the process causes an error in the following function.
public bool ShowDiagnostics
{
get { return (bool)GetValue(ShowDiagnosticsProperty); }
set { SetValue(ShowDiagnosticsProperty, value); }
}
An unhandled exception of type 'System.InvalidOperationException' occurred in WindowsBase.dll
Additional information: The calling thread cannot access this object because a different thread owns it."
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure by calling consoleControl.StopProcess() from a WPF button and by stopping the process internally. Start in ConsoleControl.xaml.cs at the ShowDiagnostics property and inspect the thread involved when the InvalidOperationException occurs. Done means stopping the process no longer raises the cross-thread WindowsBase exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100