WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
196504
NSAttributedString crashes when encoding text attachment cell for missing image
https://bugs.webkit.org/show_bug.cgi?id=196504
Summary
NSAttributedString crashes when encoding text attachment cell for missing image
Timothy Hatcher
Reported
2019-04-02 11:56:43 PDT
Crashing on exception: This decoder will only decode classes that adopt NSSecureCoding. Class 'NSTextAttachmentCell' does not adopt it. Application Specific Backtrace 1: 0 CoreFoundation 0x7fff3abd1867 __exceptionPreprocess + 250 (ObjC.subproj/NSException.m:199) 1 libobjc.A.dylib 0x7fff6f6e435f objc_exception_throw + 48 (runtime/objc-exception.mm:565) 2 Foundation 0x7fff3d30dc78 -[NSCoder(Exceptions) __failWithException:] + 174 (ObjC.subproj/NSCoder.m:0) 3 Foundation 0x7fff3d30ddf9 -[NSCoder(Exceptions) __failWithExceptionName:errorCode:format:] + 385 (ObjC.subproj/NSCoder.m:630) 4 Foundation 0x7fff3d1d9836 -[NSCoder validateClassSupportsSecureCoding:] + 313 (ObjC.subproj/NSCoder.m:0) 5 Foundation 0x7fff3d203f39 _encodeObject + 406 (Persistence.subproj/NSKeyedArchiver.m:266) 6 Foundation 0x7fff3d204261 _encodeObject + 1214 (Persistence.subproj/NSKeyedArchiver.m:1037) 7 Foundation 0x7fff3d205303 -[NSKeyedArchiver _encodeArrayOfObjects:forKey:] + 364 (Persistence.subproj/NSKeyedArchiver.m:1082) 8 Foundation 0x7fff3d1e743b -[NSDictionary(NSDictionary) encodeWithCoder:] + 885 (Collections.subproj/NSDictionary_Foundation.m:43) 9 Foundation 0x7fff3d204261 _encodeObject + 1214 (Persistence.subproj/NSKeyedArchiver.m:1037) 10 Foundation 0x7fff3d205303 -[NSKeyedArchiver _encodeArrayOfObjects:forKey:] + 364 (Persistence.subproj/NSKeyedArchiver.m:1082) 11 Foundation 0x7fff3d204261 _encodeObject + 1214 (Persistence.subproj/NSKeyedArchiver.m:1037) 12 Foundation 0x7fff3d27504a -[NSAttributedString encodeWithCoder:] + 1040 (String.subproj/NSAttributedString.m:478) 13 Foundation 0x7fff3d204261 _encodeObject + 1214 (Persistence.subproj/NSKeyedArchiver.m:1037) 14 WebKit 0x000000010b888a29 _ZN3IPC12encodeObjectERNS_7EncoderEP11objc_object + 1942 15 WebKit 0x000000010b8a3625 _ZN3IPC13ArgumentCoderIN6WebKit16AttributedStringEE6encodeERNS_7EncoderERKS2_ + 21 16 WebKit 0x000000010bb5f7d8 _ZN8Messages7WebPage29GetContentsAsAttributedString4sendEONSt3__110unique_ptrIN3IPC7EncoderENS2_14default_deleteIS5_EEEERNS4_10ConnectionERKN6WebKit16AttributedStringE + 32 17 WebKit 0x000000010bb6ba49 _ZN3WTF8FunctionIFvRKN6WebKit16AttributedStringEEE15CallableWrapperIZN3IPC18handleMessageAsyncIN8Messages7WebPage29GetContentsAsAttributedStringENS1_7WebPageEMSD_FvONS_17CompletionHandlerIS5_EEEEEvRNS8_10ConnectionERNS8_7DecoderEPT0_T1_EUlDpOT_E_E4callES4_ + 107 18 WebKit 0x000000010ba7c4ce _ZN3WTF17CompletionHandlerIFvRKN6WebKit16AttributedStringEEEclES4_ + 26 19 WebKit 0x000000010ba7c401 _ZN6WebKit7WebPage29getContentsAsAttributedStringEON3WTF17CompletionHandlerIFvRKNS_16AttributedStringEEEE + 199 20 WebKit 0x000000010bb66242 _ZN3IPC18handleMessageAsyncIN8Messages7WebPage29GetContentsAsAttributedStringEN6WebKit7WebPageEMS5_FvON3WTF17CompletionHandlerIFvRKNS4_16AttributedStringEEEEEEEvRNS_10ConnectionERNS_7DecoderEPT0_T1_ + 133 21 WebKit 0x000000010b78332a _ZN3IPC18MessageReceiverMap15dispatchMessageERNS_10ConnectionERNS_7DecoderE + 114 22 WebKit 0x000000010ba8e78a _ZN6WebKit10WebProcess17didReceiveMessageERN3IPC10ConnectionERNS1_7DecoderE + 28 23 WebKit 0x000000010b774928 _ZN3IPC10Connection15dispatchMessageENSt3__110unique_ptrINS_7DecoderENS1_14default_deleteIS3_EEEE + 108 24 WebKit 0x000000010b7781e9 _ZN3IPC10Connection26dispatchOneIncomingMessageEv + 181 25 JavaScriptCore 0x00000007c3799b04 _ZN3WTF7RunLoop11performWorkEv + 228 26 JavaScriptCore 0x00000007c3799d92 _ZN3WTF7RunLoop11performWorkEPv + 34 <
rdar://problem/49161281
>
Attachments
Patch
(5.12 KB, patch)
2019-04-02 12:14 PDT
,
Timothy Hatcher
no flags
Details
Formatted Diff
Diff
Patch
(5.20 KB, patch)
2019-04-02 12:15 PDT
,
Timothy Hatcher
no flags
Details
Formatted Diff
Diff
Patch
(5.27 KB, patch)
2019-04-02 12:18 PDT
,
Timothy Hatcher
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Timothy Hatcher
Comment 1
2019-04-02 12:14:15 PDT
Comment hidden (obsolete)
Created
attachment 366518
[details]
Patch
Timothy Hatcher
Comment 2
2019-04-02 12:15:16 PDT
Comment hidden (obsolete)
Created
attachment 366519
[details]
Patch
Timothy Hatcher
Comment 3
2019-04-02 12:18:14 PDT
Created
attachment 366522
[details]
Patch
EWS Watchlist
Comment 4
2019-04-02 12:22:12 PDT
Comment hidden (obsolete)
Attachment 366522
[details]
did not pass style-queue: ERROR: Source/WebCore/ChangeLog:13: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:14: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:15: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:17: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:19: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] ERROR: Source/WebCore/ChangeLog:20: Need whitespace between colon and description [changelog/filechangedescriptionwhitespace] [5] Total errors found: 6 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 5
2019-04-02 12:31:49 PDT
Comment on
attachment 366522
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=366522&action=review
> Source/WebCore/editing/cocoa/HTMLConverter.mm:1342 > + NSBundle *webCoreBundle = [NSBundle bundleWithIdentifier:@"com.apple.WebCore"];
We don't have a function for this?
Timothy Hatcher
Comment 6
2019-04-02 13:39:46 PDT
Comment on
attachment 366522
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=366522&action=review
>> Source/WebCore/editing/cocoa/HTMLConverter.mm:1342 >> + NSBundle *webCoreBundle = [NSBundle bundleWithIdentifier:@"com.apple.WebCore"]; > > We don't have a function for this?
Not that I could find.
WebKit Commit Bot
Comment 7
2019-04-02 14:06:55 PDT
Comment on
attachment 366522
[details]
Patch Clearing flags on attachment: 366522 Committed
r243758
: <
https://trac.webkit.org/changeset/243758
>
WebKit Commit Bot
Comment 8
2019-04-02 14:06:56 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug