iTorrent icon indicating copy to clipboard operation
iTorrent copied to clipboard

Why it crashes?

Open 2856571872 opened this issue 4 years ago • 5 comments

image torrentLocalPath
"/var/mobile/Containers/Data/Application/A8CC1F82-58BF-4375-835E-4A31D1DF1467/Library/Caches/DiskFiles/faeeb9594b3d4c4594ef311e5fbe48c8.torrent"

2856571872 avatar Aug 17 '21 06:08 2856571872

Thread 1: EXC_BAD_ACCESS (code=1, address=0x1f)

2856571872 avatar Aug 17 '21 06:08 2856571872

Need more context. How to reproduce? Attach torrent file if crash specific to it.

XITRIX avatar Aug 17 '21 16:08 XITRIX

Attach torrent file if crash specific to it. I tried a lot of torrent files and they crashed. The file path is real and valid. Why does it crash when I join the download queue. Is there a problem with the SDK method call?

2856571872 avatar Aug 18 '21 01:08 2856571872

Tell me steps for reproduce, I have no problems with torrent adding. As I see, the code on screenshot is not mine, so how I could tell you “why it’s crashing”?

XITRIX avatar Aug 19 '21 14:08 XITRIX

Tell me steps for reproduce, I have no problems with torrent adding. As I see, the code on screenshot is not mine, so how I could tell you “why it’s crashing”?

I think so too, maybe there is a problem with my calling method. The way to reproduce is very simple, I integrated ITorrentframework into my project

  1. Download the torrent file

`

        let temp = TorrentSdk.getFilesOfTorrentByPath(path: torrentLocalPath)!

        let files = temp.files

        files.forEach { $0.priority = .normalPriority }

        if let hash = TorrentSdk.getTorrentFileHash(torrentPath: torrentLocalPath) {

            TorrentSdk.addTorrent(torrentPath: torrentLocalPath, states: files.map { $0.priority })

            TorrentSdk.startTorrent(hash: hash)

        }

` 3."TorrentSdk.addTorrent" crashed I think I may have missed some configuration. I am also looking at the ITorrent APP to find the problem, thank you very much for your answer

2856571872 avatar Aug 19 '21 15:08 2856571872