New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 591374 link

Starred by 4 users

Issue metadata

Status: Duplicate
Merged: issue 588434
Owner:
Last visit > 30 days ago
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Canvas contents disappear after switching between tabs

Reported by m...@mkleinhans.de, Mar 2 2016

Issue description

Chrome Version: 49.0.2623.63 (Official Build) beta (64-bit)
URLs: http://go.guidants.com/#c/4996
Other browsers tested:
Firefox: OK
Safari: OK
IE: OK
Chrome 48.0.2564.116 (64-bit) OK
Chrome 51.0.2665.0 (64-bit) FAIL

What steps will reproduce the problem?

I am working on a complex canvas2d based charting library. It is being used on multiple websites.

Starting with Chrome 49 (I also tested canaray 51), the contents of the canvas element
basically "disappear" very often after the tab was in the background.

Unfortunately, I have not yet been able to isolate the problem, and I can not reproduce it reliable 100% of the time.
The following three steps can be used to reproduce the issue, but it does not always appear. Only when trying several times.

1. Open the URL: http://go.guidants.com/#c/4996
There is a small window with a dynamic chart visible in the upper left corner.
2. Switch to another tab. Wait for a short while.
3. Switch back to tab with canvas. 

What is the expected result?
Chart should still be visible.

What happens instead?
Chart is empty.

It can be restored by:
- resizing the canvas element (setting .width or .height)
- switching to another tab and then back again

There are NO errors in the console. 
It is NOT an error with canvas state. I made sure I have no clipping applied, no wrong states saved, etc.
Everything works perfectly fine on other chrome versions or other browsers, and the fact that switching between tabs also restores the contents seems to indicate this is an issue with the browser.

I attached a screen of the empty chart, to show how the problem looks.

System configuration: OS X 10.11.3
 
Screen Shot 2016-03-02 at 15.24.30.png
17.6 KB View Download

Comment 1 by m...@mkleinhans.de, Mar 2 2016

I managed to take a video of the issue with an affected tab: http://cl.ly/fIPF
Every time I switch to the tab the canvas contents are visible for a brief moment, then they disappear completely. Once I manually resize the canvas element (clicking and dragging updates .height), the contents are there again. 

Comment 2 by m...@mkleinhans.de, Mar 3 2016

The bug is still there in final release "49.0.2623.75 (Official Build) (64-bit)".

We will now try to get a workaround live (resizing the canvas restores the surface) that will activate itself based on the user agent (>= Chrome/49). Once that is live, the provided URL will no longer serve as a testcase. I will try to provide another URL, but that might not be possible. 
Cc: kavvaru@chromium.org
Components: Blink>Canvas
Labels: Needs-Feedback M-51
Unable to reproduce the issue on windows 7, Mac 10.11.3 using chrome version 49.0.2623.75 and canary 51.0.2665.0 with the below steps

1. Go to URL http://go.guidants.com/#c/4996
2.Go to another tab and switch
3.Chart is displayed without any issues.

Please find the attached screen cast and confirm anything missed here.
Request you please try the issue on new profile without any extensions and update the thread if the issue still persists.

Thanks,
591374.mp4
923 KB Download

Comment 4 by m...@mkleinhans.de, Mar 3 2016

Thank you. I have managed to capture the bug on two of our platforms.
Video is attached. No extensions and latest build, as shown in video.
recording.mp4
1.4 MB Download

Comment 5 by m...@mkleinhans.de, Mar 3 2016

Regarding the Platform: We have been able to reproduce the issue only on OSX (several machines, different configurations. With and without dGPU if relevant). 
Windows does NOT seem to be affected. 

Comment 6 by junov@chromium.org, Mar 3 2016

Owner: junov@chromium.org
Status: Assigned (was: Unconfirmed)

Comment 7 by junov@chromium.org, Mar 3 2016

Mergedinto: 588434
Status: Duplicate (was: Assigned)
I am seeing a similar behavior on My Windows 7 PC running Chrome Version 50.0.2661.102 m.  A custom canvas element renders fine, but if I switch to another tab, the canvas content often disappears when I return to that tab.

Comment 9 by agla...@gmail.com, Jun 16 2016

I have the same problem using Windows 7 Professional 64-bit and Chrome Version 51.0.2704.84 m

I can reproduce it using the steps from the original post.

Comment 10 by t...@rulez.org, Apr 9 2018

Same with Version 65.0.3325.181 (Official Build) (64-bit) on Debian Linux

Sign in to add a comment