Avalonia icon indicating copy to clipboard operation
Avalonia copied to clipboard

Deadlock of UI thread and background render thread

Open hamster620 opened this issue 1 year ago • 0 comments

Sometimes the UI thread may be blocked because of deadlock of UI thread and background render thread. Both threads are trying to access Dispatcher and ServerCompositor which lock Dispatcher.InstanceLock and ServerCompositor._lock in different order.

Stack trace of UI thread: 截圖 2023-07-11 下午8 14 35

Stack trace of background render thread: 截圖 2023-07-11 下午8 14 58

To Reproduce In our side, ServerCompositor is called by closing ToolTip by posting an action to Dispatcher.

Expected behavior No deadlock, at least not to block the UI thread.

Screenshots N/A

Desktop (please complete the following information):

  • OS: macOS 13.4.1
  • Version: 11.0.0

hamster620 avatar Jul 11 '23 12:07 hamster620