我有一个存储时间线的领域模型(我正在制作视频编辑应用程序),并且经常会破坏访问它的RMArray属性.该应用程序已经发货,我自己没有经历过,但我的crushlytics经常通知我这次崩溃.这是崩溃日志:
Fatal Exception: RLMException
Object has been deleted or invalidated.
Thread : Fatal Exception: RLMException
0 CoreFoundation 0x2614d45f __exceptionPreprocess + 126
1 libobjc.A.dylib 0x3407ec8b objc_exception_throw + 38
2 VideoEditor 0x00293919 RLMGetArray(RLMObjectBase*, unsigned int, NSString*) (RLMRealm_Private.hpp:38)
3 VideoEditor 0x0018a1b4 VideoEditor.RLMProject.setTimeLineModel (VideoEditor.RLMProject)(VideoEditor.TimeLineModel, beginWriteTransaction : Swift.Bool) -> () (RealmModels.swift:147)
4 VideoEditor 0x0025eb9c VideoEditor.VideoEditorAPI.saveProject (VideoEditor.VideoEditorAPI)(Swift.Optional<VideoEditor.IProject>, timeLine : VideoEditor.TimeLineModel, name : Swift.String, filterID : Swift.Int, image : ObjectiveC.UIImage) -> Swift.ImplicitlyUnwrappedOptional<VideoEditor.IProject> (VideoEditorAPI.swift:42)
5 VideoEditor 0x00164754 @objc VideoEditor.ProjectEditorViewController.saveProject (VideoEditor.ProjectEditorViewController)(Swift.ImplicitlyUnwrappedOptional<ObjectiveC.NSNotification>) -> () (ProjectEditorViewController.swift:514)
6 CoreFoundation 0x26105e31 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + …Run Code Online (Sandbox Code Playgroud)