There are 2 crashes: one due to importing from the background thread (this has been temporarily mitigated by importing from the main thread, which freezes the UI), and another crash that typically occurs when importing an image with a 4K resolution (or somewhere around there).
Background thread crash
Appears to be fixed using model context in background thread and update UI using Task
Moved import function to main thread
As a result, progress view cannot show progress
Using a model context created from the background thread does not work
Cross-thread model context use is bad and should be avoided somehow
It should be somehow possible to do everything on a single background thread, then call the main thread from that thread to solely update the UI
Large image crash
Appears to be fixed for single image imports (tested with 11MB image)
Simulator does not produce a similar crash, even when importing really large images
Potentially due to legacy album covers being 350px (now only 120px)?
Test again after providing Data Management feature to recreate album covers -> test and check the resolution of all covers and recreate if bigger than 120px
Provide Experiment to show album cover resolution overlay
There are 2 crashes: one due to importing from the background thread (this has been temporarily mitigated by importing from the main thread, which freezes the UI), and another crash that typically occurs when importing an image with a 4K resolution (or somewhere around there).
Background thread crash
Appears to be fixed using model context in background thread and update UI using Task
Large image crash
Appears to be fixed for single image imports (tested with 11MB image)