0

下载时应用程序崩溃 1/4 次

崩溃日志在这里。我不明白如何解决它。

Incident Identifier: 36BCCA72-9FBF-448A-BCA7-AACB0195B311
Hardware Model:      iPhone12,3
Process:             iBIBLE [16728]
Path:                /private/var/containers/Bundle/Application/E384D4A1-AD75-4693-94D5-335B158C3452/iBIBLE.app/iBIBLE
Identifier:          com.revelationmedia-iBible
Version:             23 (1.0)
AppStoreTools:       13C90b
AppVariant:          1:iPhone12,3:14
Beta:                YES
Code Type:           ARM-64 (Native)
Role:                Foreground
Parent Process:      launchd [1]
Coalition:           com.revelationmedia-iBible [2371]


Date/Time:           2022-01-28 08:44:59.9791 -0800
Launch Time:         2022-01-28 08:44:46.7851 -0800
OS Version:          iPhone OS 14.8 (18H17)
Release Type:        User
Baseband Version:    2.06.00
Report Version:      104

Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x8000000000000040 -> 0x0000000000000040 (possible pointer authentication failure)
VM Region Info: 0x40 is not in any region.  Bytes before following region: 4336795584
      REGION TYPE                 START - END      [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                   1027e4000-1027f0000 [   48K] r-x/r-x SM=COW  ...LE.app/iBIBLE
@objc private func updateProgress() {
    delegate?.downloadTask(self, didWriteData: totalBytesWritten.values.reduce(0, +),
                           totalBytesExpectedToWrite: totalBytesExpectedToWrite.values.reduce(0, +))
}

 func downloadTask(_ task: ChapterDownloadTask, didWriteData totalBytesWritten: Int64, totalBytesExpectedToWrite: Int64){
        let value = self.downloading.value
        guard totalBytesWritten > 0 && totalBytesExpectedToWrite > 0,
            let chapter = task.chapter,
            let index = value
                .firstIndex(where: {$0.chapter.systemName == chapter.systemName}) else {
            return
        }

        value[index].totalBytesExpectedToWrite = totalBytesExpectedToWrite
        value[index].totalBytesWritten = totalBytesWritten
        self.downloading.accept(value)
    }
4

1 回答 1

0

据我了解,这是一个内存问题,因为崩溃的线程访问了未映射的内存。请阅读文档,以便您了解正在发生的事情。

(如果您可以发布与崩溃相关的代码)

于 2022-01-31T09:14:58.993 回答