Uploaded image for project: 'Swift'
  1. Swift
  2. SR-11097

RunLoop.current.run crashes with EXC_BAD_ACCESS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Foundation
    • Labels:
      None
    • Environment:

      macOS Catalina 10.15 Beta

      Xcode 11 Beta 3

      Description

      When executing code that depends on spinning on the current RunLoop with (examples involve XCTest and Process script):

      RunLoop.current.run(mode: .default, before: .distantFuture)

      Results in an EXC_BAD_ACCESS (snaphsot from Nimble/Await.swift):

      This could also be related to a similar issue when waiting for a running Process to finish i.e.:

      #!/usr/bin/xcrun -sdk macosx swift
      import Foundation
      var arguments = CommandLine.arguments.filter { $0 != "-profile-coverage-mapping" }
      arguments.removeFirst()
      let process = Process()
      process.executableURL = URL(fileURLWithPath: "/usr/bin/xcrun")
      process.arguments = ["swiftc"] + arguments
      process.waitUntilExit()
      try process.run()
      

      Results in the attached ouput.txt

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            jjgp Jason
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: