Assert error breaking previews

A foundation models bug I keep running into when in the preview phase of the testing. The error never seems to occur or break the app when I am testing on the simulator or on a device but sometimes I am running into this error when in a longer session while being in preview.

The error breaks the preview and crashes it and the waring on it is labeled as : "Assert in LanguageModelFeedback.swift"

This is something I keep running into, where I have been using foundation models for my project

Hi,

Sorry to hear you are occasionally having problems with foundation models and previews working. The best next step will be to file a feedback with diagnostics the next time you hit this so we can take a look.

Install the logging profile using instructions available here: https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift On your mac running Xcode, and on your physical preview device (if you are using one).

Install the logging profile using the following instructions on your mac running Xcode; and if you are using one, your physical preview device (iOS or visionOS): https://developer.apple.com/bug-reporting/profiles-and-logs/?name=swift

Then when you reproduce the problem in Xcode:

  1. Either (a) an error banner will appear, click the "Diagnostics" button in that banner; or (b) if you're not seeing an error but you still want to provide diagnostics you can get the same diagnostics window by going under the Editor menu in the menu bar, then selecting the Canvas submenu, then selecting "Diagnostics".
  2. In the sheet that appears, click "Generate Report" in the bottom left of the sheet
  3. Attach (or make from the folder) the resulting zip file to the bug (will be named something like previews-diagnostics-0123456789.zip)
  4. Generate a sysdiagnose on your mac and any on-device preview devices, and attach those too

Thanks for reporting! To add to what Chris said, please share in your report:

  • what version of MacOS are you on? (or if previewing for a device, that OS as well)
  • which version of Xcode are you on?

This will help us narrow down on potential causes, thanks!

Assert error breaking previews
 
 
Q