<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>129784</bug_id>
          
          <creation_ts>2014-03-05 23:28:01 -0800</creation_ts>
          <short_desc>Crash in webkit_web_view_expose_event when using Eclipse with overlay-scrollbar (Ubuntu)</short_desc>
          <delta_ts>2016-04-23 13:22:53 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKitGTK</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marc-Andre Laperle">malaperle</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>berto</cc>
    
    <cc>bigbedue</cc>
    
    <cc>cgarcia</cc>
    
    <cc>dbates</cc>
    
    <cc>gustavo</cc>
    
    <cc>mcatanzaro</cc>
    
    <cc>mrobinson</cc>
    
    <cc>zan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>987578</commentid>
    <comment_count>0</comment_count>
    <who name="Marc-Andre Laperle">malaperle</who>
    <bug_when>2014-03-05 23:28:01 -0800</bug_when>
    <thetext>Using Ubuntu 14.04 64 bit (soon to be released), GTK2.
with package libwebkitgtk-1.0-0 (built from webkit 2.3.90)
or using webkit built from SVN (revision 164917).

I originally opened this bug at eclipse.org
https://bugs.eclipse.org/bugs/show_bug.cgi?id=425614

1. Download Eclipse Standard 4.3.2 for linux 64 bit
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/SR2/eclipse-standard-kepler-SR2-linux-gtk-x86_64.tar.gz

2. Start Eclipse with this command: UBUNTU_MENUPROXY=0 SWT_GTK3=0 ./eclipse
3. If this is a new workspace, it should crash after selecting the workspace location (because it tries to display the welcome screen). If the workspace loads, click Help, Welcome in the menu to force the welcome screen to display. The crash should occur.

Back trace:
https://bugs.eclipse.org/bugs/attachment.cgi?id=238944

The crashing code in webkitwebview.cpp looks like this:
    for (int i = 0; i &lt; rectCount; i++) {
        copyRectFromCairoSurfaceToContext(WEBKIT_WEB_VIEW(widget)-&gt;priv-&gt;backingStore-&gt;cairoSurface(),
                                          cr.get(), IntSize(), IntRect(rects.get()[i]));
    }

Basically, in webkit_web_view_expose_event, WEBKIT_WEB_VIEW(widget)-&gt;priv-&gt;backingStore is null because ChromeClient::widgetSizeChanged doesn&apos;t get called...because webView-&gt;priv-&gt;needsResizeOnMap is false.

I think the issue is in webkit_web_view_size_allocate. It assumes that the size changed to allocate the backing store (through needsResizeOnMap). If I add also set needsResizeOnMap to true when the backing store is null, it works. I&apos;m not sure this is the right solution but hopefully this helps someone develop a real fix.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>987581</commentid>
    <comment_count>1</comment_count>
      <attachid>225958</attachid>
    <who name="Marc-Andre Laperle">malaperle</who>
    <bug_when>2014-03-05 23:44:52 -0800</bug_when>
    <thetext>Created attachment 225958
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>991319</commentid>
    <comment_count>2</comment_count>
    <who name="">bigbedue</who>
    <bug_when>2014-03-17 11:21:36 -0700</bug_when>
    <thetext>Patch from #1 doesn&apos;t solve the problem here. Using Arch, see https://bugs.archlinux.org/task/39184.
eclipse still crashes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>992379</commentid>
    <comment_count>3</comment_count>
    <who name="Marc-Andre Laperle">malaperle</who>
    <bug_when>2014-03-19 21:14:16 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; Patch from #1 doesn&apos;t solve the problem here. Using Arch, see https://bugs.archlinux.org/task/39184.
&gt; eclipse still crashes.

Are you sure it crashes at the same place? Is backingStore null?

FYI, there&apos;s also a crash related to the google talk plugin, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=334466</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>993776</commentid>
    <comment_count>4</comment_count>
    <who name="">bigbedue</who>
    <bug_when>2014-03-24 03:41:01 -0700</bug_when>
    <thetext>Tbh, I don&apos;t know if backingStore is null. 
Can you help me getting a more informative debug output from eclipse? The terminal is not very chatty.

I reproduced the error like this: with the UNPATCHED release version of 2.2.5, it crashed &quot;randomly&quot; when displaying tooltips. I also could - kind of - reproduce the welcome-screen thing:
1. went to welcome screen (welcome screen displays, no crash)
2. click on X to close the welcome screen (eclipse crashes, the normal window should have appeared)

after the patch, both behaviors were still there. 

Maybe &quot;my problem&quot; is not exactly what you&apos;ve fixed?

Please also note that i didn&apos;t apply the patch to r164917 but on the release version found here: http://webkitgtk.org/releases/webkitgtk-2.2.5.tar.xz. Maybe thats an issue too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>994447</commentid>
    <comment_count>5</comment_count>
    <who name="Marc-Andre Laperle">malaperle</who>
    <bug_when>2014-03-25 17:18:23 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; Tbh, I don&apos;t know if backingStore is null. 
&gt; Can you help me getting a more informative debug output from eclipse? The terminal is not very chatty.

Do you have a java crash log file? It should be in the working directory where Eclipse was launched, look for something like hs_err_pid18377.log. If you have a core dump, you could load it in gdb and get a backtrace. The core file should also be in the working directory. If not, you can try changing the core file limit with the command &apos;ulimit -c unlimited&apos; then starting Eclipse from the same terminal.

&gt; Maybe &quot;my problem&quot; is not exactly what you&apos;ve fixed?

That seems probable. I also didn&apos;t mention in my original comment that the crash only occurs when overlay-scrollbar is enabled, which I believe is only in Ubuntu. But I think fixing this in webkit source code makes sense because the way I understand the code, it could happen in other circumstances.

&gt; Please also note that i didn&apos;t apply the patch to r164917 but on the release version found here: http://webkitgtk.org/releases/webkitgtk-2.2.5.tar.xz. Maybe thats an issue too.

