Closed Demircivi closed 1 year ago
Thank you!
To add some context for future reference: I was able to reproduce this by doing the following:
A PR fixing this is on the way.
Aha! Thank you for fixing this! Based on your reproduction methods, I can now precisely crash the application 😂 I am waiting for #116 to be merged.
Some more context (which nobody needs to read). I would otherwise note and bookmark this and never find it again:
The reason this is even safe in WakaTime at the moment with the force cast moved into the if let
is the following line in our AXUIElement
extension's getValue()
function:
Beyond this, there's some Swift internals involved. It boils down to CFTypeRef
being a typealias for AnyObject
. And Any
/AnyObject
vs. nil is a bit weird in Swift, especially when it comes to opaque CoreFoundation types. See the accepted answer in this StackOverflow post.
Log from the
Console.app
: If I get it correct, this method causes the crash.I'm concerned about this force cast: