-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
WPF - Browser goes blank if used in combination with TabControl #2779
Comments
Looks like a bug in CEF, will add more details later. I suspect that testing with with cefclient and minimizing/maximizing the window will probably reproduce the same problem. For now rollback to version 71. |
This comment has been minimized.
This comment has been minimized.
@hucongquan If you are using
Probably the render process is crashing with an out of memory exception if you are loading huge amounts of data. Upgrading to a newer version of Now back to the actual issue at hand. The
It's probably worth someone creating an issue Probably next week I'll do some more testing to see if there's a viable workaround. |
Please only post further comments if you have a viable workaround, other non constructive comments will likely be removed. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
We had a similar problem, and a resize on show helped as workaround. |
Once the cefsharp/75 branch is created I'll look at applying a hack to resize the browser when it becomes visible. Viz support should be available in the 77 release, so hopefully this will be resolved properly. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thanks guys - I managed to get it set up and working, but the width/height change is messing up the other resize code/bindings we have, so that's not great. @amaitland any idea if there's another way to "give it a kick" without setting the width/height? It's pretty easy to reproduce using the latest WPF example in case you haven't seen (assuming it's the same issue): |
This comment has been minimized.
This comment has been minimized.
@mol I'm not aware of another way. How are you resizing? My plan is to use an approach similar to https://github.com/cefsharp/CefSharp/blob/master/CefSharp.Wpf.Example/Controls/ChromiumWebBrowserWithScreenshotSupport.cs I will implement a workaround hopefully tomorrow if all goes well. |
@nocanstillbb yeah I'm using SetCurrentValue but it's not that it's clearing a binding, it's that we have some JavaScript triggering resizes as well when the content in the browser changes (and it seems to break as a result of the workaround. Probably some kind of timing/race condition issue). @amaitland that would be amazing. I tried forcing the InteropBitmapRenderHandler to create a new Bitmap but then I saw it was already doing it when the issue occurs, and I can't see what the difference is for when it works (with the resizing hack) and when it doesn't. But I can't say I'm familiar with the code so hopefully you can figure it out :) |
@amaitland you probably already know but I just noticed that the elements on the page shown in the browser are still clickable in the blank browser, they're just not drawn. |
Do this so it's easier to implement a workaround for #2779
Rough hack was added in 0d67b05 Will add more details tomorrow. It's had some testing, needs quite a bit more. |
Thanks a lot Alex, I really appreciate it. Looks interesting. When you think it's ready we'll release it as an alpha for testing. |
Do this so it's easier to implement a workaround for #2779
So the hack basically works like this
Attempting to resize the browser when the hack is running shouldn't cause any problems though I've only tested whilst my automated test was running, so it's not a definitive test. The new value should be stored and restored as it's original dimensions. The hack will take ~150ms to run, it might be possible to reduce this, reducing the 50ms wait before Further changes
I've had the @mol Should be ready for a wider audience to test, I've only tried against version |
@Shankp It's likely though I cannot say for sure without an actual example.
For version The 81.3.20-pre release is on |
@amaitland Would be great if we could expose the the method |
@deonberlin Is there something stopping you from using reflection? In this case I'm not keen on making this part of the public API. |
@amaitland I thought of this, because the properties for configuring this hack are also public and for some use-cases it's a requirement to apply this hack, until the issue is resolved. But I understand your concerns and will go with reflection. |
…2779) - Add 1 to the width/height rather than subtracts like the hack in the previous versions - Delay between resizes is now configurable via ResizeHackForIssue2279DelayInMs
…2779) - Add 1 to the width/height rather than subtracts like the hack in the previous versions - Delay between resizes is now configurable via ResizeHackForIssue2279DelayInMs
@amaitland I see that 88.1.0-CI3869 doesn't resize on tab change and this issue is not reproducible there. |
@dkrainyk Before a final release I do some testing to see if the problem reproduces, if it does then I manually cherry pick the required commit into the release branch. As yet I haven't done in testing for |
I can reproduce the problem in version 88, so the hack will stay enabled by default. |
@amaitland Most device is ok, but a new Sureface with the latest version also didn't work. blank ui, but resize will show. |
As per https://github.com/cefsharp/CefSharp/releases/tag/v89.0.170 |
thank you very much for your reply. I will check the details.
…---Original---
From: "Alex ***@***.***>
Date: Sun, May 9, 2021 00:34 AM
To: ***@***.***>;
Cc: ***@***.******@***.***>;
Subject: Re: [cefsharp/CefSharp] Browser goes blank if used in combination with WPF TabControl (#2779)
WPF the browser stops redrawing when running on Intel Iris Xe Integrated GPU(11th Gen). The issue has been reported to the WPF team see dotnet/wpf#3817
As per https://github.com/cefsharp/CefSharp/releases/tag/v89.0.170
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
@kkwpsv I see in your commit you disabled resize hack and commented WasHidden usages, did it help? |
Yes. It'll not go blank. But it may has performance issuess. When browser is hidden. it will continue to render. |
…ible (#2779) Problem still reproduces, so readding hack to release branch
version 93 and still happening... any news about this? |
@rothariger As I've stated before, it's an upstream bug, the best we can do is attempt a workaround. Upstream issue https://bitbucket.org/chromiumembedded/cef/issues/2483/osr-invalidate-does-not-generate-frame The workaround is included in the 93-pre release see commit 9140c08 if you have a use case for which this doesn't work you are welcome to debug and submit an PR with improvements. The workaround isn't included in the master branch deliberately so it's easier to test with new versions. |
An upstream fix has just been committed and will be available in version 94. https://bitbucket.org/chromiumembedded/cef/commits/b156d790e35e1fea7e92097339a03a0185548f1d |
For those using Intel Iris Xe Integrated GPU(11th Gen) there is an issue that maybe mistake for this one where the browser stops redrawing. There is a bug in the driver for which Intel have released an update, see https://www.intel.com/content/www/us/en/support/articles/000058136/graphics/graphics-for-11th-generation-intel-processors.html See dotnet/wpf#3817 for workaround if you are unable to install the updated driver. |
- Adds a simplified version of the resize hack used to workaround issue #2779 Related discussion #4274 Upstream Issue https://bitbucket.org/chromiumembedded/cef/issues/3427/osr-rendering-bug-when-minimizing-and
What version of the product are you using?
Nuget 73.1.130 and 74.1.130-CI3117 (not reproducible on 71.0.2)
What architecture x86 or x64?
x64
On what operating system?
Win10
Are you using
WinForms
,WPF
orOffScreen
?WPF
What steps will reproduce the problem?
Use TabControl (or similar approach) to launch ~10 tabs of ChromiumWebBrowser pointing to google.com
Switch between tabs and eventually (after 10-20 switches) browser will go blank (according to debug tools browser still works and you can execute JS, change DOM, etc.).
Adapted minimal example: dkrainyk/CefSharp.MinimalExample@8fa4bd5
What is the expected output? What do you see instead?
Browser window goes blank. Page should be visible.
Please provide any additional information below.
debug.log is empty
Does this problem also occur in the
CEF
Sample Application from http://opensource.spotify.com/cefbuilds/index.html?N/A
The text was updated successfully, but these errors were encountered: