Bad display and graphics artefacts when editing with Google Sheets

RESOLVED FIXED

Status

()

Core
Canvas: 2D
--
critical
RESOLVED FIXED
8 months ago
3 months ago

People

(Reporter: Andrei Boros, Unassigned)

Tracking

({crash, regression})

50 Branch
x86
Windows 7
crash, regression
Points:
---

Firefox Tracking Flags

(platform-rel -, firefox51 wontfix, firefox52- wontfix, firefox-esr52 fixed, firefox53 fixed, firefox54 fixed)

Details

(Whiteboard: [platform-rel-Google][platform-rel-GoogleSuite][platform-rel-GoogleSheets], crash signature)

Attachments

(2 attachments)

(Reporter)

Description

8 months ago
I am encountering a consistent crash scenario while editing Google Sheets. 
Tested with 2 different installation of Firefox on 2 different computers: 
Firefox 51.0.1 32bit, win 7 64bit. 
Firefox 51.0.1 32bit, win xp 32bit. 

I can confirm the problem with all addons enabled and disabled. IMO addons can be excluded based on this. 

The crash is triggered by at least one of the following conditions: 
Case A:
-------
1) open a Google Sheets document.
Some, more complex documents, trigger the crash while the Google Sheets editor is loading.

Case B:
-------
1) open a Google Sheets document.
2) try to resize a column by dragging the column header separator (see attached screenshot)

Since the files I were working on are confidential, I will reproduce these with some other files and attach the relevant information a bit later.
(Reporter)

Comment 1

8 months ago
When crashing, sometimes I also get a crash from "plugin-container", but not always and not on both browser installations tested.
(Reporter)

Comment 2

8 months ago
Created attachment 8837533 [details]
crash-report.txt

Crash report generated by Firefox. Since I am reporting it separately, I saved the  details of the report as a file and uploading it.

I am posting this URL https://drive.google.com/open?id=10WUl2OkiPbMC9DoYzONYrCHqOcxSQ3I5B_bXjhPHD0o for a non-confidential Google Sheets document I used for testing, also featured in a screenshot. 
Permission is for anyone with the link to edit the file.
(Reporter)

Comment 3

8 months ago
Created attachment 8837534 [details]
sheets.png

Screenshot for column resizing that triggers the crash.

Comment 4

8 months ago
Could you copy the link of the crash report from about:crashes.
Flags: needinfo?(andrixnet)
(Reporter)

Comment 5

8 months ago
I uploaded the details of the crash report (as the crash reporter showed) here: https://bugzilla.mozilla.org/attachment.cgi?id=8837533 but I did not complete the report via the crash reporter, instead filed this issue. 

If need be, I can reproduce the crash and let the crash reporter complete it's task, if the attached file is not enough.
(Reporter)

Comment 6

8 months ago
https://crash-stats.mozilla.com/report/index/736a634e-8ba9-4bb1-ab2c-170f82170218

Comment 7

8 months ago
Your issue is probably a duplicate of bug 1335359.
Could you type about:support in the location bar and copy the section "graphics".

Updated

8 months ago
Severity: major → critical
Component: General → Canvas: 2D
Keywords: crash
Product: Firefox → Core
(Reporter)

Comment 8

8 months ago
Graphics
Features
Compositing	Direct3D 11
Asynchronous Pan/Zoom	none
WebGL Renderer	Google Inc. -- ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)
WebGL2 Renderer	Google Inc. -- ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)
Hardware H264 Decoding	No; Hardware video decoding disabled or blacklisted
Audio Backend	wasapi
DirectWrite	false (6.1.7601.17789)
GPU #1
Active	Yes
Description	Intel(R) HD Graphics 4000
Vendor ID	0x8086
Device ID	0x0162
Driver Version	9.17.10.2828
Driver Date	7-31-2012
Drivers	igdumd64 igd10umd64 igd10umd64 igdumd32 igd10umd32 igd10umd32
Subsys ID	1790103c
RAM	Unknown
Diagnostics
ClearType Parameters	Gamma: 2.2 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 400
AzureCanvasAccelerated	0
AzureCanvasBackend	cairo
AzureContentBackend	cairo
AzureFallbackCanvasBackend	skia
ClearType Parameters	Gamma: 2.2 Pixel Structure: RGB ClearType Level: 100 Enhanced Contrast: 400
Decision Log
D3D9_COMPOSITING	
disabled by default: Disabled by default
DIRECT2D	
unavailable by runtime: Failed to acquire a Direct2D 1.1 factory
(Reporter)

Comment 9

8 months ago
Note: this crash is due to very recent changes. 
It worked in FF50 for certain, though I can't say for sure about 51.0

Comment 10

8 months ago
Is there a reason why the driver of your Intel card is so old?
The latest is from May 2016:
https://downloadcenter.intel.com/download/25977/Intel-Graphics-Driver-for-Windows-10-and-Windows-7-8-1-15-33-?product=81499

Did you force to use cairo in about:config?

Updated

8 months ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 8 months ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1335359
It could be the same cause, but in this case, it's 51, where Cairo is still the default, so I'll separate the two bugs.
Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: DUPLICATE → ---

Comment 13

8 months ago
STR:
1) gfx.canvas.azure.backends=cairo & gfx.direct2d.disabled=true
2) Open https://drive.google.com/open?id=10WUl2OkiPbMC9DoYzONYrCHqOcxSQ3I5B_bXjhPHD0o
3) Resize the right border of the "A" column

Result: https://crash-stats.mozilla.com/report/index/66bd42c6-49a6-4eac-b2ca-1dd132170220

Regression range:
https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=491bc7e98f2aecc40a4fb096e9f3bc7a548989fa&tochange=d35d1cbc59e81f5efa4f3737c0ea6a9c9b90da14

Nicolas Silva — Bug 1294351 - Avoid removing and re-applying the drawing states with PersistentBufferProviderBasic. r=Bas
Blocks: 1294351
Crash Signature: [@ gfxContext::CurrentState ]
status-firefox51: --- → affected
Flags: needinfo?(andrixnet) → needinfo?(nical.bugzilla)
Keywords: regression
Summary: Crash when editing with Google Sheets → Crash in gfxContext::CurrentState when editing with Google Sheets
See Also: → bug 1335359
Right - same crash, same symptoms as bug 1335359.  One of the first clues that something is wrong: DrawTargetCairo context in error state: cairo_restore() without matching cairo_save()(2) from DrawTargetCairo::FillRect, followed by: Invalid target in gfxContext::CreatePreservingTransformOrNull
I just dropped a comment in bug 1291190 that could be relevant for this in the non-Cairo scenario.
I assert in debug without the "column resize" step, just by loading.
(Reporter)

Comment 17

8 months ago
The same crash on XP: 
Note: hardware accel is disabled because of problems with VNC.

Graphics
Features
Compositing	Basic
Asynchronous Pan/Zoom	none
WebGL Renderer	Google Inc. -- ANGLE (AMD Radeon R7 200 Series Direct3D9 vs_3_0 ps_3_0)
WebGL2 Renderer	WebGL creation failed: * Error during ANGLE OpenGL init. * Error during ANGLE OpenGL init. * Error during ANGLE OpenGL init. * Error during ANGLE OpenGL init. * Error during ANGLE OpenGL init. * Exhausted GL driver caps.
Hardware H264 Decoding	No; Failed to create H264 decoder
Audio Backend	winmm
DirectWrite	false (0.0.0.0)
GPU #1
Active	Yes
Description	AMD Radeon R7 200 Series
Vendor ID	0x1002
Device ID	0x6613
Driver Version	9.0.100.9001
Driver Date	12-23-2013
Drivers	ati2dvag
Subsys ID	00000000
RAM	Unknown
Diagnostics
AzureCanvasAccelerated	0
AzureCanvasBackend	cairo
AzureContentBackend	cairo
AzureFallbackCanvasBackend	skia
Decision Log
HW_COMPOSITING	
disabled by user: Disabled by pref
D3D11_COMPOSITING	
unavailable by default: Hardware compositing is disabled
D3D9_COMPOSITING	
unavailable by default: Hardware compositing is disabled
DIRECT2D	
unavailable by default: Direct2D requires Direct3D 11 compositing
D3D11_HW_ANGLE	
unavailable by default: D3D11 compositing is disabled
disabled by env: D3D11 compositing is disabled
(Reporter)

Comment 18

8 months ago
Sometimes the crash happens while sheet editor is loading, without any interraction from user.
Other times as testcase.
(Reporter)

Comment 19

