Как только я пытаюсь просмотреть мой код, он вылетает с этими ошибками. Я уже написал что-то еще по этому вопросу, но, похоже, связано. Как только один файл вышел из строя, все остальные последовали за ним.
Есть идеи?
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007ffee4b53ff0
Exception Note: EXC_CORPSE_NOTIFY
External Modification Warnings:
Thread creation by external task.
VM Regions Near 0x7ffee4b53ff0:
MALLOC_LARGE 00007fb8683d3000-00007fb8683f4000 [ 132K] rw-/rwx SM=PRV
--> STACK GUARD 00007ffee1354000-00007ffee4b54000 [ 56.0M] ---/rwx SM=NUL stack guard for thread 0
Stack 00007ffee4b54000-00007ffee5354000 [ 8192K] rw-/rwx SM=ALI thread 0
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libswiftCore.dylib 0x00007fff512e9a86 swift_getGenericMetadata + 102
1 com.apple.AttributeGraph 0x00007fff2fc601cd __swift_instantiateGenericMetadata + 29
2 com.apple.AttributeGraph 0x00007fff2fc61d1d protocol witness for static Formula.add(_:to:) in conformance Formulas.Offset<A, B> + 77
3 com.apple.SwiftUI 0x00007fff2c378b3f closure #1 in static AGGraphRef.<< infix<A>(_:_:) + 15
4 com.apple.SwiftUI 0x00007fff2c378bef thunk for @callee_guaranteed (@unowned UnsafePointer<A>) -> (@unowned Attribute<A.Value>, @error @owned Error) + 15
РЕДАКТИРОВАТЬ:
import UIKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
return true
}
// MARK: UISceneSession Lifecycle
func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
}
func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
}
import SwiftUI
struct PisteRow: View {
var pista: Structure
var body: some View {
HStack {
padding()
pista.image
.resizable()
.frame(width: 50, height: 50)
.clipShape(Circle())
Text(pista.name)
Spacer()
}
}
}
struct PisteRow_Previews: PreviewProvider {
static var previews: some View {
PisteRow(pista: pisteData[0])
.previewLayout(.fixed(width: 300, height: 70))
}
}
Это запрошенные файлы, Делегат приложения и файл SwiftUI, который не разрешает предварительный просмотр. Благодаря.