SwiftCoroutine icon indicating copy to clipboard operation
SwiftCoroutine copied to clipboard

A certain nested coroutines causes LLDB RPC Server crash on a breakpoint

Open heshuimu opened this issue 5 years ago • 4 comments

For the following code, if I put a breakpoint on line where let a is in Xcode, LLDB debug server will crash.

If I start the initial coroutine on main queue instead of global, or if I remove the middle CoFuture, no crashes would happen when the breakpoint hits.

import UIKit
import SwiftCoroutine

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        DispatchQueue.global().startCoroutine {
            try CoFuture<Void> {
                try DispatchQueue.main.await {
                    let a = 1 /* SET BREAKPOINT ON THIS LINE*/
                }
            }.await()
        }
    }

}
Message from debugger: The LLDB RPC server has crashed. The crash log is located in ~/Library/Logs/DiagnosticReports and has a prefix 'lldb-rpc-server'. Please file a bug and attach the most recent crash log.

Unfortunately, when this crash happens, no actual diagnostic files are actually generated.

heshuimu avatar Oct 15 '20 22:10 heshuimu

Try to get logs from ~/Library/Logs/DiagnosticReports

ladeiko avatar Oct 16 '20 05:10 ladeiko

I have the same issiues

ladeiko avatar Oct 16 '20 05:10 ladeiko

Try to get logs from ~/Library/Logs/DiagnosticReports

I wanted to, but when the crash happens nothing appears in that directory.

heshuimu avatar Oct 17 '20 02:10 heshuimu

I have the same issue. Crash when putting breakpoint in nested coroutines. Did someone find a solution? Thanks.

NicoDB79 avatar Nov 23 '21 22:11 NicoDB79