26
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

呪いの顔文字

Last updated at Posted at 2015-01-05

Poinユーザさんからの報告で発覚。
യ⁺‧♡””( ॣᵅั◡ᵅั ॣ)
かわいい顔文字なのですが、UITextViewにsetTextすると落ちます。

プロフィール画面を編集できないとのことなので、そのユーザさんの使っている文章などを調べつつ検証開始。Poinが落ちるところまでは順調に確認できました。よし、治ったも同然!!と思ったら甘かった。

Xcodeから「Single View App」を作成して、UITextViewを追加して、その文字を表示すると、、、XCodeごと落ちる!!
僕の環境(OSX 10.10.2 + Xcode 6.1.1 + iPhone 6 simulator)と、デザイナくんの環境で確認済みです。どなたか追試していただけませんか?

類似の話がすでにあった
http://qiita.com/edo_m18/items/54b6d6f5f562df55ac9b

参考コード

@interface ViewController ()

@property(nonatomic)UITextView *textView;

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    _textView = [UITextView.alloc initWithFrame:self.view.bounds];
    [self.view addSubview:_textView];
    
    self.textView.text = @"aaa";
    self.textView.text = @"യ⁺‧♡””( ॣᵅั◡ᵅั ॣ)";
    
    // Do any additional setup after loading the view, typically from a nib.
}

@end

