Swiftui Crash vstack init/overflowIOS

Программируем под IOS
Ответить
Anonymous
 Swiftui Crash vstack init/overflow

Сообщение Anonymous »

Я провалил обзор приложения из -за Exc_BAD_ACCESS (SIGSEGV) Когда обзор приложения просто открывает представление. Я пытался воспроизвести его на каждом возможном устройстве/SIM -симе и версии iOS, но я не могу. Я добавлю ссылку ниже в журналы с аварии Symbilicated. GPT говорит, что журналы сбоя указывают ошибку SEG на vStack , когда представление инициализировано из -за переполнения в стеке. Обзор приложения сказал, что просто открытие представления вызывает аварию. Я несколько раз повредил Apple Review, и каким -то образом они могут воспроизводить его каждый раз, но я не могу. Я не самый лучший в понимании этих журналов сбоев, я ценю, так что помогите.rowView) в Scrollview

Я включу основную структуру моего кода. Я бы признателен, если кто -нибудь увидит какие -либо проблемы. Чтобы быть ясным, я не могу дать воспроизводимый пример, потому что даже я не могу воспроизводить на каком -либо устройстве. Поэтому я предоставил основную планировку моего взгляда вместе с журналами символического сбоя. />https://docs.google.com/document/d/1in0 ... sp=sharing
struct ToolsView: View {
@EnvironmentObject var auth: AuthViewModel
@EnvironmentObject var popRoot: PopToRoot
@Environment(\.colorScheme) var colorScheme
@State var filter = "No filter"
@State var filterImage = "shoe"
@Namespace var hero

@State var sheetIDThanks = UUID().uuidString

@State var sentTotal = 0
@State private var isShowingMessages = false
@State private var recipients: [String] = []

let wealthAioPoints = ["A heavy duty automation tool, made simple."]
let wealthAccountsPoints = ["All the accounts you need."]
// ... more points arrays with info

var body: some View {
ScrollViewReader { proxy in
ScrollView {
VStack(spacing: 15){ // Line 41 - crash here
Color.clear.frame(height: 1).id("scrolltop")

rowView(type: 0, image: "WealthIcon", title: "Wealth AIO", points: wealthAioPoints, owned: auth.currentUser?.hasBotAccess ?? false, price: "$49.99")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

rowView(type: -3, image: "instances", title: "Wealth Scale", points: wealthScalePoints, owned: auth.currentUser?.ownedInstances != nil, price: "$34.99")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

rowView(type: -1, image: "Proxies", title: "Wealth Proxies", points: wealthProxyPoints, owned: true, price: "")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

rowView(type: -4, image: "WealthAccounts", title: "Accounts Oasis", points: wealthAccountsPoints, owned: true, price: "")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

rowView(type: -2, image: "Server", title: "Wealth Servers", points: wealthServerPoints, owned: true, price: "")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

rowView(type: 9, image: "aiLogo", title: "Ai Profile+", points: aiProfilePoints, owned: (auth.currentUser?.unlockedTools ?? []).contains("Ai Profile+"), price: "$29.99")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

rowView(type: 7, image: "qApp", title: "In-App Queue", points: inAppQPoints, owned: (auth.currentUser?.unlockedTools ?? []).contains("In-App Queue"), price: "$39.99")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

rowView(type: 8, image: "qDiscord", title: "Discord Queue", points: discordQPoints, owned: (auth.currentUser?.unlockedTools ?? []).contains("Discord Queue"), price: "$99.99")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

rowView(type: 6, image: "variantScraper", title: "Variant Scraper", points: variantPoints, owned: (auth.currentUser?.unlockedTools ?? []).contains("Variant Scraper"), price: "$99.99")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

rowView(type: 1, image: "forwardPro", title: "Forward Pro", points: forwardProPoints, owned: (auth.currentUser?.unlockedTools ?? []).contains("Forward Pro"), price: "$149.99")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

rowView(type: 2, image: "forwardLite", title: "Forward Lite", points: forwardLitePoints, owned: (auth.currentUser?.unlockedTools ?? []).contains("Forward Lite"), price: "$99.99")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

rowView(type: 3, image: "CsvPro", title: "CSV Pro", points: csvProPoints, owned: (auth.currentUser?.unlockedTools ?? []).contains("CSV Pro"), price: "$149.99")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

rowView(type: 4, image: "CsvLite", title: "CSV Lite", points: csvLitePoints, owned: (auth.currentUser?.unlockedTools ?? []).contains("CSV Lite"), price: "$99.99")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

rowView(type: 5, image: "stockChecker", title: "Stock Checker", points: stockPoints, owned: (auth.currentUser?.unlockedTools ?? []).contains("Stock Checker"), price: "$49.99")
.scrollTransition { content, phase in
content
.scaleEffect(phase == .identity ? 1 : 0.65)
.blur(radius: phase == .identity ? 0 : 10)
}

Color.clear.frame(height: 150)
}
}
.safeAreaPadding(.top, 60 + top_Inset())
.scrollIndicators(.hidden)
.onChange(of: popRoot.tap) { _, _ in
if popRoot.tap == 2 && appeared {
withAnimation {
proxy.scrollTo("scrolltop", anchor: .bottom)
}
popRoot.tap = 0
}
}
}
.sheet(isPresented: $isShowingMessages) {
MessageUIView(recipients: $recipients, body: $message, completion: handleCompletion(_:))
}
.sheet(isPresented: $showSettings, content: {
SettingsSheetView(hideOrderNums: .constant(nil))
})
.overlay(alignment: .top) {
headerView()
}
.ignoresSafeArea()
.onAppear(perform: {
appeared = true
})
.onDisappear {
appeared = false
}
.sheet(isPresented: $showBuySheet) {
buySheet().id(sheetID)
}
.sheet(isPresented: $showThanksSheet) {
thanksSheet().id(sheetIDThanks)
}
}
@ViewBuilder
func rowView(type: Int, image: String, title: String, points: [String], owned: Bool, price: String) -> some View {
VStack(spacing: 0){
Image(image)
.resizable().scaledToFill()
.frame(height: 100).blur(radius: 6)
.clipShape(UnevenRoundedRectangle(topLeadingRadius: 12, topTrailingRadius: 12))
.contentShape(UnevenRoundedRectangle(topLeadingRadius: 12, topTrailingRadius: 12))
.overlay(alignment: .topLeading){
VStack(alignment: .leading, spacing: 3){
if type == 12 || type == 14 || type == 16 || type == 17 || type == 19 || type == 21 {
Text("One Time: \(price)")
.fontWeight(.heavy).font(.subheadline)
.padding(.horizontal, 10).padding(.vertical, 4)
.background(.ultraThinMaterial)
.clipShape(Capsule()).padding(.leading, 10).padding(.top, 10)
} else if type == -1 || type == -4 {
Text("Pay as you go")
.fontWeight(.heavy).font(.subheadline)
.padding(.horizontal, 10).padding(.vertical, 4)
.background(.ultraThinMaterial)
.clipShape(Capsule()).padding(12)
}

Spacer()
}
}
.overlay(alignment: .bottomTrailing){
Image(image)
.resizable().scaledToFill()
.frame(width: 70, height: 70)
.clipShape(RoundedRectangle(cornerRadius: 12))
.contentShape(RoundedRectangle(cornerRadius: 12))
.overlay(content: {
RoundedRectangle(cornerRadius: 12)
.stroke(.gray, lineWidth: 1).opacity(0.6)
})
.offset(y: 36).padding(.trailing, 20)
}

HStack(alignment: .top){
Text(title).font(.title2).bold()
Spacer()
}.padding(.horizontal, 10).padding(.top, 10)

VStack(alignment: .leading, spacing: 7){
ForEach(points, id: \.self) { item in
HStack(spacing: 2){
Text("-").font(.system(size: 13)).bold().foregroundStyle(.blue)

Text(item).multilineTextAlignment(.leading).font(.system(size: 13))

Spacer()
}
}

}.padding(.horizontal, 10).padding(.top, 10).padding(.bottom, 10)
}
.background(content: {
TransparentBlurView(removeAllFilters: true)
.blur(radius: 14, opaque: true)
.background(colorScheme == .dark ? .black.opacity(0.4) : .white.opacity(0.4))
})
.clipShape(RoundedRectangle(cornerRadius: 12))
.contentShape(RoundedRectangle(cornerRadius: 12))
.overlay(content: {
RoundedRectangle(cornerRadius: 12)
.stroke(lineWidth: 1).opacity(0.4)
})
.padding(.horizontal, 12)
}
}


Подробнее здесь: https://stackoverflow.com/questions/796 ... t-overflow
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «IOS»