- [NSConcreteMutableAttributedString _encodingCantBeStoredInEightBitCFString]:发送到实例的无法识别的选择器

- [NSConcreteMutableAttributedString _encodingCantBeStoredInEightBitCFString]:发送到实例的无法识别的选择器

问题描述:

我在AppStore上有一个应用程序,它在iOS6 & iOS7上工作。- [NSConcreteMutableAttributedString _encodingCantBeStoredInEightBitCFString]:发送到实例的无法识别的选择器

我有一个用户在iOS6上不断崩溃。 我不知道他在应用程序上做什么来获取崩溃,并且我在Crashlytics上获得的后退不会帮助我...

做有人知道是什么导致了[NSConcreteMutableAttributedString _encodingCantBeStoredInEightBitCFString]: unrecognized selector? 它似乎只发生在iOS6上...

预先感谢您!

(我不能添加一些代码,因为我不知道是什么导致了这一点,并希望有人确实成功解决这个问题)

Thread : Fatal Exception: NSInvalidArgumentException 
0 CoreFoundation     0x33ee82a3 __exceptionPreprocess + 162 
1 libobjc.A.dylib    0x3bb4497f objc_exception_throw + 30 
2 CoreFoundation     0x33eebe07 -[NSObject(NSObject) doesNotRecognizeSelector:] + 170 
3 CoreFoundation     0x33eea531 ___forwarding___ + 392 
4 CoreFoundation     0x33e41f68 _CF_forwarding_prep_0 + 24 
5 CoreFoundation     0x33ecb49d __CFStringCheckAndReplace + 484 
6 CoreFoundation     0x33e430a7 -[__NSCFString replaceCharactersInRange:withString:] + 22 
7 Foundation      0x3475687f -[NSConcreteMutableAttributedString replaceCharactersInRange:withString:] + 362 
8 Foundation      0x34756295 -[NSConcreteMutableAttributedString initWithString:attributes:] + 228 
9 UIKit       0x35d84d5f -[NSAttributedString(UILabelAdditions) _ui_synthesizeAttributedSubstringFromRange:usingDefaultAttributes:] + 86 
10 UIKit       0x35d84ab5 -[UILabel _synthesizedAttributedText] + 148 
11 UIKit       0x35cfacbd -[UILabel _textRectForBounds:limitedToNumberOfLines:includingShadow:] + 132 
12 UIKit       0x35cfac27 -[UILabel textRectForBounds:limitedToNumberOfLines:] + 54 
13 UIKit       0x35d611c7 -[UILabel _intrinsicSizeWithinSize:] + 158 
14 UIKit       0x35f280a7 -[UILabel intrinsicContentSize] + 90 
15 UIKit       0x3612c987 -[UIView(UIConstraintBasedLayout) _generateContentSizeConstraints] + 30 
16 UIKit       0x3612c939 -[UIView(UIConstraintBasedLayout) _updateContentSizeConstraints] + 72 
17 UIKit       0x3612ef3d -[UIView(AdditionalLayoutSupport) updateConstraints] + 84 
18 UIKit       0x3612ee47 -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeeded] + 182 
19 CoreFoundation     0x33e2e74d CFArrayApplyFunction + 176 
20 UIKit       0x3612edfb -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeeded] + 106 
21 CoreFoundation     0x33e2e74d CFArrayApplyFunction + 176 
22 UIKit       0x3612edfb -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeeded] + 106 
23 CoreFoundation     0x33e2e74d CFArrayApplyFunction + 176 
24 UIKit       0x3612edfb -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeeded] + 106 
25 CoreFoundation     0x33e2e74d CFArrayApplyFunction + 176 
26 UIKit       0x3612edfb -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeeded] + 106 
27 CoreFoundation     0x33e2e74d CFArrayApplyFunction + 176 
28 UIKit       0x3612edfb -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeeded] + 106 
29 CoreFoundation     0x33e2e74d CFArrayApplyFunction + 176 
30 UIKit       0x3612edfb -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeeded] + 106 
31 CoreFoundation     0x33e2e74d CFArrayApplyFunction + 176 
32 UIKit       0x3612edfb -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeeded] + 106 
33 CoreFoundation     0x33e2e74d CFArrayApplyFunction + 176 
34 UIKit       0x3612edfb -[UIView(AdditionalLayoutSupport) _updateConstraintsIfNeeded] + 106 
35 Foundation      0x3489c883 -[NSISEngine withAutomaticOptimizationDisabled:] + 166 
36 UIKit       0x36128de1 -[UIWindow(UIConstraintBasedLayout) updateConstraintsIfNeeded] + 124 
37 UIKit       0x35cf33f3 -[UIView(Hierarchy) layoutBelowIfNeeded] + 66 
38 UIKit       0x35d9292d -[UITableViewHeaderFooterView setFrame:] + 188 
39 UIKit       0x35eedf51 __105-[UITableView(UITableViewInternal) _sectionHeaderView:withFrame:forSection:floating:reuseViewIfPossible:]_block_invoke_0 + 144 
40 UIKit       0x35d3e0a9 +[UIView(Animation) _performWithoutAnimation:] + 72 
41 UIKit       0x35d926cb -[UITableView(UITableViewInternal) _sectionHeaderView:withFrame:forSection:floating:reuseViewIfPossible:] + 242 
42 UIKit       0x35d925d3 -[UITableView(UITableViewInternal) _sectionHeaderViewWithFrame:forSection:floating:reuseViewIfPossible:] + 58 
43 UIKit       0x35d22041 -[UITableView(_UITableViewPrivate) _updateVisibleHeadersAndFootersNow:] + 1600 
44 UIKit       0x35d2050b -[UITableView(_UITableViewPrivate) _updateVisibleCellsNow:] + 1814 
45 UIKit       0x35d377cf -[UITableView layoutSubviews] + 206 
46 UIKit       0x35cf3803 -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 258 
47 QuartzCore      0x35a9dd8b -[CALayer layoutSublayers] + 214 
48 QuartzCore      0x35a9d929 CA::Layer::layout_if_needed(CA::Transaction*) + 460 
49 QuartzCore      0x35a9e85d CA::Layer::layout_and_display_if_needed(CA::Transaction*) + 16 
50 QuartzCore      0x35a9e243 CA::Context::commit_transaction(CA::Transaction*) + 238 
51 QuartzCore      0x35a9e051 CA::Transaction::commit() + 316 
52 QuartzCore      0x35a9deb1 CA::Transaction::observer_callback(__CFRunLoopObserver*, unsigned long, void*) + 60 
53 CoreFoundation     0x33ebd6cd __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 20 
54 CoreFoundation     0x33ebb9c1 __CFRunLoopDoObservers + 276 
55 CoreFoundation     0x33ebbd17 __CFRunLoopRun + 742 
56 CoreFoundation     0x33e2eebd CFRunLoopRunSpecific + 356 
57 CoreFoundation     0x33e2ed49 CFRunLoopRunInMode + 104 
58 GraphicsServices    0x379ab2eb GSEventRunModal + 74 
59 UIKit       0x35d44301 UIApplicationMain + 1120 
60 MyApp       0x00029087 main (main.m:19) 
61 libdyld.dylib     0x3bf7bb20 start 
+0

这是某个地方你正在做一些与标签有关的东西,系统认为它可以使用属性字符串来实现你所要求的效果。 – 2014-09-10 11:48:05

我的同事有同样的经历,太。因为他这样的代码 @property (copy) NSMutableAttributeString * a;这显然是错误的。所以,请检查你的代码〜。也许你已经在某处使用复制方法...