Stacktrace

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   com.apple.CoreText            	0x00007fff8cba4187 OpenTypeReorderingOutput::getStringIndex(long) const + 41
1   com.apple.CoreText            	0x00007fff8cba558c OpenTypeShapingEngine::ApplyScriptShaping(unsigned int*) + 326
2   com.apple.CoreText            	0x00007fff8cb5a2d9 TOpenTypeMorph::ApplyShapingEngine(OTL::GSUB&, OTL::GlyphLookups&, unsigned int*, CFRange, bool&) + 691
3   com.apple.CoreText            	0x00007fff8cb5adf8 TOpenTypeMorph::ShapeGlyphs(bool&) + 346
4   com.apple.CoreText            	0x00007fff8cb0868b TShapingEngine::ShapeGlyphs(TLine&, TCharStream const*) + 295
5   com.apple.CoreText            	0x00007fff8cad6a26 TTypesetter::TTypesetter(__CFArray const*, __CFString const*, void const* (*)(__CTRun const*, __CFString const*, void*), void*) + 202
6   com.apple.CoreText            	0x00007fff8cad6822 CTTypesetterCreateWithRunArray + 93
7   com.apple.UIFoundation        	0x00007fff912395dd -[NSATSGlyphStorage createCTTypesetter] + 1536
8   com.apple.UIFoundation        	0x00007fff91232f0c -[NSATSTypesetter _ctTypesetter] + 324
9   com.apple.UIFoundation        	0x00007fff9123d8b5 -[NSATSLineFragment layoutForStartingGlyphAtIndex:characterIndex:minPosition:maxPosition:lineFragmentRect:] + 89
10  com.apple.UIFoundation        	0x00007fff91233d43 -[NSATSTypesetter _layoutLineFragmentStartingWithGlyphAtIndex:characterIndex:atPoint:renderingContext:] + 2901
11  com.apple.UIFoundation        	0x00007fff91235a08 -[NSATSTypesetter layoutParagraphAtPoint:] + 156
12  com.apple.UIFoundation        	0x00007fff91186356 -[NSTypesetter _layoutGlyphsInLayoutManager:startingAtGlyphIndex:maxNumberOfLineFragments:maxCharacterIndex:nextGlyphIndex:nextCharacterIndex:] + 4713
13  com.apple.UIFoundation        	0x00007fff91187ae5 -[NSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:] + 246
14  com.apple.UIFoundation        	0x00007fff91236743 -[NSATSTypesetter layoutCharactersInRange:forLayoutManager:maximumNumberOfLineFragments:] + 967
15  com.apple.UIFoundation        	0x00007fff911ffe76 -[NSLayoutManager(NSPrivate) _fillLayoutHoleForCharacterRange:desiredNumberOfLines:isSoft:] + 1334
16  com.apple.UIFoundation        	0x00007fff9120970c _NSFastFillAllLayoutHolesForGlyphRange + 1493
17  com.apple.AppKit              	0x00007fff8b9b52b9 -[NSTextView(NSPrivate) _ensureLayoutCompleteForVisibleRectWithExtensionFactor:minimumExtensionDistance:repetitions:] + 640
18  com.apple.AppKit              	0x00007fff8b40723a -[NSTextView setNeedsDisplayInRect:avoidAdditionalLayout:] + 2242
19  com.apple.dt.DVTKit           	0x0000000108cb003c -[DVTCompletingTextView setNeedsDisplayInRect:avoidAdditionalLayout:] + 91
20  com.apple.UIFoundation        	0x00007fff911558c1 -[NSLayoutManager _primitiveInvalidateDisplayForGlyphRange:] + 5320
21  com.apple.UIFoundation        	0x00007fff91156219 -[NSLayoutManager invalidateDisplayForCharacterRange:] + 441
22  com.apple.dt.DVTKit           	0x0000000108cb29b0 -[DVTLayoutManager invalidateDisplayForCharacterRange:] + 874
23  com.apple.dt.DVTKit           	0x0000000108d02857 -[DVTTextAnnotation invalidateDisplayAndLayoutIfNeeded:] + 414
24  com.apple.dt.DVTKit           	0x0000000108d21525 -[DVTMessageBubbleAnnotation invalidateDisplayAndLayoutIfNeeded:] + 84
25  com.apple.dt.DVTKit           	0x0000000108ed08a8 -[DVTTextAnnotation addLayoutManager:] + 198
26  com.apple.dt.DVTKit           	0x0000000108e91202 -[DVTLayoutManager addAnnotation:] + 549
27  com.apple.dt.DVTKit           	0x0000000108e92130 -[DVTLayoutManager didInsertAnnotations:] + 243
28  com.apple.dt.DVTKit           	0x0000000108e11398 __70-[DVTAnnotationManager _installObservationBlockForAnnotationProvider:]_block_invoke + 732
29  com.apple.dt.DVTFoundation    	0x000000010887c1ab __73-[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:]_block_invoke183 + 83
30  com.apple.dt.DVTFoundation    	0x00000001087f7d78 DVTInvokeWithStrongOwnership + 75
31  com.apple.dt.DVTFoundation    	0x00000001086ab5fc -[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:] + 328
32  com.apple.Foundation          	0x00007fff84e5ea03 NSKeyValueNotifyObserver + 382
33  com.apple.Foundation          	0x00007fff84e5dbd8 NSKeyValueDidChange + 463
34  com.apple.Foundation          	0x00007fff84ef3a0a -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:withSetMutation:usingObjects:] + 118
35  com.apple.Foundation          	0x00007fff84f6c96b -[NSKeyValueNotifyingMutableSet addObject:] + 161
36  com.apple.dt.dbg.DebuggerUI   	0x00000001130452ec -[DBGInstructionPointerAnnotationProvider _createAnnotationForInstructionPointerLocation:] + 417
37  com.apple.dt.dbg.DebuggerUI   	0x0000000113032b18 -[DBGInstructionPointerAnnotationProvider _handleInstructionPointerLocationChanged:] + 780
38  com.apple.dt.DVTFoundation    	0x000000010887c1ab __73-[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:]_block_invoke183 + 83
39  com.apple.dt.DVTFoundation    	0x00000001087f7d78 DVTInvokeWithStrongOwnership + 75
40  com.apple.dt.DVTFoundation    	0x00000001086ab5fc -[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:] + 328
41  com.apple.Foundation          	0x00007fff84ed0f43 -[NSKeyValueObservance observeValueForKeyPath:ofObject:change:context:] + 417
42  com.apple.Foundation          	0x00007fff84ed0f43 -[NSKeyValueObservance observeValueForKeyPath:ofObject:change:context:] + 417
43  com.apple.Foundation          	0x00007fff84ed0f43 -[NSKeyValueObservance observeValueForKeyPath:ofObject:change:context:] + 417
44  com.apple.Foundation          	0x00007fff84e5ea03 NSKeyValueNotifyObserver + 382
45  com.apple.Foundation          	0x00007fff84e5dbd8 NSKeyValueDidChange + 463
46  com.apple.Foundation          	0x00007fff84e6273d -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] + 118
47  com.apple.dt.dbg.DebuggerUI   	0x0000000113047a60 -[DBGDebugSessionController _navigateEditorToStackFramesSourceFile:] + 385
48  com.apple.dt.DVTFoundation    	0x000000010887cb37 -[NSObject(DVTObservingConvenience) _dvt_newObserverForKeyPath:options:owner:withHandlerBlock:] + 533
49  com.apple.dt.DVTFoundation    	0x00000001086d6076 -[NSObject(DVTObservingConvenience) dvt_newObserverForKeyPath:options:withHandlerBlock:] + 60
50  com.apple.dt.dbg.DebuggerUI   	0x0000000113037233 -[DBGDebugSessionController _navigateEditorToCurrentStackFrame] + 255
51  com.apple.dt.DVTFoundation    	0x000000010887c1ab __73-[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:]_block_invoke183 + 83
52  com.apple.dt.DVTFoundation    	0x00000001087f7d78 DVTInvokeWithStrongOwnership + 75
53  com.apple.dt.DVTFoundation    	0x00000001086ab5fc -[DVTObservingBlockToken observeValueForKeyPath:ofObject:change:context:] + 328
54  com.apple.Foundation          	0x00007fff84ed0f43 -[NSKeyValueObservance observeValueForKeyPath:ofObject:change:context:] + 417
55  com.apple.Foundation          	0x00007fff84e5ea03 NSKeyValueNotifyObserver + 382
56  com.apple.Foundation          	0x00007fff84e5dbd8 NSKeyValueDidChange + 463
57  com.apple.Foundation          	0x00007fff84e6273d -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] + 118
58  com.apple.dt.dbg.DebuggerFoundation	0x000000010fdc82d4 -[DBGProcess setInitialCurrentStackFrame] + 559
59  com.apple.dt.dbg.DebuggerLLDB 	0x000000011027351b __59-[DBGLLDBSession _refreshThreadListAndUpdateCurrentThread:]_block_invoke883 + 92
60  com.apple.dt.DVTFoundation    	0x00000001088a1646 __DVTAsyncPerformBlock_block_invoke + 39
61  com.apple.CoreFoundation      	0x00007fff924a156c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
62  com.apple.CoreFoundation      	0x00007fff92493675 __CFRunLoopDoBlocks + 341
63  com.apple.CoreFoundation      	0x00007fff92492e2e __CFRunLoopRun + 910
64  com.apple.CoreFoundation      	0x00007fff92492858 CFRunLoopRunSpecific + 296
65  com.apple.HIToolbox           	0x00007fff86e73bcf RunCurrentEventLoopInMode + 235
66  com.apple.HIToolbox           	0x00007fff86e7394a ReceiveNextEventCommon + 431
67  com.apple.HIToolbox           	0x00007fff86e7378b _BlockUntilNextEventMatchingListInModeWithFilter + 71
68  com.apple.AppKit              	0x00007fff8b305f01 _DPSNextEvent + 964
69  com.apple.AppKit              	0x00007fff8b3056b0 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 194
70  com.apple.dt.DVTKit           	0x0000000108dd06fd -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 237
71  com.apple.AppKit              	0x00007fff8b2f94e3 -[NSApplication run] + 594
72  com.apple.AppKit              	0x00007fff8b2e4974 NSApplicationMain + 1832
73  libdyld.dylib                 	0x00007fff8b2935c9 start + 1

26
25
3

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
26
25

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?