Segfault when building data model on Xcode 12b5 #338

Closed
opened 2025-12-29 15:29:23 +01:00 by adam · 5 comments
Owner

Originally created by @joeljfischer on GitHub (Aug 19, 2020).

Hello! I'm having an issue on Xcode 12b5 where my existing data models that run on Xcode 11 in a framework are causing a Segfault on compilation. I have not attempted to run this code on a previous beta to know if it worked.

1.    Apple Swift version 5.3 (swiftlang-1200.0.28.1 clang-1200.0.30.1)
2.    While evaluating request SILGenSourceFileRequest(SIL Generation for file "/Users/joelfischer/Development/apps/ding-timer/Supporting Targets/DingKit/Models/StopwatchDataModel.swift")
3.    While silgen emitPropertyWrapperBackingInitializer SIL function "@$s7DingKit9StopwatchC30currentLapDurationBeforeResumeSdvpfP".
 for 'currentLapDurationBeforeResume' (at .../StopwatchDataModel.swift:13:16)

Where the class looks something like:

public class Stopwatch: CoreStoreObject {
    @Field.Stored("currentLapDurationBeforeResume")
    public var currentLapDurationBeforeResume: Double = 0.0
}
Originally created by @joeljfischer on GitHub (Aug 19, 2020). Hello! I'm having an issue on Xcode 12b5 where my existing data models that run on Xcode 11 in a framework are causing a Segfault on compilation. I have not attempted to run this code on a previous beta to know if it worked. ``` 1. Apple Swift version 5.3 (swiftlang-1200.0.28.1 clang-1200.0.30.1) 2. While evaluating request SILGenSourceFileRequest(SIL Generation for file "/Users/joelfischer/Development/apps/ding-timer/Supporting Targets/DingKit/Models/StopwatchDataModel.swift") 3. While silgen emitPropertyWrapperBackingInitializer SIL function "@$s7DingKit9StopwatchC30currentLapDurationBeforeResumeSdvpfP". for 'currentLapDurationBeforeResume' (at .../StopwatchDataModel.swift:13:16) ``` Where the class looks something like: ```swift public class Stopwatch: CoreStoreObject { @Field.Stored("currentLapDurationBeforeResume") public var currentLapDurationBeforeResume: Double = 0.0 } ```
adam added the fixedios/compiler bug labels 2025-12-29 15:29:23 +01:00
adam closed this issue 2025-12-29 15:29:24 +01:00
Author
Owner

@JohnEstropia commented on GitHub (Aug 19, 2020):

Thanks, this is a known issue and a workaround is available in the newDemo branch.
Unfortunately it looks like the actual fix won't make it for the final Swift 5.3 release, but the workaround should make your current code compile for now
Swift JIRA ticket: https://bugs.swift.org/browse/SR-13069

@JohnEstropia commented on GitHub (Aug 19, 2020): Thanks, this is a known issue and a workaround is available in the `newDemo` branch. Unfortunately it looks like the actual fix won't make it for the final Swift 5.3 release, but the workaround should make your current code compile for now Swift JIRA ticket: https://bugs.swift.org/browse/SR-13069
Author
Owner

@JohnEstropia commented on GitHub (Aug 19, 2020):

@joeljfischer You can use the newDemo branch directly for now. I'll be pushing that for a CoreStore update once the Xcode 12 GM build is released

@JohnEstropia commented on GitHub (Aug 19, 2020): @joeljfischer You can use the `newDemo` branch directly for now. I'll be pushing that for a CoreStore update once the Xcode 12 GM build is released
Author
Owner

@joeljfischer commented on GitHub (Aug 19, 2020):

@JohnEstropia Thanks for the quick response. Unfortunately, I'm still seeing that issue after switching to the branch (using Cocoapods).

@joeljfischer commented on GitHub (Aug 19, 2020): @JohnEstropia Thanks for the quick response. Unfortunately, I'm still seeing that issue after switching to the branch (using Cocoapods).
Author
Owner

@JohnEstropia commented on GitHub (Aug 19, 2020):

@joeljfischer Oops, sorry it wasn't pushed. I just pushed it now so please try again

@JohnEstropia commented on GitHub (Aug 19, 2020): @joeljfischer Oops, sorry it wasn't pushed. I just pushed it now so please try again
Author
Owner

@joeljfischer commented on GitHub (Aug 19, 2020):

😂 No worries. That seemed to fix it! Thanks for the workaround. Hopefully it gets into Swift 5.3.1.

@joeljfischer commented on GitHub (Aug 19, 2020): :joy: No worries. That seemed to fix it! Thanks for the workaround. Hopefully it gets into Swift 5.3.1.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#338