Posts

Post not yet marked as solved
6 Replies
875 Views
Okay here's a strange one. I have a project in which I compile a couple .mlmodel files on first launch of the app. For the vast majority of our users this is working just fine. However, for a few users the app is crashing on every launch at the point where I call MLModel.compileModel(at: newFileURL). The error that's getting thrown is: Error during compilation of model: Error Domain=NSCocoaErrorDomain Code=512 "The file couldn’t be saved." Once a user's device begins crashing here it will continue crashing here until a complete delete-reinstall of the app. A simple build-and-run will not cause the issue to go away (which makes it debuggable to an extent). The crashing issue even persists between app updates installed through the App Store. I've tried doing this compilation on different threads, changing the name of the model, etc. Nothing seems to resolve it except a complete delete and reinstall of the app. So the open questions are: Why would this method fail to write the file? Why are only some users getting into this crashing state? Why does a full delete-reinstall fix it? Any help, even just wild guesses, would be appreciated because I'm pretty stumped. Thanks!
Posted
by wvdk.
Last updated
.