DLog icon indicating copy to clipboard operation
DLog copied to clipboard

Crash in File.write

Open radianttap opened this issue 10 months ago • 0 comments

I just got this crash report.

Image

I assume it's this closure u in File.swift file

  private func write(_ text: String?) -> String? {
    if let str = text, !str.isEmpty {
      queue.async {
        if let data = (str + "\n").data(using: .utf8) {
          self.file?.write(data)
        }
      }
    }
    return text
  }

The docs say

This method raises fileHandleOperationException if the file descriptor is closed or isn’t valid, if the handle represents an unconnected pipe or socket endpoint, if there isn’t any free space on the file system, or if any other writing error occurs.

Any ideas how to fix this..?

radianttap avatar Mar 04 '25 09:03 radianttap