VM Startup silently fails on Virtualization error
ast3150 opened this issue · comments
Alain Stulz commented
The setupAndRunVirtualMachine()
function in VMManager
silently fails if an error in the Virtualization
framework occurrs.
This is because the try
syntax in a Task
does not require the code to actually handle the error. (see https://forums.swift.org/t/task-initializer-with-throwing-closure-swallows-error/56066 )
Cilicon/Cilicon/VMManager.swift
Lines 94 to 97 in df4f3dc
My recommended solution is to run the entire method on @MainActor
and just remove the Task
altogether.
This can help users debug issues such as this, because important context is provided for debugging: