Skip to content

EXC_BAD_ACCESS (SIGSEGV) with Storage and Carthage #3750

Closed
@supermarin

Description

@supermarin

[REQUIRED] Step 2: Describe your environment

  • Xcode version: 11.0 Beta 6
  • Firebase SDK version: 6.7.0
  • Firebase Component: Storage
  • Component version: 6.7.0

[REQUIRED] Step 3: Describe the problem

Upon completion of uploadTasks, in about 1/3 of cases the app crashes with EXC_BAD_ACCESS (SIGSEGV)

Steps to reproduce:

  1. Initialize a simple app with 1 table view controller
  2. Sign in with Firebase Auth
  3. kick off an upload task (either from a file or Data, 1MB) on a cell press
  4. see it crashing once upload is complete.
    NOTE: it doesn't crash on every single upload, crashes about 1/3 of the time.

Relevant Code:

func tableView(_ tableView:UITableView, didSelectRowAt indexPath:IndexPath){ // TODO: Expand cell, add sharing / uploading guardlet user =Auth.auth().currentUser,let email = user.email else{ // handle sign in experience return}letitem=items[indexPath.row]letstorageRef=Storage.storage().reference()letitemsRef= storageRef.child("items")letuserBucketRef= itemsRef.child(email)letfileName= item.fileURL.lastPathComponent letfileRef= userBucketRef.child(fileName)letuploadTask= fileRef.putFile(from: item.fileURL, metadata:nil){[weak self] metadata, error inguard error ==nilelse{letalert=UIAlertController(title:"Error", message: error?.localizedDescription, preferredStyle:.alert) alert.addAction(UIAlertAction(title:"OK", style:.default))self?.show(alert, sender:nil)return} // Happy path log(.debug,"Upload done!")} uploadTask.enqueue()}

Gist with full crash log: https://gist.github.com/supermarin/b9fe575cd95efeb905e3b771f0fd883c

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      close