Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
453 views
in Technique[技术] by (71.8m points)

ios - 当从不同的故事板上复制/粘贴视图时,Xcode 11崩溃(Xcode 11 crashes when copy/pasting views from different storyboards)

I have a problem with Xcode 11 running on Catalina (it had the same problem with Moave).

(我在Catalina上运行的Xcode 11有问题(与Moave相同)。)

When I try to copy/paste a view or a ViewController from one storyboard to another Xcode crashes with this exception:

(当我尝试将视图或ViewController从一个故事板复制/粘贴到另一个Xcode时,发生崩溃,但出现以下异常:)

...
Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Application Specific Information:
Sending paste: to IBStructureAreaDockView from <NSMenuItem: 0x7fe24030ddd0 Paste>
ProductBuildVersion: 11A1027
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEInterfaceBuilder/IDEInterfaceBuilder-15400/InterfaceBuilderKit/WidgetIntegration/View/IBViewIntegration.m:2451
Details:  There should only be 1 parent of all the constraint items extracted from the pasteboard: {(
)}
Object:   <IBUIView: 0x7fe23db1c600>
Method:   -ibDidExtractObjects:fromPasteboard:intoDocument:context:
Thread:   <NSThread: 0x7fe23ac17e80>{number = 1, name = main}
Hints:   
  0: Sending paste: to IBStructureAreaDockView from <NSMenuItem: 0x7fe24030ddd0 Paste>
Backtrace:
  0   -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
  1   _DVTAssertionHandler (in DVTFoundation)
  2   _DVTAssertionFailureHandler (in DVTFoundation)
  3   -[NSView(IBViewIntegration) ibDidExtractObjects:fromPasteboard:intoDocument:context:] (in IDEInterfaceBuilderKit)
  4   -[IBUIView(IBUIViewIntegration) ibDidExtractObjects:fromPasteboard:intoDocument:context:] (in IDEInterfaceBuilderCocoaTouchIntegration)
  5   -[IBDocument ibDidExtractObjects:fromPasteboard:context:] (in IDEInterfaceBuilderKit)
  6   -[IBDocument insertObjectsFromPasteboard:ofType:asChildrenOfObject:atIndex:context:finishExtractingObjectsBlock:] (in IDEInterfaceBuilderKit)
  7   -[IBDocument insertOrMoveChildrenFromPasteboard:ofType:asChildrenOfObject:atIndex:context:finishExtractingObjectsBlock:] (in IDEInterfaceBuilderKit)
  8   -[IBDocument addOrMoveChildrenFromPasteboard:ofType:toObject:context:finishExtractingObjectsBlock:] (in IDEInterfaceBuilderKit)
  9   -[IBStoryboardDocument addOrMoveChildrenFromPasteboard:ofType:toSceneGroup:context:] (in IDEInterfaceBuilderKit)
 10   -[IBSceneDockViewController performDockPasteWithPasteboard:context:] (in IDEInterfaceBuilderKit)
 11   -[IBSceneDockViewController dockViewPerformPaste:] (in IDEInterfaceBuilderKit)
 12   -[IBStructureAreaDockView paste:] (in IDEInterfaceBuilderKit)
 13   -[NSApplication(NSResponder) sendAction:to:from:] (in AppKit)
 14   __37-[DVTApplication sendAction:to:from:]_block_invoke.86 (in DVTKit)
 15   DVTInvokeWithFailureHint (in DVTFoundation)
 16   -[DVTApplication sendAction:to:from:] (in DVTKit)
 17   -[NSMenuItem _corePerformAction] (in AppKit)
 18   -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] (in AppKit)
 19   -[NSMenu performKeyEquivalent:] (in AppKit)
 20   routeKeyEquivalent (in AppKit)
 21   -[NSApplication(NSEvent) sendEvent:] (in AppKit)
 22   -[IDEApplication sendEvent:] (in IDEKit)
 23   -[NSApplication run] (in AppKit)
 24   NSApplicationMain (in AppKit)
 25   main (in Xcode)
 26   start (in libdyld.dylib)

Performing @selector(paste:) from sender NSMenuItem 0x7fe24030ddd0
abort() called

Application Specific Signatures:
[parentsOfItemsInConstraints count] == 1
...

Is it happening to someone else?

(这是发生在别人身上吗?)

Is this something not supported by storyboard?

(故事板不支持此功能吗?)

  ask by LorenzOliveto translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Same issue here.

(同样的问题在这里。)

I think it's a bug with the new Xcode 11.

(我认为这是新Xcode 11的错误。)

Found a quick workaround.

(找到了一个快速的解决方法。)

Instead of copying and pasting view controllers which will cause Xcode to crash you can use cmd + D to duplicate the view controllers .

(可以使用cmd + D复制视图控制器,而不是复制和粘贴会导致Xcode崩溃的视图控制器。)

But this will only be useful if in the same storyboard

(但这仅在同一个情节提要中有用)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...