8 months ago
(In reply to Loic from comment #10)
> Is there a reason why the driver of your Intel card is so old?
> The latest is from May 2016:
> https://downloadcenter.intel.com/download/25977/Intel-Graphics-Driver-for-
> Windows-10-and-Windows-7-8-1-15-33-?product=81499

I am not in control of that computer. (computer at work)

> Did you force to use cairo in about:config?
By hand, I did not change anything in config containing the string "cairo".
Right - I would expect the problem not to be there in 52, as we're not using Cairo at all.  Since you're running 51, we have an explanation as to why you're getting Cairo (default in 51 and earlier when no acceleration).
(Reporter)

Comment 21

8 months ago
Is "Cairo" newly introduced in 51? (since earlier versions worked)
The win7 testcase has "hardware accel when available" checked, thus enabled. It doesn't load for other reasons, perhaps.

In SeaMonkey 2.46 it works fine: 


Graphics
Features
Compositing	Direct3D 11
Asynchronous Pan/Zoom	none
WebGL Renderer	Google Inc. -- ANGLE (Intel(R) HD Graphics 4000 Direct3D11 vs_5_0 ps_5_0)
Hardware H264 Decoding	No; Hardware video decoding disabled or blacklisted
DirectWrite	false (6.1.7601.17789)
GPU #1
Active	Yes
Description	Intel(R) HD Graphics 4000
Vendor ID	0x8086
Device ID	0x0162
Driver Version	9.17.10.2828
Driver Date	7-31-2012
Drivers	igdumd64 igd10umd64 igd10umd64 igdumd32 igd10umd32 igd10umd32
Subsys ID	1790103c
RAM	Unknown
Diagnostics
ClearType Parameters	Gamma: 2200 Pixel Structure: R ClearType Level: 100 Enhanced Contrast: 400
AzureCanvasAccelerated	0
AzureCanvasBackend	skia
AzureContentBackend	cairo
AzureFallbackCanvasBackend	cairo
ClearType Parameters	Gamma: 2200 Pixel Structure: R ClearType Level: 100 Enhanced Contrast: 400
Decision Log
DIRECT2D	
unavailable by runtime: Failed to acquire a Direct2D 1.1 factory
Actually, I would expect the problem not to be there in 52 because of the fix in bug 1319668.  This probably is a duplicate of that bug.
See Also: → bug 1319668

Comment 23

8 months ago
(In reply to Milan Sreckovic [:milan] from comment #22)
> Actually, I would expect the problem not to be there in 52 because of the
> fix in bug 1319668.  This probably is a duplicate of that bug.

Yes, no more crash but the rendering is broken, see http://i.imgur.com/hQQWLtG.jpg
Changing the title to match the corruption and bad display instead of a crash.
Flags: needinfo?(nical.bugzilla)
Summary: Crash in gfxContext::CurrentState when editing with Google Sheets → Bad display and graphics artefacts when editing with Google Sheets
So I understand correctly, the circumstances behind this for 52+ require using Cairo instead of Skia?
status-firefox51: affected → wontfix
status-firefox52: --- → affected
status-firefox53: --- → affected
status-firefox54: --- → affected
status-firefox-esr52: --- → affected
tracking-firefox52: --- → ?
This bug got a bit confused.  There was a crash in 51 (happens to be Cairo), which was fixed in 52 (happens to be Skia) - that crash was not really Cairo specific, or at least the fix wasn't.

Then I changed this bug based on comment 23, but that was not confirmed by the original author of the bug.  And this bug so far has only dealt with 51, with default settings.

So, Loic, what is the story in comment 23?  You get bad drawing in 52, without changing the preferences?  Or are you passing on comments from bug 1335359?
Flags: needinfo?(epinal99-bugzilla2)

Comment 27

8 months ago
(In reply to Milan Sreckovic [:milan] from comment #26)
> This bug got a bit confused.  There was a crash in 51 (happens to be Cairo),
> which was fixed in 52 (happens to be Skia) - that crash was not really Cairo
> specific, or at least the fix wasn't.
> 
> Then I changed this bug based on comment 23, but that was not confirmed by
> the original author of the bug.  And this bug so far has only dealt with 51,
> with default settings.
> 
> So, Loic, what is the story in comment 23?  You get bad drawing in 52,
> without changing the preferences?  Or are you passing on comments from bug
> 1335359?

To be clear, bug 1319668 fixed the crash (this bug, so technically bug 1339762 is a duplicate of bug 1319668), but created a new regression (see my comment #23).

As you changed the title of this bug to reflect the new regression about the rendering, it's fine to keep this bug open.
Flags: needinfo?(epinal99-bugzilla2)
fix-optional for 52, if we get a safe patch soon.
status-firefox52: affected → fix-optional
tracking-firefox52: ? → -
(Reporter)

Comment 29

8 months ago
With Firefox upgrade to 52.0, the issue seems to be solved. 
All my spreadsheets seem to be working now, including the testcases I posted here.

Thank you.
platform-rel: --- → ?
Whiteboard: [platform-rel-Google][platform-rel-GoogleSuite][platform-rel-GoogleSheets]
The signature isn't showing up for 53, 54, or 55 so I think this may be fixed.
status-firefox53: affected → fixed
status-firefox54: affected → fixed

Updated

7 months ago
platform-rel: ? → -
From reviewing the history, the bug started as a crash, then transitioned into being a graphics corruption, and now appears to be fixed in 52. Closing.
Status: REOPENED → RESOLVED
Last Resolved: 8 months ago3 months ago
Resolution: --- → FIXED
status-firefox52: fix-optional → wontfix
status-firefox-esr52: affected → fixed
You need to log in before you can comment on or make changes to this bug.