Many thanks to reader John Gilbert, who is the first to have reported a bug in Woodpile. This led to the app consistently crashing when trying to start up in High Sierra 10.13.1 (at least).
My reading of the crash report which he kindly sent is that this is the result of a bug in the Swift 4.0 support libraries, so it may be macOS-specific. However, I have attempted to work around the bug, and Woodpile version 1.0b5 should open more reliably. Please let me know if it does, or whether you still experience problems like this.
This new beta-release is here: woodpile10b5
and in Downloads above.
For anyone developing with Swift 4.0, here are details of the problem:
During ViewController initialisation, in viewDidLoad()
, a series of calls access (NS)UserDefaults to build the popup menus. That constructing the Periods popup accesses those defaults as a Dictionary, as
let defaults = UserDefaults.standard
theDict = defaults.dictionaryRepresentation()
if !(theDict.isEmpty) {
…
}
The crash occurred, as far as I can see, with the call to UserDefaults.dictionaryRepresentation()
, which returned an error of
Could not cast value of type '__NSCFData' (0x7fff836b03c0) to 'NSDictionary' (0x7fff836b1db0)
in libswiftCore.dylib.
Examining my code, I found that it isn’t actually necessary to make this call here, and removing it doesn’t alter functionality in the app in the slightest.