SwiftUI App Crashes on Simulator When Using @Query Macro in Chart Interaction

I'm developing an app with a chart in SwiftUI. I want the following block of code to run when the chart is clicked. On my personal iPhone, the app works flawlessly. But when I try it in the simulator it crashes and gives me about 5-10 of the following errors. When I remove the @Query macro from the code block, the application does not crash in the simulator, but I continue to get the errors I mentioned. If I do not run the following code block, I do not get the errors I mentioned.

struct SaleDetailView: View {
    
    @Query(filter: #Predicate<Registration> {
        !$0.activeRegistration
    }) private var regs: [Registration]
    
    var body: some View {
        VStack {
            DailySaleView()
        }
        .padding()
    }
}

Thank you in advance for your answers. Do not hesitate to ask if you have any questions.

Thanks, MFS

When trying the app on my personal iPhone, cpu usage is max 50%. However, when I try it in the simulator, when I open the chart screen, it goes above 100% and goes back down to 0. If you stop the app in the meantime, you get the errors I mentioned. If you stop the application after the cpu usage drops to 0, you do not get any error. Is this a normal situation?

SwiftUI App Crashes on Simulator When Using @Query Macro in Chart Interaction
 
 
Q