Skip to content

Crash: NSCodingProxy not picked up by NSCoder #781

@jleandroperez

Description

@jleandroperez

Steps:

  1. Launch the Aztec Demo Document (with sample html!)
  2. Select all the text
  3. Copy
  4. Kill + Relaunch Aztec (Stop > Run in the sim)
  5. Open the Empty Document
  6. Paste

As a result, you'll get the stack trace pasted below:

2017-10-19 13:47:20.833074-0300 AztecExample[4638:15957827] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: '*** -[NSKeyedUnarchiver decodeObjectForKey:]: cannot decode object of class (_TtGC5Aztec13NSCodingProxyOCS_9Attribute5Value_) for key (value); the class may be defined in source code or a library that is not linked'
*** First throw call stack:
(
	0   CoreFoundation                      0x00000001043ac1cb __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x000000010348df41 objc_exception_throw + 48
	2   Foundation                          0x0000000102d8ebc7 -[NSCoder(Exceptions) __failWithExceptionName:errorCode:format:] + 0
	3   Foundation                          0x0000000102d8ed44 -[NSCoder(Exceptions) __failWithExceptionName:errorCode:format:] + 381
	4   Foundation                          0x0000000102ca4e86 _decodeObjectBinary + 1570
	5   Foundation                          0x0000000102ca4760 _decodeObject + 243
	6   Aztec                               0x000000010752f031 _T05Aztec9AttributeCACSgSo7NSCoderC5coder_tcfc + 993
	7   Aztec                               0x000000010752f52f _T05Aztec9AttributeCACSgSo7NSCoderC5coder_tcfcTo + 47
	8   Foundation                          0x0000000102ca5208 _decodeObjectBinary + 2468
	9   Foundation                          0x0000000102ca6488 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1780
	10  Foundation                          0x0000000102caa15f -[NSArray(NSArray) initWithCoder:] + 202
	11  Foundation                          0x0000000102ca5208 _decodeObjectBinary + 2468
	12  Foundation                          0x0000000102ca4760 _decodeObject + 243
	13  Aztec                               0x0000000107484189 _T05Aztec25HTMLElementRepresentationCACSgSo7NSCoderC5coder_tcfc + 953
	14  Aztec                               0x00000001074845df _T05Aztec25HTMLElementRepresentationCACSgSo7NSCoderC5coder_tcfcTo + 47
	15  Foundation                          0x0000000102ca5208 _decodeObjectBinary + 2468
	16  Foundation                          0x0000000102ca6488 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1780
	17  Foundation                          0x0000000102caa15f -[NSArray(NSArray) initWithCoder:] + 202
	18  Foundation                          0x0000000102ca5208 _decodeObjectBinary + 2468
	19  Foundation                          0x0000000102ca4760 _decodeObject + 243
	20  Aztec                               0x000000010752194b _T05Aztec15UnsupportedHTMLCACSgSo7NSCoderC5coder_tcfc + 155
	21  Aztec                               0x0000000107521cdf _T05Aztec15UnsupportedHTMLCACSgSo7NSCoderC5coder_tcfcTo + 47
	22  Foundation                          0x0000000102ca5208 _decodeObjectBinary + 2468
	23  Foundation                          0x0000000102ca6488 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1780
	24  Foundation                          0x0000000102ca58a7 -[NSDictionary(NSDictionary) initWithCoder:] + 202
	25  Foundation                          0x0000000102ca5208 _decodeObjectBinary + 2468
	26  Foundation                          0x0000000102ca6488 -[NSKeyedUnarchiver _decodeArrayOfObjectsForKey:] + 1780
	27  Foundation                          0x0000000102caa15f -[NSArray(NSArray) initWithCoder:] + 202
	28  Foundation                          0x0000000102ca5208 _decodeObjectBinary + 2468
	29  Foundation                          0x0000000102ca4760 _decodeObject + 243
	30  Foundation                          0x0000000102cbc5ad -[NSKeyedUnarchiver decodeObjectOfClasses:forKey:] + 115
	31  Foundation                          0x0000000102d4aa87 _NSReadMutableAttributedStringWithCoder + 291
	32  Foundation                          0x0000000102d4a911 -[NSAttributedString initWithCoder:] + 69
	33  Foundation                          0x0000000102ca5208 _decodeObjectBinary + 2468
	34  Foundation                          0x0000000102ca4760 _decodeObject + 243
	35  Foundation                          0x0000000102ca374b +[NSKeyedUnarchiver unarchiveObjectWithData:] + 84
	36  Aztec                               0x00000001074f5b18 _T0So18NSAttributedStringC5AztecE9unarchiveABSg10Foundation4DataV4with_tFZ + 200
	37  Aztec                               0x00000001074c6787 _T0So12UIPasteboardC5AztecE21aztecAttributedString33_494C3C55A2418766AE20F034DBEB8E40LLSo012NSAttributedE0CSgfg + 407
	38  Aztec                               0x00000001074c64ea _T0So12UIPasteboardC5AztecE20loadAttributedStringSo012NSAttributedE0CSgyF + 26
	39  Aztec                               0x00000001074c6a41 _T0So12UIPasteboardC5AztecE20loadAttributedStringSo012NSAttributedE0CSgyFTo + 49
	40  Aztec                               0x00000001074ac2af _T05Aztec8TextViewC5pasteyypSgF + 127
	41  Aztec                               0x00000001074acf61 _T05Aztec8TextViewC5pasteyypSgFTo + 193
	42  UIKit                               0x0000000105924b81 -[UICalloutBar buttonPressed:] + 407
	43  UIKit                               0x0000000105922caf -[UICalloutBarButton fadeAndSendAction] + 81
	44  Foundation                          0x0000000102d11609 __NSFireDelayedPerform + 409
	45  CoreFoundation                      0x000000010433c374 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
	46  CoreFoundation                      0x000000010433c032 __CFRunLoopDoTimer + 1026
	47  CoreFoundation                      0x000000010433bbea __CFRunLoopDoTimers + 266
	48  CoreFoundation                      0x0000000104333604 __CFRunLoopRun + 2308
	49  CoreFoundation                      0x0000000104332a89 CFRunLoopRunSpecific + 409
	50  GraphicsServices                    0x000000010bb019c6 GSEventRunModal + 62
	51  UIKit                               0x00000001052ad23c UIApplicationMain + 159
	52  AztecExample                        0x0000000102852db7 main + 55
	53  libdyld.dylib                       0x00000001093cfd81 start + 1
	54  ???                                 0x0000000000000001 0x0 + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions