constantine-fry / rebekka

Rebekka - FTP/FTPS client in Swift.
BSD 2-Clause "Simplified" License
87 stars 56 forks source link

Thread X: exc_bad_access code=1 on line 73 in SwiftOperation.swift #28

Open markogrbic95 opened 6 years ago

markogrbic95 commented 6 years ago

I'm having an issue when calling the list function from a background thread. I'm using the _session.list function exactly as in the examples and I'm calling that function in a while loop to check for files on server every N seconds. I'm waiting for every list function to finish before calling it again in the loop.

The issue happens on line 73 in file SwiftOperation.swift.

self.currentStream?.close()

The program breaks after a short amount of time with error: Thread X: exc_bad_access code=1 (X = thread number, never equal to 1 obviously since I call it in a non main thread).

Has anyone had this issue, or by any chance already solved it? Thank you.

markogrbic95 commented 6 years ago

I'm linking the stackoverflow question to this issue, maybe the answer will pop up there.

https://stackoverflow.com/questions/50317138/rebekka-ftp-framework-exc-bad-access-code-1-address-0x0