Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#450 closed defect (fixed)

chrome: print a spreadsheet crashes the page

Reported by: mapx Assignee: sebastian
Priority: P1 Milestone: Adblock-Plus-1.8.3-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: trev Blocked By:
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

http://codereview.adblockplus.org/5171381998190592

Description (last modified by mapx)

Environment

chrome 34, 36
ABP 1.8
easylist

How to reproduce

  1. create a spreadsheet on google drive
  2. print the spreadsheet
  3. easylist ON ==> page goes in crash in chrome 34, or operation does not end chrome 36 (never ending "loading preview")

reported here:
https://adblockplus.org/forum/viewtopic.php?f=10&t=23026

easylist OFF ==> the operation concludes normally

Attachments (2)

shadow-dom-test-ext.zip (562 bytes) - added by sebastian 5 years ago.
shadow-dom-test-ext.2.zip (819 bytes) - added by trev 5 years ago.
Extension to reproduce the issue

Download all attachments as: .zip

Change History (17)

comment:1 Changed 5 years ago by mapx

  • Description modified (diff)

comment:2 Changed 5 years ago by mapx

  • Component changed from Unknown to Platform

comment:3 Changed 5 years ago by trev

Interesting, I can in fact reproduce that issue with a new (empty) spreadsheet - but not with an existing larger spreadsheet. Adding @@||docs.google.com^$elemhide as a filter to disable element hiding on that site "fixes" the issue, Chrome no longer crashes. So I suspect that the issue a bug in Chrome's shadow DOM implementation.

comment:4 Changed 5 years ago by trev

I tried to reproduce the issue without Adblock Plus by creating the shadow root from the web tools console but without success so far. Sebastian, maybe you will have more luck here.

Changed 5 years ago by sebastian

comment:5 Changed 5 years ago by sebastian

I can not reproduce it with Chrome 34. However I have uploaded a dummy extension that injects following code:

document.documentElement.webkitCreateShadowRoot().appendChild(document.createElement("shadow"));

Can you please check whether you get the same behavior without Adblock Plus, but that extension installed?

Changed 5 years ago by trev

Extension to reproduce the issue

comment:6 Changed 5 years ago by trev

No, your extension didn't work for me - I attached a modified version, the issue can be partially reproduced with this one. When I try to print the spreadsheet the page starts loading something and hangs, if I abort the load it crashes. The important thing here is a message exchange with the background page, the issue only occurs if the shadow root is created in the response callback. For some reason I was only able to reproduce the immediate crash with Adblock Plus so far, the specifics of this issue look like memory corruption in Chrome to me.

comment:7 Changed 5 years ago by sebastian

I reproduced it and filed a Chrome bug.

Do you think that case is worth adding a check, not using Shadow DOM on docs.gooogle.com, as workaround?

Last edited 5 years ago by sebastian (previous) (diff)

comment:8 Changed 5 years ago by trev

As long as we don't understand the issue - no, that's not really a solution. We have no idea what causes this and whether other domains are affected.

comment:9 Changed 5 years ago by sebastian

Also see #482

comment:10 Changed 5 years ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

Creating the Shadow DOM immediately instead inside the response callback fixes the issue. The only downside is that we have to create a shadow root even if Adblock Plus is disabled on the current page.

comment:11 Changed 5 years ago by sebastian

  • Cc sebastian removed
  • Owner set to sebastian

comment:12 Changed 5 years ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:13 Changed 5 years ago by sebastian

Also see #453

comment:14 Changed 5 years ago by sebastian

  • Ready set

comment:15 Changed 5 years ago by sebastian

  • Platform set to Unknown

Also see #452

Note: See TracTickets for help on using tickets.