I&apos;m going to install Arch Linux and try to reproduce your crash. This might take some time.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>994571</commentid>
    <comment_count>6</comment_count>
    <who name="Marc-Andre Laperle">malaperle</who>
    <bug_when>2014-03-26 07:59:58 -0700</bug_when>
    <thetext>(In reply to comment #5)
&gt; &gt; Please also note that i didn&apos;t apply the patch to r164917 but on the release version found here: http://webkitgtk.org/releases/webkitgtk-2.2.5.tar.xz. Maybe thats an issue too.
&gt; 
&gt; I&apos;m going to install Arch Linux and try to reproduce your crash. This might take some time.

I can&apos;t reproduce this with Arch Linux and webkitgtk-2.2.5 installed. I tried both the eclipse package from Arch and downloading it from eclipse.org (version 4.3.2). Let me know if you have more information about the java error log or the core dump. Also, did you check if you have the google talk plugin installed? I tried to install it just to see if it affects anything but I wasn&apos;t able to install it from AUR (I&apos;m not sure how to use it).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1008630</commentid>
    <comment_count>7</comment_count>
    <who name="Marc-Andre Laperle">malaperle</who>
    <bug_when>2014-05-12 10:01:53 -0700</bug_when>
    <thetext>On recent Eclipse builds (Luna), the overlay scrollbars are disabled by default so to reproduce this bug they need to be explicitly enabled with LIBOVERLAY_SCROLLBAR=1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1186629</commentid>
    <comment_count>8</comment_count>
      <attachid>225958</attachid>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2016-04-23 11:27:48 -0700</bug_when>
    <thetext>Comment on attachment 225958
Patch

The file Source/WebKit/gtk/webkit/webkitwebview.cpp no longer exists. Moreover, all the GTK WebKit1 code was removed in &lt;http://trac.webkit.org/changeset/166979&gt; (bug #131399). I&apos;m unclear of the process for fixing GTK WebKit1 bugs with respect to third-party applications, such as Eclipse. Maybe Martin Robinson or Michael Cantazaro know?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1186630</commentid>
    <comment_count>9</comment_count>
    <who name="Daniel Bates">dbates</who>
    <bug_when>2016-04-23 11:29:40 -0700</bug_when>
    <thetext>I&apos;m marking this bug Resolved Invalid since the GTK WebKit1 source code was removed from the WebKit Open Source Project repository as mentioned in comment #8. We need to find a more appropriate forum for this bug assuming it still exists.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1186659</commentid>
    <comment_count>10</comment_count>
    <who name="Michael Catanzaro">mcatanzaro</who>
    <bug_when>2016-04-23 13:22:53 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; Comment on attachment 225958 [details]
&gt; Patch
&gt; 
&gt; The file Source/WebKit/gtk/webkit/webkitwebview.cpp no longer exists.
&gt; Moreover, all the GTK WebKit1 code was removed in
&gt; &lt;http://trac.webkit.org/changeset/166979&gt; (bug #131399). I&apos;m unclear of the
&gt; process for fixing GTK WebKit1 bugs with respect to third-party
&gt; applications, such as Eclipse. Maybe Martin Robinson or Michael Cantazaro
&gt; know?

There&apos;s no better place to report this bug. We don&apos;t look into WebKit1 bugs anymore. Eclipse must upgrade.

If Eclipse ever displays untrusted HTML (e.g. if it displays anything from the Internet, or if it allows the user to select files to view), then see &lt;http://webkitgtk.org/security.html&gt; for an overview of the risks of not upgrading.

Still, if anyone provides a patch, it could be included in our 2.4 branch in case there is ever a 2.4 release in the future.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>225958</attachid>
            <date>2014-03-05 23:44:52 -0800</date>
            <delta_ts>2016-04-23 11:27:48 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-129784-20140306024449.patch</filename>
            <type>text/plain</type>
            <size>1395</size>
            <attacher name="Marc-Andre Laperle">malaperle</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQvZ3RrL0N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J2aWV3LmNwcAkod29y
a2luZyBjb3B5KQpAQCAtOTQyLDcgKzk0MiwxMSBAQCBzdGF0aWMgdm9pZCB3ZWJraXRfd2ViX3Zp
ZXdfc2l6ZV9hbGxvY2F0CiAgICAgR1RLX1dJREdFVF9DTEFTUyh3ZWJraXRfd2ViX3ZpZXdfcGFy
ZW50X2NsYXNzKS0+c2l6ZV9hbGxvY2F0ZSh3aWRnZXQsIGFsbG9jYXRpb24pOwogCiAgICAgV2Vi
S2l0V2ViVmlldyogd2ViVmlldyA9IFdFQktJVF9XRUJfVklFVyh3aWRnZXQpOwotICAgIGlmIChz
aXplQ2hhbmdlZCAmJiAhZ3RrX3dpZGdldF9nZXRfbWFwcGVkKHdpZGdldCkpIHsKKyAgICBib29s
IGJhY2tpbmdTdG9yZU51bGwgPSBmYWxzZTsKKyAgICBpZiAoIXdlYlZpZXctPnByaXYtPmJhY2tp
bmdTdG9yZSkKKyAgICAgICAgYmFja2luZ1N0b3JlTnVsbCA9IHRydWU7CisKKyAgICBpZiAoKGJh
Y2tpbmdTdG9yZU51bGwgfHwgc2l6ZUNoYW5nZWQpICYmICFndGtfd2lkZ2V0X2dldF9tYXBwZWQo
d2lkZ2V0KSkgewogICAgICAgICB3ZWJWaWV3LT5wcml2LT5uZWVkc1Jlc2l6ZU9uTWFwID0gdHJ1
ZTsKICAgICAgICAgcmV0dXJuOwogICAgIH0K
</data>
<flag name="review"
          id="250150"
          type_id="1"
          status="-"
          setter="dbates"
    />
          </attachment>
      

    </bug>

</bugzilla>