Post not yet marked as solved
Post marked as unsolved with 1 replies, 1,694 views
I get an error:
error: Execution was interrupted, reason: signal SIGABRT.
The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation.
when running the following minimal playground code in Xcode:
Swift
import SwiftUI
import PlaygroundSupport
struct Country: Identifiable {
var id: String { name }
var name: String
var flag: String
}
struct CountryView: View {
let name: String
let flag: String
var body: some View {
Text(name)
}
}
PlaygroundPage.current.setLiveView(
ForEach([Country(name: "Italy", flag: "italy")], id: \.id) { country in
CountryView(name: country.name, flag: country.flag)
}
)
This is for current Xcode Version 12.4 (12D4e), and beta3.
Note that Xcode does not crash. It's the playground execution.
Any hints for a workaround?
Additional notes:
Currently, playground seem to have a lot if issues and it's currently not usable as a whole - even without using SwiftUI there are a lot issues resulting in crashes, which I think is a very bad situation.
A crash log is generated when executing the playground.
Part of the crash log:
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
External Modification Warnings:
Debugger attached to process.
Application Specific Information:
abort() called
CoreSimulator 757.3 - Device: iPad Pro (9.7-inch) (28657173-2D19-4421-B084-2F4DDD658725) - Runtime: iOS 14.4 (18D46) - DeviceType: iPad Pro (9.7-inch)
AttributeGraph precondition failure: setting value during update: 5656.
Crash Log - https://developer.apple.com/forums/content/attachment/1d99662f-a766-4cd0-a002-a37f7de2dce0