<?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>60572</bug_id>
          
          <creation_ts>2011-05-10 12:57:20 -0700</creation_ts>
          <short_desc>REGRESSION - Canon On-screen Manual.app crashes after a search</short_desc>
          <delta_ts>2011-05-11 10:39:11 -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>Mac</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brady Eidson">beidson</reporter>
          <assigned_to name="Brady Eidson">beidson</assigned_to>
          <cc>abarth</cc>
    
    <cc>eric</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>401429</commentid>
    <comment_count>0</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2011-05-10 12:57:20 -0700</bug_when>
    <thetext>REGRESSION - Canon On-screen Manual.app crashes after a search.

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libobjc.A.dylib               	0x9a4bda53 _class_getName + 10
1   libobjc.A.dylib               	0x9a4c20e8 object_getClassName + 33
2   libobjc.A.dylib               	0x9a4ca8d7 _objc_error + 57
3   libobjc.A.dylib               	0x9a4caadd __objc_error + 45
4   libobjc.A.dylib               	0x9a4c827c _freedHandler + 53
5   com.apple.Foundation          	0x9aee937f -[NSConcreteNotification dealloc] + 59
6   libobjc.A.dylib               	0x9a4d7c07 _objc_rootRelease + 47
7   libobjc.A.dylib               	0x9a4d80c6 (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 404
8   com.apple.CoreFoundation      	0x98c9f495 _CFAutoreleasePoolPop + 53
9   com.apple.Foundation          	0x9af210fd postQueueNotifications + 1149
10  com.apple.CoreFoundation      	0x98d5fe6e __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 30
11  com.apple.CoreFoundation      	0x98ce141d __CFRunLoopDoObservers + 413
12  com.apple.CoreFoundation      	0x98ca239d __CFRunLoopRun + 1261
13  com.apple.CoreFoundation      	0x98ca1a9c CFRunLoopRunSpecific + 332
14  com.apple.CoreFoundation      	0x98ca1948 CFRunLoopRunInMode + 120
15  com.apple.HIToolbox           	0x900fa313 RunCurrentEventLoopInMode + 318
16  com.apple.HIToolbox           	0x900fa0db ReceiveNextEventCommon + 381
17  com.apple.HIToolbox           	0x900f9f4a BlockUntilNextEventMatchingListInMode + 88
18  com.apple.AppKit              	0x99a4e5dc _DPSNextEvent + 678
19  com.apple.AppKit              	0x99a4de49 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 113
20  com.apple.AppKit              	0x99a0feb4 -[NSApplication run] + 897
21  com.apple.AppKit              	0x99a08004 NSApplicationMain + 1047
22  jp.co.canon.ij.easy-guide-viewer	0x000028ca _start + 216
23  jp.co.canon.ij.easy-guide-viewer	0x000027f1 start + 41

The Canon app subclasses WebView, and in their own [CustomWebView dealloc] method, they manipulates WebPreferences.  One thing they do before starting a search is disabling automatic image loading.  One thing they do in their subclasses dealloc method is reenable automatic image loading.

This crash started in r66577 when we started telling all Frames in the Page that they can start image loading, which they immediately do.  This dispatches out to the delegates and re-retains the WebView, adding it to various collections and notifications.

When one of these Notifications is later dealloc&apos;ed after the runloop has spun, the WebView *has* actually been destroyed and free&apos;d, and the attempt to lower its ref count crashes.

In radar as &lt;rdar://problem/9343191&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>401430</commentid>
    <comment_count>1</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2011-05-10 12:59:13 -0700</bug_when>
    <thetext>Since the trouble originates in their subclassed dealloc method, we have no idea we&apos;re about to be dealloced.  We just assume this is a normal [WebView close] and have no way of preventing the retain badness happening at this stage.

When the preference is twiddled to allow image loading, there&apos;s absolutely no reason why we&apos;d have to start the loads synchronously.  Putting that on a 0-delay timer makes this go away which no real side effects.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>401432</commentid>
    <comment_count>2</comment_count>
      <attachid>92997</attachid>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2011-05-10 13:01:32 -0700</bug_when>
    <thetext>Created attachment 92997
Patch v1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>401442</commentid>
    <comment_count>3</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2011-05-10 13:26:29 -0700</bug_when>
    <thetext>Fixed in r86179</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>401485</commentid>
    <comment_count>4</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2011-05-10 14:12:05 -0700</bug_when>
    <thetext>I committed without the ChangeLog and in-code comment I&apos;d meant to include.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>401497</commentid>
    <comment_count>5</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2011-05-10 14:19:58 -0700</bug_when>
    <thetext>Updated with comments in 86180</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>401609</commentid>
    <comment_count>6</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2011-05-10 16:10:51 -0700</bug_when>
    <thetext>http://trac.webkit.org/changeset/86180 might have broken Windows XP Debug (Tests)
The following tests are not passing:
media/controls-without-preload.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>401615</commentid>
    <comment_count>7</comment_count>
    <who name="Brady Eidson">beidson</who>
    <bug_when>2011-05-10 16:18:57 -0700</bug_when>
    <thetext>(In reply to comment #6)
&gt; http://trac.webkit.org/changeset/86180 might have broken Windows XP Debug (Tests)
&gt; The following tests are not passing:
&gt; media/controls-without-preload.html

Appreciate the suggestion, but it&apos;s extremely unlikely that adding comments to code broke a layout test.  (And almost as unlikely that the original preferences-related patch broke a media test that doesn&apos;t invoke that preference)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>401777</commentid>
    <comment_count>8</comment_count>
    <who name="Adam Barth">abarth</who>
    <bug_when>2011-05-10 22:34:29 -0700</bug_when>
    <thetext>&gt; Appreciate the suggestion, but it&apos;s extremely unlikely that adding comments to code broke a layout test.  (And almost as unlikely that the original preferences-related patch broke a media test that doesn&apos;t invoke that preference)

Yeah, we really need to work on the spaminess of these notifications.  Sometimes I&apos;m tempted to turn them off..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>401779</commentid>
    <comment_count>9</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-05-10 22:38:07 -0700</bug_when>
    <thetext>@abarth, @beidson:  I&apos;ll spend some time tomorrow working on making the SB smarter about which bugs it comments on.  There is a lot of low hanging fruit here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>402098</commentid>
    <comment_count>10</comment_count>
    <who name="Eric Seidel (no email)">eric</who>
    <bug_when>2011-05-11 10:39:11 -0700</bug_when>
    <thetext>Adam has turned off notifications when SB would notify more than 3 bugs.  I&apos;m not sure if that would have helped here, but it should reduce the times when he&apos;s just &quot;spamming&quot;.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>92997</attachid>
            <date>2011-05-10 13:01:32 -0700</date>
            <delta_ts>2011-05-10 13:21:00 -0700</delta_ts>
            <desc>Patch v1</desc>
            <filename>patch.txt</filename>
            <type>text/plain</type>
            <size>3016</size>
            <attacher name="Brady Eidson">beidson</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJDb3JlL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2UvV2Vi
Q29yZS9DaGFuZ2VMb2cJKHJldmlzaW9uIDg2MTc4KQorKysgU291cmNlL1dlYkNvcmUvQ2hhbmdl
TG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMjAgQEAKKzIwMTEtMDUtMTAgIEJyYWR5IEVp
ZHNvbiAgPGJlaWRzb25AYXBwbGUuY29tPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAo
T09QUyEpLgorCisgICAgICAgIDxyZGFyOi8vcHJvYmxlbS85MzQzMTkxPiBhbmQgaHR0cHM6Ly9i
dWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTYwNTcyCisKKyAgICAgICAgTm8gbmV3IHRl
c3RzIC0gVGhlcmUncyBubyB3YXkgdG8gcmVwcm9kdWNlIHRoZSB0cnVseSBiaXphcnJlIHRoaW5n
cyBDYW5vbiBkb2VzIGluIHRoZWlyIGFwcAorICAgICAgICB0aGF0IHdvdWxkIHJlYXNvbmFibHkg
Zml0IGluIHRvIG91ciB0ZXN0aW5nIGluZnJhc3RydWN0dXJlLgorCisgICAgICAgIEFkZCBhIHRp
bWVyIHRvIFNldHRpbmdzIGFuZCBpbnN0ZWFkIG9mIGNhbGxpbmcgc2V0TG9hZHNJbWFnZXNBdXRv
bWF0aWNhbGx5SW5BbGxGcmFtZXMgcmlnaHQKKyAgICAgICAgYXdheSB3aGVuIHRoaXMgcHJlZiBj
aGFuZ2VzLCBjYWxsIGl0IG9uIGEgMC1kZWxheToKKyAgICAgICAgKiBwYWdlL1NldHRpbmdzLmNw
cDoKKyAgICAgICAgKFdlYkNvcmU6OlNldHRpbmdzOjpTZXR0aW5ncy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NvdXJj
ZS9XZWJDb3JlL3BhZ2UvU2V0dGluZ3MuaAkocmV2aXNpb24gODYxNjgpCisrKyBTb3VyY2UvV2Vi
Q29yZS9wYWdlL1NldHRpbmdzLmgJKHdvcmtpbmcgY29weSkKQEAgLTMwLDYgKzMwLDcgQEAKICNp
bmNsdWRlICJFZGl0aW5nQmVoYXZpb3JUeXBlcy5oIgogI2luY2x1ZGUgIkZvbnRSZW5kZXJpbmdN
b2RlLmgiCiAjaW5jbHVkZSAiS1VSTC5oIgorI2luY2x1ZGUgIlRpbWVyLmgiCiAjaW5jbHVkZSA8
d3RmL3RleHQvQXRvbWljU3RyaW5nLmg+CiAKIG5hbWVzcGFjZSBXZWJDb3JlIHsKQEAgLTUxNCw2
ICs1MTUsOSBAQCBuYW1lc3BhY2UgV2ViQ29yZSB7CiAgICAgICAgIGJvb2wgbV9hbGxvd0Rpc3Bs
YXlPZkluc2VjdXJlQ29udGVudCA6IDE7CiAgICAgICAgIGJvb2wgbV9hbGxvd1J1bm5pbmdPZklu
c2VjdXJlQ29udGVudCA6IDE7CiAKKyAgICAgICAgVGltZXI8U2V0dGluZ3M+IG1fbG9hZHNJbWFn
ZXNBdXRvbWF0aWNhbGx5VGltZXI7CisgICAgICAgIHZvaWQgbG9hZHNJbWFnZXNBdXRvbWF0aWNh
bGx5VGltZXJGaXJlZChUaW1lcjxTZXR0aW5ncz4qKTsKKwogI2lmIFVTRShBVkZPVU5EQVRJT04p
CiAgICAgICAgIHN0YXRpYyBib29sIGdBVkZvdW5kYXRpb25FbmFibGVkOwogI2VuZGlmCg==
</data>
<flag name="review"
          id="86064"
          type_id="1"
          status="+"
          setter="alice.barraclough"
    />
    <flag name="commit-queue"
          id="86065"
          type_id="3"
          status="-"
          setter="beidson"
    />
          </attachment>
      

    </bug>

</bugzilla>