<?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>192538</bug_id>
          
          <creation_ts>2018-12-09 00:17:22 -0800</creation_ts>
          <short_desc>[iOS device] Crash when attempting to call -[_WKAttachment info] for an editable image</short_desc>
          <delta_ts>2018-12-09 15:51:53 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit2</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</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="Wenson Hsieh">wenson_hsieh</reporter>
          <assigned_to name="Wenson Hsieh">wenson_hsieh</assigned_to>
          <cc>aestes</cc>
    
    <cc>bdakin</cc>
    
    <cc>commit-queue</cc>
    
    <cc>thorton</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1486414</commentid>
    <comment_count>0</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2018-12-09 00:17:22 -0800</bug_when>
    <thetext>An excerpt from the crash log, using the MobileAttachments test app:

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000d32538f00
VM Region Info: 0xd32538f00 is not in any region.  Bytes after previous region: 45404622593  
      REGION TYPE                      START - END             [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      MALLOC_NANO            0000000280000000-00000002a0000000 [512.0M] rw-/rwx SM=PRV  
---&gt;  
      UNUSED SPACE AT END

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [4000]
Triggered by Thread:  0

Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libobjc.A.dylib     objc_retain + 16
1   WebKit              -[WKDrawingView PNGRepresentation] + 76
2   WebKit              WTF::Function&lt;WTF::RetainPtr&lt;NSFileWrapper&gt; ()&gt;::CallableWrapper&lt;WebKit::EditableImageController::associateWithAttachment(unsigned long long, WTF::String const&amp;)::$_3&gt;::call() + 60
3   WebKit              API::Attachment::fileWrapper() const + 80
4   WebKit              -[_WKAttachment info] + 88
5   MobileAttachments   0x104190000 + 59044
6   UIKitCore           -[UITableView _createPreparedCellForGlobalRow:withIndexPath:willDisplay:] + 684
7   UIKitCore           -[UITableView _createPreparedCellForGlobalRow:willDisplay:] + 84
8   UIKitCore           -[UITableView _updateVisibleCellsNow:isRecursive:] + 2308
9   UIKitCore           -[UITableView layoutSubviews] + 144
10  UIKitCore           -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 1428
11  libobjc.A.dylib     -[NSObject performSelector:withObject:] + 68
12  QuartzCore          -[CALayer layoutSublayers] + 188
13  QuartzCore          CA::Layer::layout_if_needed(CA::Transaction*) + 336
14  UIKitCore           -[UIView(Hierarchy) layoutBelowIfNeeded] + 560
15  UIKitCore           __86-[UISheetPresentationController setNestedPresentationIndex:withTransitionCoordinator:]_block_invoke_2 + 56
16  UIKitCore           +[UIView(Animation) performWithoutAnimation:] + 112
17  UIKitCore           __86-[UISheetPresentationController setNestedPresentationIndex:withTransitionCoordinator:]_block_invoke + 112
18  UIKitCore           -[_UIViewControllerTransitionCoordinator _applyBlocks:releaseBlocks:] + 276
19  UIKitCore           -[_UIViewControllerTransitionContext __runAlongsideAnimations] + 292
20  UIKitCore           __63+[UIView(Animation) _setAlongsideAnimations:toRunByEndOfBlock:]_block_invoke + 36
21  UIKitCore           -[UIViewAnimationState _runAlongsideAnimations] + 48</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1486415</commentid>
    <comment_count>1</comment_count>
      <attachid>356912</attachid>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2018-12-09 00:24:05 -0800</bug_when>
    <thetext>Created attachment 356912
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1486416</commentid>
    <comment_count>2</comment_count>
      <attachid>356912</attachid>
    <who name="Tim Horton">thorton</who>
    <bug_when>2018-12-09 00:40:15 -0800</bug_when>
    <thetext>Comment on attachment 356912
Patch

... whoops. Also, how did I not run into this?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1486417</commentid>
    <comment_count>3</comment_count>
      <attachid>356912</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-12-09 01:05:53 -0800</bug_when>
    <thetext>Comment on attachment 356912
Patch

Clearing flags on attachment: 356912

Committed r239019: &lt;https://trac.webkit.org/changeset/239019&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1486418</commentid>
    <comment_count>4</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2018-12-09 01:05:54 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1486419</commentid>
    <comment_count>5</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2018-12-09 01:06:22 -0800</bug_when>
    <thetext>&lt;rdar://problem/46578922&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1486462</commentid>
    <comment_count>6</comment_count>
    <who name="Wenson Hsieh">wenson_hsieh</who>
    <bug_when>2018-12-09 15:51:53 -0800</bug_when>
    <thetext>(In reply to Tim Horton from comment #2)
&gt; Comment on attachment 356912 [details]
&gt; Patch
&gt; 
&gt; ... whoops. Also, how did I not run into this?

Unsure :/

I am, however, able to reproduce this crash all the time without this patch. Maybe something in the OS changed? (doubtful, but possible)</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>356912</attachid>
            <date>2018-12-09 00:24:05 -0800</date>
            <delta_ts>2018-12-09 01:05:53 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-192538-20181209002405.patch</filename>
            <type>text/plain</type>
            <size>1593</size>
            <attacher name="Wenson Hsieh">wenson_hsieh</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMjM5MDA2CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViS2l0L0No
YW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCmluZGV4IDE4N2ZhNzc5ZTNjMmRkMTJk
MjI5ZmRjN2ZlYjQ3MjQ2NjA2NWQzMGYuLjk5MjA4MzBhM2ZiOTk2MDg2NGE1YzQyMDUyNzI3MGQ0
MTE0ZTZlYzggMTAwNjQ0Ci0tLSBhL1NvdXJjZS9XZWJLaXQvQ2hhbmdlTG9nCisrKyBiL1NvdXJj
ZS9XZWJLaXQvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTcgQEAKKzIwMTgtMTItMDkgIFdlbnNvbiBI
c2llaCAgPHdlbnNvbl9oc2llaEBhcHBsZS5jb20+CisKKyAgICAgICAgW2lPUyBkZXZpY2VdIENy
YXNoIHdoZW4gYXR0ZW1wdGluZyB0byBjYWxsIC1bX1dLQXR0YWNobWVudCBpbmZvXSBmb3IgYW4g
ZWRpdGFibGUgaW1hZ2UKKyAgICAgICAgaHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcu
Y2dpP2lkPTE5MjUzOAorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisg
ICAgICAgIEZpeCB0aGUgY3Jhc2ggYnkgZW5z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