-
Notifications
You must be signed in to change notification settings - Fork 49
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
Bug with multiple monitors - in mode duplicated displays #39
Comments
I'm fully able to reproduce this issue. |
Thanks guys, Hopefully #30 will address this. |
I'm currently digging into it. It seems a D3D9 related problem, as I'm able to reproduce the same issue in a separate project that does not have the GLWpfControl (it has only D3D9 and WPF, no OpenGL context). Basically when the lid is closed, the D3D9 object and device go in some "faulted" state that I'm not able to detect atm. Then WPF is trying to render the surface created previously but it fails with the error previously mentioned. The PR you mentioned has some infrastructure to recover from a failed D3D9 context, so as soon as I'm finding the root cause of the issue, I'll integrate the patch in that PR. |
Update: The existent D3D9 device looks good (strangely). In fact, The solution was detecting this situation just before the render. If so, it clears everything (D3D9 context, devices and framebuffers), while aborting the current frame. The rendering will resume when there will be a new context with a new valid associated monitor handle. I'm aware that this is not a perfect solution, but this is my best guess. I've had no luck in looking to the net. |
Resolving this issue will have to be moved to |
#30 is moved to |
Didn't get to the multi-monitor/multi-gpu issues this version. But hopefully next version we can fix this. |
I was just playing with the GLWpfControl - testing for multiple monitors. Works well with extended monitors - one can drag from display to display. Switching monitor off is no problem.
It crashes, however, in the following scenario (my preferred configuration): Normally I work at FullHD - seeing on both the notebook monitor and external monitor the same stuff (displays are duplicated). When I close the lid of computer - the main monitor shows 4K. It was working fine with GLControl but not with GLWpfControl - yet.
The GLWpfControl.Example in such a case (no matter whether we close the lid or open it) freezes on some lock in PreRender function.
My application (when lid is closed or opened) crashes instead - on some Interop: Message=UCEERR_RENDERTHREADFAILURE (0x88980406).
I guess should be easy to reproduce for anyone.
Seems when the context is given - it is not able to change automatically to match the other monitor settings? But I only speculate here...
The text was updated successfully, but these errors were encountered: