Bug 184161 - ASSERTION FAILED: ASSERT(!containsImage || MIMETypeRegistry::isSupportedImageResourceMIMEType([resource MIMEType])) in -[NSPasteboard(WebExtras) _web_writePromisedRTFDFromArchive:containsImage:]
Summary: ASSERTION FAILED: ASSERT(!containsImage || MIMETypeRegistry::isSupportedImage...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Macintosh All
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-03-29 15:26 PDT by Daniel Bates
Modified: 2018-04-26 11:46 PDT (History)
9 users (show)

See Also:


Attachments
TestCase (8.05 KB, application/zip)
2018-03-29 15:26 PDT, Daniel Bates
no flags Details
Patch and manual test (20.15 KB, patch)
2018-03-29 17:06 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch and manual test (20.15 KB, patch)
2018-03-30 09:55 PDT, Daniel Bates
no flags Details | Formatted Diff | Diff
Patch and manual test (14.68 KB, patch)
2018-04-20 12:42 PDT, Daniel Bates
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 2018-03-29 15:26:40 PDT
Steps to reproduce using a debug build of WebKit:

1. Download and uncompress the TestCase.zip into a directory called TestCase.
1. Launch MiniBrowser and open a new WK1 window.
2. Navigate to TestCase/test.html.
3. Drag and drop the PDF (the content demarcated with a black border on the page) within the web view.
4. Quit MiniBrowser.

Then MiniBrowser will crash with a backtrace of the form:

#0	0x0000000104d84e37 in ::-[NSPasteboard(WebExtras) _web_writePromisedRTFDFromArchive:containsImage:](WebArchive *, BOOL) at /Volumes/.../OpenSource/Source/WebKitLegacy/mac/Misc/WebNSPasteboardExtras.mm:220
#1	0x0000000104d1016b in ::-[WebHTMLView(WebPrivate) pasteboard:provideDataForType:](NSPasteboard *, NSString *) at /Volumes/.../OpenSource/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm:2013
#2	0x00007fff4fe31bf8 in __68-[NSPasteboard _setOwner:forTypes:atIndex:selector:usesPboardTypes:]_block_invoke ()
#3	0x00007fff5226e3fd in -[_CFPasteboardEntry resolveLocalPromisedData] ()
#4	0x00007fff52272296 in ___CFPasteboardHandleFulfillMessage_block_invoke.591 ()
#5	0x00007fff521bb22c in __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ ()
#6	0x00007fff5219da9b in __CFRunLoopDoBlocks ()
#7	0x00007fff5219d0ee in __CFRunLoopRun ()
#8	0x00007fff5219c940 in CFRunLoopRunSpecific ()
#9	0x00007fff52229c95 in CFPasteboardResolveAllPromisedData ()
#10	0x00007fff521b2bbc in __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ ()
#11	0x00007fff521b2a95 in _CFXRegistrationPost ()
#12	0x00007fff521b27d1 in ___CFXNotificationPost_block_invoke ()
#13	0x00007fff52170432 in -[_CFXNotificationRegistrar find:object:observer:enumerator:] ()
#14	0x00007fff5216f4c1 in _CFXNotificationPost ()
#15	0x00007fff54481e41 in -[NSNotificationCenter postNotificationName:object:userInfo:] ()
#16	0x00007fff4f97db63 in -[NSApplication terminate:] ()
#17	0x00007fff4fefb804 in -[NSApplication(NSResponder) sendAction:to:from:] ()
#18	0x00007fff4f9c6dcf in -[NSMenuItem _corePerformAction] ()
#19	0x00007fff4f9c6b53 in -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] ()
#20	0x00007fff4f9c59b5 in -[NSMenu performKeyEquivalent:] ()
#21	0x00007fff4fefa48d in routeKeyEquivalent ()
#22	0x00007fff4fef7962 in -[NSApplication(NSEvent) sendEvent:] ()
#23	0x00007fff4f7a3294 in -[NSApplication run] ()
#24	0x00007fff4f772c87 in NSApplicationMain ()
#25	0x0000000100005a8b in main at /Volumes/.../OpenSource/Tools/MiniBrowser/mac/main.m:32
Comment 1 Daniel Bates 2018-03-29 15:26:58 PDT
Created attachment 336809 [details]
TestCase
Comment 2 Daniel Bates 2018-03-29 17:06:27 PDT
Created attachment 336821 [details]
Patch and manual test
Comment 3 Daniel Bates 2018-03-30 09:55:36 PDT
Created attachment 336865 [details]
Patch and manual test

Post same patch so that EWS can process now that the patch for bug #184154 landed.
Comment 4 Per Arne Vollan 2018-03-30 11:11:49 PDT
Comment on attachment 336865 [details]
Patch and manual test

R=me.
Comment 5 Daniel Bates 2018-03-30 14:01:42 PDT
Comment on attachment 336865 [details]
Patch and manual test

Clearing flags on attachment: 336865

Committed r230117: <https://trac.webkit.org/changeset/230117>
Comment 6 Daniel Bates 2018-03-30 14:01:43 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-03-30 14:02:56 PDT
<rdar://problem/39051645>
Comment 8 Daniel Bates 2018-04-20 12:40:00 PDT
Reverted r230117 for reason:

Broke find-in-page for PDFs

Committed r230847: <https://trac.webkit.org/changeset/230847>
Comment 9 Daniel Bates 2018-04-20 12:42:22 PDT
Created attachment 338453 [details]
Patch and manual test
Comment 10 mitz 2018-04-24 17:58:08 PDT
Comment on attachment 338453 [details]
Patch and manual test

View in context: https://bugs.webkit.org/attachment.cgi?id=338453&action=review

> Source/WebKitLegacy/mac/ChangeLog:9
> +        Fixes an assertion failure when quiting an app that uses a Legacy WebKit web view after dragging-and-

typo: quiting

> Source/WebKitLegacy/mac/ChangeLog:13
> +        from the main frame's WebHTMLView and promise AppKit that will provide a Rich Text Format (RTF) document

“that we will provide” or “to provide”
Comment 11 Daniel Bates 2018-04-26 11:41:24 PDT
(In reply to mitz from comment #10)
> Comment on attachment 338453 [details]
> Patch and manual test
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=338453&action=review
> 
> > Source/WebKitLegacy/mac/ChangeLog:9
> > +        Fixes an assertion failure when quiting an app that uses a Legacy WebKit web view after dragging-and-
> 
> typo: quiting
> 

Will fix before landing.

> > Source/WebKitLegacy/mac/ChangeLog:13
> > +        from the main frame's WebHTMLView and promise AppKit that will provide a Rich Text Format (RTF) document
> 
> “that we will provide” or “to provide”

Will fix before landing.
Comment 12 Daniel Bates 2018-04-26 11:44:53 PDT
Comment on attachment 338453 [details]
Patch and manual test

View in context: https://bugs.webkit.org/attachment.cgi?id=338453&action=review

>>> Source/WebKitLegacy/mac/ChangeLog:13
>>> +        from the main frame's WebHTMLView and promise AppKit that will provide a Rich Text Format (RTF) document
>> 
>> “that we will provide” or “to provide”
> 
> Will fix before landing.

Will use "that we will provide"
Comment 13 Daniel Bates 2018-04-26 11:46:53 PDT
Committed r231061: <https://trac.webkit.org/changeset/231061>