• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

ios - Xcode 7 beta 在自动完成时崩溃 - NSRangeException

[复制链接]
菜鸟教程小白 发表于 2022-12-13 11:32:32 | 显示全部楼层 |阅读模式 打印 上一主题 下一主题

每次 Xcode 使用自动补全时,我都会遇到此崩溃。

步骤-

  1. 使用任何系统库 - 例如:UIColor
  2. 我输入“[UIColor col”并获得建议列表(colorWithCGColor - 等)
  3. 我按了删除键以获取有关“[UIColor co”的建议
  4. Xcode 崩溃

我认为这是 Xcode 版本的特定错误。但我更新到 Xcode beta 5 仍然有这个问题。

Application Specific Information:
ProductBuildVersion: 7A176x
UNCAUGHT EXCEPTION (NSRangeException): NSMutableRLEArray objectAtIndex:effectiveRange:runIndex:: Out of bounds
UserInfo: (null)
Hints: None
Backtrace:
  0  0x00007fff90401024 __exceptionPreprocess (in CoreFoundation)
  1  0x000000010103bff2 DVTFailureHintExceptionPreprocessor (in DVTFoundation)
  2  0x00007fff8adca76e objc_exception_throw (in libobjc.A.dylib)
  3  0x00007fff90400eed +[NSException raise:format:] (in CoreFoundation)
  4  0x00007fff8995e228 -[NSRLEArray objectAtIndex:effectiveRange:runIndex:] (in Foundation)
  5  0x00007fff8995dfdb -[NSConcreteMutableAttributedString attribute:atIndex:longestEffectiveRange:inRange:] (in Foundation)
  6  0x00000001016953f3 -[DVTTextStorage(DVTTextStorageMRR) attribute:atIndex:longestEffectiveRange:inRange:] (in DVTKit)
  7  0x00007fff92871ef0 -[NSLayoutManager(NSPrivate) _drawBackgroundForGlyphRange:atPoint:] (in UIFoundation)
  8  0x000000010151e1ff -[DVTLayoutManager drawBackgroundForGlyphRange:atPoint:] (in DVTKit)
  9  0x00007fff8f3f46b5 -[NSTextView drawRect:] (in AppKit)
10  0x000000010151cdf8 -[DVTCompletingTextView drawRect:] (in DVTKit)
11  0x000000010151ca98 -[DVTSourceTextView drawRect:] (in DVTKit)
12  0x00007fff8f3ae749 -[NSView(NSInternal) _recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:] (in AppKit)
13  0x00007fff8f3ae168 __46-[NSView(NSLayerKitGlue) drawLayer:inContext:]_block_invoke (in AppKit)
14  0x00007fff8f3ade11 -[NSView(NSLayerKitGlue) _drawViewBackingLayer:inContext:drawingHandler:] (in AppKit)
15  0x00007fff8f3ad493 -[NSView(NSLayerKitGlue) drawLayer:inContext:] (in AppKit)
16  0x00007fff8f62bc42 -[NSTextView drawLayer:inContext:] (in AppKit)
17  0x00007fff958973c7 CABackingStoreUpdate_ (in QuartzCore)
18  0x00007fff958966d7 ___ZN2CA5Layer8display_Ev_block_invoke (in QuartzCore)
19  0x00007fff95896694 x_blame_allocations (in QuartzCore)
20  0x00007fff9588a43c CA:ayer::display_() (in QuartzCore)
21  0x00007fff8f31942b _NSBackingLayerDisplay (in AppKit)
22  0x00007fff8f316026 -[_NSViewBackingLayer display] (in AppKit)
23  0x00007fff8f62bb85 -[_NSTextViewBackingLayer display] (in AppKit)
24  0x00007fff958887fd CA:ayer::display_if_needed(CA::Transaction*) (in QuartzCore)
25  0x00007fff95887e81 CA:ayer::layout_and_display_if_needed(CA::Transaction*) (in QuartzCore)
26  0x00007fff95887612 CA::Context::commit_transaction(CA::Transaction*) (in QuartzCore)
27  0x00007fff958873ae CA::Transaction::commit() (in QuartzCore)
28  0x00007fff8f3869d6 -[NSWindow _setFrameCommon:display:stashSize:] (in AppKit)
29  0x00000001016d91dd -[DVTTextCompletionListWindowController _updateCurrentDisplayState] (in DVTKit)
30  0x00000001016d6084 __82-[DVTTextCompletionListWindowController showWindowForTextFrame:explicitAnimation:]_block_invoke (in DVTKit)
31  0x000000010104e374 __95-[NSObject(DVTObservingConvenience) _dvt_newObserverForKeyPathptionswner:withHandlerBlock:]_block_invoke (in DVTFoundation)
32  0x000000010104d636 __73-[DVTObservingBlockToken observeValueForKeyPathfObject:change:context:]_block_invoke183 (in DVTFoundation)
33  0x0000000100fb9eaf DVTInvokeWithStrongOwnership (in DVTFoundation)
34  0x0000000100e1f49f -[DVTObservingBlockToken observeValueForKeyPathfObject:change:context:] (in DVTFoundation)
35  0x00007fff899660f3 NSKeyValueNotifyObserver (in Foundation)
36  0x00007fff89972d68 NSKeyValueDidChange (in Foundation)
37  0x00007fff8992b97d -[NSObject(NSKeyValueObserverNotification) didChangeValueForKey:] (in Foundation)
38  0x0000000101607a51 -[DVTTextCompletionSession _setFilteringPrefix:forceFilter:] (in DVTKit)
39  0x0000000101549d3e -[DVTTextCompletionSession setCursorLocation:] (in DVTKit)
40  0x00000001014e8101 -[DVTTextCompletionController textViewSelectionChanging] (in DVTKit)
41  0x00000001014e802a -[DVTCompletingTextView setSelectedRanges:affinity:stillSelecting:] (in DVTKit)
42  0x000000010150e817 -[DVTSourceTextView setSelectedRanges:affinity:stillSelecting:] (in DVTKit)
43  0x00000001014e7f1a -[DVTCompletingTextView setSelectedRange:] (in DVTKit)
44  0x000000010150e6a4 -[DVTSourceTextView setSelectedRange:] (in DVTKit)
45  0x00007fff89a7f0a4 _NSSetRangeValueAndNotify (in Foundation)
46  0x00007fff927b93af -[NSLayoutManager textStorage:edited:range:changeInLength:invalidatedRange:] (in UIFoundation)
47  0x0000000101670f20 -[DVTFoldingLayoutManager textStorage:edited:range:changeInLength:invalidatedRange:] (in DVTKit)
48  0x00007fff927db291 -[NSTextStorage _notifyEdited:range:changeInLength:invalidatedRange:] (in UIFoundation)
49  0x00007fff927dad93 -[NSTextStorage processEditing] (in UIFoundation)
50  0x00000001014f2fd3 -[DVTTextStorage processEditing] (in DVTKit)
51  0x00007fff927daa61 -[NSTextStorage endEditing] (in UIFoundation)
52  0x00000001014f2c95 -[DVTTextStorage endEditing] (in DVTKit)
53  0x00000001016316fa -[DVTTextStorage replaceCharactersInRange:withString:evenIfNotEditable:] (in DVTKit)
54  0x00007fff8f65faf1 -[NSTextView(NSPrivate) _userReplaceRange:withString:] (in AppKit)
55  0x00007fff8f65f48b _NSDoUserReplaceForCharRange (in AppKit)
56  0x00007fff8f65f2a6 _NSDoUserDeleteForCharRange (in AppKit)
57  0x00007fff8f6e3c36 -[NSTextView(NSKeyBindingCommands) deleteBackward:] (in AppKit)
58  0x00000001017395f0 -[DVTCompletingTextView deleteBackward:] (in DVTKit)
59  0x00000001015547b2 -[DVTSourceTextView deleteBackward:] (in DVTKit)
60  0x00007fff8f5aeef1 -[NSTextView doCommandBySelector:] (in AppKit)
61  0x0000000101550a10 -[DVTCompletingTextView doCommandBySelector:] (in DVTKit)
62  0x00007fff8f5aee01 -[NSTextInputContext(NSInputContext_WithCompletion) doCommandBySelector:completionHandler:] (in AppKit)
63  0x00007fff8f594c23 -[NSKeyBindingManager(NSKeyBindingManager_MultiClients) interpretEventAsCommand:forClient:] (in AppKit)
64  0x00007fff8fb5b272 __61-[NSTextInputContext _handleEventptions:completionHandler:]_block_invoke972 (in AppKit)
65  0x00007fff8f596bff -[NSTextInputContext(NSInputContext_WithCompletion) hasMarkedTextWithCompletionHandler:] (in AppKit)
66  0x00007fff8f5aed03 __61-[NSTextInputContext _handleEventptions:completionHandler:]_block_invoke_3 (in AppKit)
67  0x00007fff8f5a7ed8 -[NSTextInputContext tryHandleEvent_HasMarkedText_withDispatchCondition:dispatchWork:continuation:] (in AppKit)
68  0x00007fff8fb5b074 __61-[NSTextInputContext _handleEventptions:completionHandler:]_block_invoke960 (in AppKit)
69  0x00007fff8bc1bd4f __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_5 (in HIToolbox)
70  0x00007fff8bc1ac45 ___ZL23DispatchEventToHandlersP14EventTargetRecP14OpaqueEventRefP14HandlerCallRec_block_invoke (in HIToolbox)
71  0x00007fff8f597606 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke174 (in AppKit)
72  0x00007fff8f596bff -[NSTextInputContext(NSInputContext_WithCompletion) hasMarkedTextWithCompletionHandler:] (in AppKit)
73  0x00007fff8f596ba0 __55-[NSTextInputContext handleTSMEvent:completionHandler:]_block_invoke_2 (in AppKit)
74  0x00007fff8f596b18 -[NSTextInputContext tryHandleTSMEvent_HasMarkedText_withDispatchCondition:dispatchWork:continuation:] (in AppKit)
75  0x00007fff8f5967d5 -[NSTextInputContext handleTSMEvent:completionHandler:] (in AppKit)
76  0x00007fff8f595b2e _NSTSMEventHandler (in AppKit)
77  0x00007fff8bbb4b6c DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) (in HIToolbox)
78  0x00007fff8bbb3fae SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) (in HIToolbox)
79  0x00007fff8bbb3e22 SendEventToEventTargetWithOptions (in HIToolbox)
80  0x00007fff8bc1826c SendTSMEvent_WithCompletionHandler (in HIToolbox)
81  0x00007fff8bc1876c __SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler_block_invoke (in HIToolbox)
82  0x00007fff8bc185a6 __SendFilterTextEvent_WithCompletionHandler_block_invoke (in HIToolbox)
83  0x00007fff8bc182c0 SendTSMEvent_WithCompletionHandler (in HIToolbox)
84  0x00007fff8bc1808f SendFilterTextEvent_WithCompletionHandler (in HIToolbox)
85  0x00007fff8bc17d51 SendUnicodeTextAEToUnicodeDoc_WithCompletionHandler (in HIToolbox)
86  0x00007fff8bc17ae9 __utDeliverTSMEvent_WithCompletionHandler_block_invoke_2 (in HIToolbox)
87  0x00007fff8bc17988 __utDeliverTSMEvent_WithCompletionHandler_block_invoke (in HIToolbox)
88  0x00007fff8bc177cd TSMKeyEvent_WithCompletionHandler (in HIToolbox)
89  0x00007fff8bc174d0 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_4 (in HIToolbox)
90  0x00007fff8bc17386 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_3 (in HIToolbox)
91  0x00007fff8bc17112 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke_2 (in HIToolbox)
92  0x00007fff8bc16f25 __TSMProcessRawKeyEventWithOptionsAndCompletionHandler_block_invoke (in HIToolbox)
93  0x00007fff8bbfb76f TSMProcessRawKeyEventWithOptionsAndCompletionHandler (in HIToolbox)
94  0x00007fff8fb5ae86 __61-[NSTextInputContext _handleEventptions:completionHandler:]_block_invoke949 (in AppKit)
95  0x00007fff8f594352 -[NSTextInputContext tryTSMProcessRawKeyEvent:dispatchCondition:setupForDispatch:furtherCondition:dispatchWork:continuation:] (in AppKit)
96  0x00007fff8f594085 -[NSTextInputContext _handleEventptions:completionHandler:] (in AppKit)
97  0x00007fff8f593b4e -[NSTextInputContext handleEvent:] (in AppKit)
98  0x00007fff8f593a54 -[NSView interpretKeyEvents:] (in AppKit)
99  0x00007fff8f59386a -[NSTextView keyDown:] (in AppKit)
100  0x00007fff8fa830fb -[NSWindow _reallySendEvent:isDelayedEvent:] (in AppKit)
101  0x00007fff8f414c86 -[NSWindow sendEvent:] (in AppKit)
102  0x0000000102479366 -[IDEWorkspaceWindow sendEvent:] (in IDEKit)
103  0x00007fff8f4118b1 -[NSApplication sendEvent:] (in AppKit)
104  0x000000010222fcdf -[IDEApplication sendEvent:] (in IDEKit)
105  0x00007fff8f33ab68 -[NSApplication run] (in AppKit)
106  0x00007fff8f2b7244 NSApplicationMain (in AppKit)
107  0x00007fff8fe485c9 start (in libdyld.dylib)

abort() called



Best Answer-推荐答案


我有同样的问题。 Xcode 7 在所描述的情况下总是崩溃。我发现 stefanceriu/SCXcodeMiniMap在我的情况下导致了崩溃。所以我决定删除它。 只需转到 ~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/并删除文件夹 SCXcodeMinimap.xcplugin。

关于ios - Xcode 7 beta 在自动完成时崩溃 - NSRangeException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32070483/

回复

使用道具 举报

懒得打字嘛,点击右侧快捷回复 【右侧内容,后台自定义】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关注0

粉丝2

帖子830918

发布主题
阅读排行 更多
广告位

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap