Xcode 16.1 and 16.2. Yay
Post
Replies
Boosts
Views
Activity
Oh great. Love when I find a huge problem in the latest Xcode and find threads going back several years revealing that it still hasn't been fixed.
iOS 18.2, Xcode 16.2
Yep same problem
Release candidate builds started doing this for me :(
Release candidate builds doing this
Great getting this issue now with the release candidates released today
Great. Never had this until updating to the release candidates today
Nah that doesn't fix it
CrashReportError: Fatal Error in UVJITAgent.swift
App crashed due to fatalError in UVJITAgent.swift at line 58.
JIT linker connection terminated due to remote disconnect
error log
This won't let me upload the zip file..
import SwiftUI
#if canImport(JournalingSuggestions)
import JournalingSuggestions
#endif
struct ContentView: View {
var willNotCrash: AnyView {
#if canImport(JournalingSuggestions)
if true == false {
//should never run, but still crashes
return AnyView(JournalingSuggestionsPicker("Picker") { suggestion in
})
} else {
return AnyView(Text("Should always show"))
}
#else
return AnyView(Text("Should show on ipad"))
#endif
}
@ViewBuilder var willCrash: some View {
#if canImport(JournalingSuggestions)
if true == false {
JournalingSuggestionsPicker("Picker") { suggestion in
}
} else {
Text("Should always show")
}
#else
Text("Should show on ipad")
#endif
}
var body: some View {
VStack {
// willCrash
willNotCrash
}
.padding()
}
}
I was able to narrow it down to ViewBuilders.
Here is a sample project. I'm able to fix this by wrapping this inside a non view builder type erased view.
MESSY
Failed to look up symbolic reference at 0x10460f095 - offset 3979 - symbol symbolic _____y_____y_____yACy__________y_____GG_____y_____GG___________y_____yAMGAMGtGG 7SwiftUI6VStackV AA9TupleViewV AA15ModifiedContentV AA5ImageV AA30_EnvironmentKeyWritingModifierV AI5ScaleO AA016_ForegroundStyleL0V AA09TintShapeO0V AA4TextV AA012_ConditionalG0V 21JournalingSuggestions0tU6PickerV in /private/var/folders/dg/m7p8ljs52vv5phhm44r9bb7h0000gn/X/92886C6C-BD41-5654-A4AC-0B95A4D04BC7/d/Wrapper/JournalingSuggestionsCrash1.app/JournalingSuggestionsCrash1.debug.dylib
#if canImport(JournalingSuggestions)
if true == false {
//OBVIOUSLY this case will never "run" but SwiftUI still checks it, and therefore crashes the app
//THIS STILL CAUSES A CRASH ON IPAD, if I want it to run i need to comment out.
JournalingSuggestionsPicker {
Text("Choose a suggestion")
} onCompletion: { suggestion in
print("suggestion:", suggestion)
}
} else {
//Only getting here if I comment out JournalingSuggestions code cause CRASH
Text("Would see this on iPad if I used the device idiom check instead of true == false")
}
#else
Text("Only see this on simulator, when I don't link weakly, otherwise i cannot build to simulator no matter what")
#endif
#if canImport(JournalingSuggestions) just does not work. The code inside of it always runs.
It doesn't matter if I mark the framework as optional in build phases. I doesn't matter if I provide the manual linker flag.
Anything inside #if canImport(JournalingSuggestions) still executes on iPads.
This is BEYOND problematic because it doesn't MATTER if I use the device idiom to check if it's on an iPad or a phone. Because SwiftUI runs that code no matter what. The binary will always crash because #if canImport(JournalingSuggestions) does not block execution.
And besides, the linker flags solution DID NOT fix the simulator issue. Same exact issue. This is a massive problem.