<?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>29337</bug_id>
          
          <creation_ts>2009-09-17 10:26:26 -0700</creation_ts>
          <short_desc>REGRESSION (r48060): unrepro but frequent crash in WebViewWndProc</short_desc>
          <delta_ts>2009-09-17 10:34:16 -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>WebKit Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Other</rep_platform>
          <op_sys>Windows XP</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar, PlatformOnly, Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Adam Roben (:aroben)">aroben</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>bweinstein</cc>
    
    <cc>sfalken</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>147831</commentid>
    <comment_count>0</comment_count>
      <attachid>39703</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2009-09-17 10:26:26 -0700</bug_when>
    <thetext>Created attachment 39703
Patch v1

Many people have been seeing crashes in WebViewWndProc when browsing around with ToT builds.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>147834</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2009-09-17 10:27:38 -0700</bug_when>
    <thetext>&lt;rdar://problem/7209897&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>147836</commentid>
    <comment_count>2</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2009-09-17 10:28:13 -0700</bug_when>
    <thetext>Some comments from our other bug system:

9/10/09 1:27 PM Lena Dochez:
I just got this crash using Safari for 30 min when logging into yahoo mail.

9/14/09 5:35 PM Brian Weinstein:
I was able to reproduce it relatively quickly (not 100% consistently though), by running Sunspider over and over, it took anywhere from 2-5 runs of Sunspider to hit the crash.

9/14/09 6:02 PM Alice Liu:
the hwnd value in the crashing function can&apos;t be found among the window handles when observing safari windows with spy++.  Would this mean that maybe the crash happens when a message is being sent to a window that has been destroyed?

9/14/09 8:01 PM Brian Weinstein:
Both times I have caught this crash (from Sunspider), it has been a WM_TIMER call, where wParam was 1 (UpdateActiveStateTimer) and lParam was 0. The HWND that was passed in was nowhere to be found in Spy++, like Alice mentioned.

9/16/09 10:10 AM Adam Roben:
I&apos;ve been trying to reproduce this today. I&apos;ve tried running Sunspider and the stress test, and haven&apos;t seen it yet.

9/16/09 10:32 AM Adam Roben:
I also haven&apos;t reproduced it yet by browsing around with a ToT build.

9/16/09 12:20 PM Adam Roben:
Hm, I just got the crash in a ToT build, but unfortunately it was a release build.

9/16/09 4:47 PM Brian Weinstein:
It looks like this was caused by http://trac.webkit.org/changeset/48060. A way I have found to reproduce it is to:

run-webkit-tests LayoutTests/http/tests/xmlhttprequest, and attach DumpRenderTree to the debugger. You have run into the crash if it crashes and the top or 2nd highest level in the call stack is WebViewWndProc.

9/16/09 4:48 PM Brian Weinstein:
I narrowed it down to this revision by using spade builds, and then confirmed on a ToT build without this revision that this is what caused the crash.

9/17/09 11:57 AM Adam Roben:
OK, I&apos;m able to reproduce sometimes by running the xmlhttprequest tests.

I tried changing UpdateActiveStateTimer to a different number (I chose 6), and the crash still happened, with wParam=6. So there&apos;s nothing special about wParam=1.

9/17/09 12:06 PM Adam Roben:
We only create the UpdateActiveStateTimer in WebView::updateActiveStateSoon(). That function is only called in two places: when a WebView receives a WM_WINDOWPOSCHANGED message, and when a WebView&apos;s top-level parent window receives a WM_NCACTIVATE message (which WebView observes via WebView::windowReceivedMessage and WindowMessageBroadcaster).

9/17/09 12:22 PM Adam Roben:
It looks like WM_WINDOWPOSCHANGED is never called during the xmlhttprequest tests (which isn&apos;t surprising; I don&apos;t think we allow the offscreen WebView to be moved). We do receive WM_NCACTIVATE messages, though. This must be how the timer is getting set.

9/17/09 12:34 PM Adam Roben:
It looks like we&apos;re getting a windowMessageReceived call after our destructor runs. Maybe that&apos;s the cause of the bug.

9/17/09 12:36 PM Adam Roben:
My last comment was mistaken; the windowMessageReceived call is being made on a different WebView from the one whose destructor ran.

9/17/09 1:08 PM Adam Roben:
Steve speculated that perhaps the problem stems from us calling SetParent while handling WM_DESTROY. I&apos;m trying a fix that makes setHostWindow(0) not call SetParent after WM_DESTROY is received; testing so far shows promise.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>147840</commentid>
    <comment_count>3</comment_count>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2009-09-17 10:34:16 -0700</bug_when>
    <thetext>Committed r48473: &lt;http://trac.webkit.org/changeset/48473&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>39703</attachid>
            <date>2009-09-17 10:26:26 -0700</date>
            <delta_ts>2009-09-17 10:30:37 -0700</delta_ts>
            <desc>Patch v1</desc>
            <filename>20090917132626.patch</filename>
            <type>text/plain</type>
            <size>2541</size>
            <attacher name="Adam Roben (:aroben)">aroben</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYktpdC93aW4vQ2hhbmdlTG9nIGIvV2ViS2l0L3dpbi9DaGFuZ2VMb2cK
aW5kZXggMWNmZTg4Yy4uMDZkODI2NyAxMDA2NDQKLS0tIGEvV2ViS2l0L3dpbi9DaGFuZ2VMb2cK
KysrIGIvV2ViS2l0L3dpbi9DaGFuZ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SU5UIG1lc3NhZ2UsIFdQQVJB
TSB3UGFyYW0sIEwKICAgICAgICAgICAgIHdlYlZpZXctPnBhaW50KChIREMpd1BhcmFtLCBsUGFy
YW0pOwogICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgIGNhc2UgV01fREVTVFJPWToKLSAgICAg
ICAgICAgIHdlYlZpZXctPmNsb3NlKCk7CiAgICAgICAgICAgICB3ZWJWaWV3LT5zZXRJc0JlaW5n
RGVzdHJveWVkKCk7CisgICAgICAgICAgICB3ZWJWaWV3LT5jbG9zZSgpOwogICAgICAgICAgICAg
d2ViVmlldy0+cmV2b2tlRHJhZ0Ryb3AoKTsKICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICBj
YXNlIFdNX0dFU1RVUkVOT1RJRlk6CkBAIC0yOTk1LDggKzI5OTUsMTIgQEAgSFJFU1VMVCBTVERN
RVRIT0RDQUxMVFlQRSBXZWJWaWV3OjpzZXRIb3N0V2luZG93KAogICAgIC8qIFtpbl0gKi8gT0xF
X0hBTkRMRSBvbGVXaW5kb3cpCiB7CiAgICAgSFdORCB3aW5kb3cgPSAoSFdORCkoVUxPTkc2NClv
bGVXaW5kb3c7Ci0gICAgaWYgKG1fdmlld1dpbmRvdykKLSAgICAgICAgU2V0UGFyZW50KG1fdmll
d1dpbmRvdywgd2luZG93ID8gd2luZG93IDogSFdORF9NRVNTQUdFKTsKKyAgICBpZiAobV92aWV3
V2luZG93KSB7CisgICAgICAgIGlmICh3aW5kb3cpCisgICAgICAgICAgICBTZXRQYXJlbnQobV92
aWV3V2luZG93LCB3aW5kb3cpOworICAgICAgICBlbHNlIGlmICghaXNCZWluZ0Rlc3Ryb3llZCgp
KQorICAgICAgICAgICAgU2V0UGFyZW50KG1fdmlld1dpbmRvdywgSFdORF9NRVNTQUdFKTsKKyAg
ICB9CiAKICAgICBtX2hvc3RXaW5kb3cgPSB3aW5kb3c7
</data>
<flag name="review"
          id="20831"
          type_id="1"
          status="+"
          setter="sfalken"
    />
          </attachment>
      

    </bug>

</bugzilla>