Swift Playgrounds 4.1 keeps crashing when rerunning code

Try to learn some Swift coding but Playgrounds keeps crashing.

I run Playgrounds 4.1 on latest Monterey 12.7.5, from a MacBook Air dated back 2017.

Part of the error log says:

Thread 9 Crashed::  Dispatch queue: com.apple.UIKit._UIViewServiceInterfaceConnectionRequest com.apple.PlaygroundsMac.ExecutionExtension

The error can be reproduced by re-running the code; Everything goes well when the code was run at first time, but is doomed to fail at second run.

Any help?

I am having the same issue, my setup is identical to yours. Did you figure it out? Thanks

Swift Playgrounds 4.1 keeps crashing when rerunning code
 
 
Q