Xcode Playground crashes with multiple Text items in SwiftUI VStack/HStack/List

Originator:oleksandr.kaverin
Number:rdar://FB8957014 Date Originated:12/30/2020
Status:Open Resolved:No
Product:Xcode Product Version:12.3 (12C33)
Classification:Application Crash Reproducible:Yes
 
Please describe the issue:
Xcode Playground crashes when it renders SwiftUI code with more than 4 Text items in SwiftUI VStack/HStack/List

Please list the steps you took to reproduce the issue:
1. Open the attached sample Xcode playground
2. Run the playground

What did you expect to happen?
Five Text items displayed in a vertical stack in the live view area

What actually happened?
Error message:
error: Execution was interrupted, reason: EXC_BAD_ACCESS (code=1, address=0x108).
The process has been left at the point where it was interrupted, use "thread return -x" to return to the state before expression evaluation.

Note: 
1. The issue won't reproduce if there are other types of views in the stack / list (Button, Toggle, etc).
2. The issue won't reproduce if there are <5 Text items
3. The issue with reproduce with VStack, HStack, List


Code: SwiftUIStackCrash.playground

import SwiftUI
import PlaygroundSupport

struct ContentView: View {
    var body: some View {
        VStack { // Also reproduced with: HStack, List
            Text("1. Hello World")
            Text("2. Hello World")
            Text("3. Hello World")
            Text("4. Hello World")
//            Comment out the `Text` below to prevent the crash
            Text("5. Hello World")
        }
    }
}

PlaygroundPage.current.setLiveView(ContentView())

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!