Post

Replies

Boosts

Views

Activity

Reply to Horrible weird Window Server killing bug
This got even weirder. One is that sometimes the use of cos() would cause a compiler error, which was fixed by using Darwin.cos(). This may be fixed in Swift 6.3. The other thing is that in my much more complex code, the crash seemed to be caused by both the cos() call evaluating to 0, but only when the line being drawn with that result had a StrokeStyle applied to it. In anycase, I have filed Feedbacks explaining this, and I'm told the WindowServer team has had it brought to their attention.
Topic: UI Frameworks SubTopic: SwiftUI
Jan ’26
Reply to Horrible weird Window Server killing bug
Urgh, I think it's a divide by zero bug. So this can apparently crash the Window server: Path { path in path.move(to: pt(qdt.qx * -20, 0)) // DIV BY ZERO path.addLine(to: pt(qdt.qx * -20, qdt.qy * (sH)/cos(angle.radians))) } If cos(angle.radians) is 0, you get a simple but unrecoverable divide by zero error, and hey, that's on me. But I would expect the system to kick my program with a nice "EDIVBYZERO", not take out the window server. My solution to this is this function, which works because I don't need perfect accuracy: func cosNZ(_ input: Double) -> Double { let x = cos(input) if x == 0.0 { return Double.leastNonzeroMagnitude } return x }
Topic: UI Frameworks SubTopic: SwiftUI
Jan ’26
Reply to help() view modifier
Ooops, forgot I wrote that modifier, here it is: extension View { func roundedBorder(style: StrokeStyle = StrokeStyle(lineWidth: 1.0), color: Color = Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1))) -> some View { modifier(RoundedBorder(strokeStyle: style, color: color)) } } This is for macOS, yep.
Topic: UI Frameworks SubTopic: SwiftUI
Dec ’25
Reply to "service is in penalty box"
I was just using the program. Mostly I want to know what being in a penalty box means. Obviously it's not urgent, in fact I haven't seen it any time lately, so maybe a macOS upgrade changed things. I found it when I was looking to understand what the plugin I was developing was doing.
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’24
Reply to Horrible weird Window Server killing bug
This got even weirder. One is that sometimes the use of cos() would cause a compiler error, which was fixed by using Darwin.cos(). This may be fixed in Swift 6.3. The other thing is that in my much more complex code, the crash seemed to be caused by both the cos() call evaluating to 0, but only when the line being drawn with that result had a StrokeStyle applied to it. In anycase, I have filed Feedbacks explaining this, and I'm told the WindowServer team has had it brought to their attention.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jan ’26
Reply to Horrible weird Window Server killing bug
Urgh, I think it's a divide by zero bug. So this can apparently crash the Window server: Path { path in path.move(to: pt(qdt.qx * -20, 0)) // DIV BY ZERO path.addLine(to: pt(qdt.qx * -20, qdt.qy * (sH)/cos(angle.radians))) } If cos(angle.radians) is 0, you get a simple but unrecoverable divide by zero error, and hey, that's on me. But I would expect the system to kick my program with a nice "EDIVBYZERO", not take out the window server. My solution to this is this function, which works because I don't need perfect accuracy: func cosNZ(_ input: Double) -> Double { let x = cos(input) if x == 0.0 { return Double.leastNonzeroMagnitude } return x }
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jan ’26
Reply to help() view modifier
Note commenting out the roundedBorder modifier doesn't change this behaviour.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Dec ’25
Reply to help() view modifier
Ooops, forgot I wrote that modifier, here it is: extension View { func roundedBorder(style: StrokeStyle = StrokeStyle(lineWidth: 1.0), color: Color = Color(#colorLiteral(red: 0.8039215803, green: 0.8039215803, blue: 0.8039215803, alpha: 1))) -> some View { modifier(RoundedBorder(strokeStyle: style, color: color)) } } This is for macOS, yep.
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Dec ’25
Reply to Xcode 26 on Tahoe crashing
Thanks for the heads up.
Replies
Boosts
Views
Activity
Sep ’25
Reply to Cannot select individual view in selectable mode
This is still broken in Xcode 26.0 beta 2 (17A5241o). The workaround works in 16.4, but in 26 it's stochastic. It works in non legacy mode my extremely simple buncha Text views in a body view, but in legacy mode on my custom layout but just one layer view. In the view with custom layout and a ZStack, nothing either way.
Replies
Boosts
Views
Activity
Jul ’25
Reply to XcodeKit module not found, but why?
Thanks, Quinn! A happy pigeon
Replies
Boosts
Views
Activity
Apr ’25
Reply to How to use .symbolVariant(.contains: )
What I'm trying to do is given a particular symbol, find out what variants it has.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to Your app included hard to read type or typography
Maybe you could post the screenshots you made for the App Store here, so we can see perhaps see what the review folks are seeing?
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jan ’25
Reply to SwiftUI Previews not working Xcode 15 iOS 17 simulator
I ran into this with Xcode 16, this line from perlguy99 on github solved it for me. xcrun simctl --set previews delete all
Replies
Boosts
Views
Activity
Dec ’24
Reply to Xcode 15 Beta Stuck on preparing iphone simulator for previews
I ran into this with Xcode 16, this line from perlguy99 on github solved it for me. xcrun simctl --set previews delete all
Replies
Boosts
Views
Activity
Dec ’24
Reply to "service is in penalty box"
I was just using the program. Mostly I want to know what being in a penalty box means. Obviously it's not urgent, in fact I haven't seen it any time lately, so maybe a macOS upgrade changed things. I found it when I was looking to understand what the plugin I was developing was doing.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to XCode 15 (15A240d) keeps crashing on launch
For me, this version keeps asking if I want to close the workspace whenever I come back to the machine in the morning. (I don't turn off my machine at night). Not a crash, but very odd.
Replies
Boosts
Views
Activity
Oct ’23