Hi everyone,
Converted a small chunks of my project into Swift 3.
When I run the unit test, I run into some runtime error that seems to be related to memory (the crash doesn't happen all the time). I suspect it's related to recursive enum with associated values.
The definition of my enum is as follow:
indirect enum ContentURLSegment {
case list(parentSeg: ContentURLSegment?, contentType: ContentType, page: Int)
case detail(parentSeg: ContentURLSegment?, contentType: ContentType, serverID: UInt)
case modifier(parentSeg: ContentURLSegment?, contentType: ContentType, modifier: String)
case create(parentSeg: ContentURLSegment?, contentType: ContentType)
}Can you guys recommend some ways where I can debug the problem? Or, isolate the problem to see if it's caused by my code or it's Swift 3 problem?
I tried checking "Zombie Objects" in "Diagnostics" tap in Scheme. But that doesn't seem to catch much extra information. (Maybe it only works with objc objects?)
Attached is the debug view when execution of the test suit stops.
Thanks for the help!
Bill