webrtc-sdk / libwebrtc

A C++ wrapper for binary release, mainly used for flutter-webrtc desktop (windows, linux, embedded).
MIT License
382 stars 78 forks source link

Get current process window failed when enumerate window in thread_. #47

Open chifandeyu opened 1 year ago

cloudwebrtc commented 1 year ago

hey @chifandeyu, Thanks for your contribution, can you explain under what circumstances the thread error occurs?

chifandeyu commented 1 year ago

@cloudwebrtc After debugging webrtc. I found the function "GetWindowListHandle" call "IsWindowResponding(hwnd)" return false. set "uTimeoutMs = 3000" will still timeout and return false.I haven't found any detailed information for the specific reasons.

chifandeyu commented 1 year ago

hey @chifandeyu, Thanks for your contribution, can you explain under what circumstances the thread error occurs?

I found the problem when the worker thread tries to SendMessageTimeout to check Is window responding but now the main thread is waiting and the main thread is blocking.

image

image