An EXC_BAD_ACCESS is happening because you're trying to access a resource that no longer exists, so it looks like something in your code is trying to do 'something' with that window after you've told it to be released when it's closed.
You need to debug your code and ensure you're not trying to do anything with released resources.
Topic:
UI Frameworks
SubTopic:
SwiftUI
Tags: