Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in File.write #2

Open
radianttap opened this issue Mar 4, 2025 · 0 comments
Open

Crash in File.write #2

radianttap opened this issue Mar 4, 2025 · 0 comments

Comments

@radianttap
Copy link

radianttap commented Mar 4, 2025

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..?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant