RCBacktrace icon indicating copy to clipboard operation
RCBacktrace copied to clipboard

error: String(cString: info.dli_fname)

Open tangjianfengVS opened this issue 2 years ago • 1 comments

/// Address for which this struct was constructed static func create(address: UInt, index: Int) -> StackSymbol { var info = dl_info() dladdr(UnsafeRawPointer(bitPattern: address), &info)

    let stackSymbol = StackSymbol(symbol: symbol(info: info),
                                  file: String(cString: info.dli_fname),
                                  address: address,
                                  symbolAddress: unsafeBitCast(info.dli_saddr, to: UInt.self),
                                  image: image(info: info),
                                  offset: offset(info: info, address: address),
                                  index: index)
    return stackSymbol
}

error: String(cString: info.dli_fname) RCBacktrace/StackSymbol.swift:57: Fatal error: Unexpectedly found nil while implicitly unwrapping an Optional value

tangjianfengVS avatar Oct 15 '23 12:10 tangjianfengVS

I also see this issue.

hborders avatar Oct 16 '23 16:10 hborders