Posts

Post not yet marked as solved
6 Replies
1.5k Views
The CoreData stack initialization is freeze at the function call -[NSPersistentStoreCoordinator addPersistentStoreWithType:configuration:URL:options:error:]. It doesn't return any errors. The CoreData debug logs console shows: CoreData: annotation: Core Data multi-threading assertions enabled. CoreData: annotation: Connecting to sqlite database file at "/var/mobile/Containers/Data/Application/1B4CD169-5CCB-4949-B8B2-943A8EDC7478/Documents/myDB.sqlite" CoreData: sql: SELECT TBL_NAME FROM SQLITE_MASTER WHERE TBL_NAME = 'Z_METADATA' 2023-02-28 16:29:37.357278-0800 AppName[1016:183178] [BackgroundTask] Background Task 8 ("CoreData: Adding persistent store"), was created over 30 seconds ago. In applications running in the background, this creates a risk of termination. Remember to call UIApplication.endBackgroundTask(_:) for your task in a timely manner to avoid this. CoreData: error: Unexpected background task assertion cancellation. 2023-02-28 16:30:35.668186-0800 AppName[1016:183178] [BackgroundTask] Background task still not ended after expiration handlers were called: <_UIBackgroundTaskInfo: 0x28258fec0>: taskID = 8, taskName = CoreData: Adding persistent store, creationTime = 16118 (elapsed = 753). This app will likely be terminated by the system. Call UIApplication.endBackgroundTask(_:) to avoid this. It repeats multiple times the same log: 2023-02-28 16:30:01.186448-0800 AppName[1016:183461] [GEOXPC] Throttled "PlaceRequest.REQUEST_TYPE_REVERSE_GEOCODING" request: Tried to make more than 50 requests in 60 seconds, will reset in 1 seconds - Error Domain=GEOErrorDomain Code=-3 "(null)" UserInfo={details=( { intervalType = short; maxRequests = 50; "throttler.keyPath" = "app:com.company.myApp/0x20304/short(default/any)"; timeUntilReset = 1; windowSize = 60; } ), requestKindString=PlaceRequest.REQUEST_TYPE_REVERSE_GEOCODING, timeUntilReset=1, requestKind=772} The DB is populated with 11 MB size data, is created by iOS app, is opened after app version upgraded. The new app version has new DB module version with basic data migration (removed 3 tables, changed data type with entity mapping). It happens rare with a released app. I cannot reproduce it in the Xcode debug or released app. No crash reports. The exported DB sqlite file is opened successfully with the SQLite editors and all module updates are applied successful. If it's imported to another iOS device then the app works well and can read data. Something happens on this iPad and after app reinstall it works. Why CoreData init freeze on Z_METADATA query? Possible the table is corrupted. How I can verify it for any issues? Why Background Task 8 is created? The func is called on the background thread. Possible migration process creates a Background Task. What GEOXPC log means?
Posted Last updated
.
Post marked as solved
3 Replies
1.1k Views
Hi there, My app has a strange crash in the [MyView myViewNameForUsername:] function. I put logs in this function to print the 'Username' value but no logs. It looks the function crashes early. Please explain what the zero line (MyView.m:0) means in in the crash report generated by the Objective-C code: Incident Identifier: B36765F0-9E9F-4FD1-9BE5-2932AC2C93C5 CrashReporter Key: 0000000000000000000000000000000000000000 Hardware Model: iPad11,7 Process: APP_Name [2003] Identifier: com.app.id Version: 10.2.0 Code Type: arm64e Date/Time: 2021-04-26T09:41:23-07:00 Launch Time: 2021-04-26T09:41:23-07:00 OS Version: iOS 14.4.2 (18D70) Report Version: 105 Exception Type: NSInvalidArgumentException Exception Subtype: -[_NSInlineData stringByAppendingString:]: unrecognized selector sent to instance 0x282fd90e0 Thread 0 name: Thread 0 Crashed: 0 CoreFoundation 0x000000019bcf686c __exceptionPreprocess (CoreFoundation) 1 libobjc.A.dylib 0x00000001b0d0fc50 objc_exception_throw (libobjc.A.dylib) 2 CoreFoundation 0x000000019bbfd95c -[NSOrderedSet initWithSet:copyItems:] (CoreFoundation) 3 CoreFoundation 0x000000019bcf9438 ___forwarding___ (CoreFoundation) 4 CoreFoundation 0x000000019bcfb740 _CF_forwarding_prep_0 (CoreFoundation) 5 APP_Name 0x0000000104e9c270 +[MyView myViewNameForUsername:] (MyView.m:0) 6 APP_Name 0x000000010510ea54 -[MyViewRequestModel initWithUserName:tableView:delegate:] (MyViewRequestModel.m:0) 7 APP_Name 0x000000010515c024 -[ItemsManagerModel init] (ItemsManagerModel.m:84) 8 APP_Name 0x00000001050f43c0 -[ItemsViewController init] (ItemsViewController.m:40) 9 APP_Name 0x0000000104f3dfb0 -[AppNameNavigationController loadItems] (AppNameNavigationController.m:476) 10 CoreFoundation 0x000000019bc539a0 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ (CoreFoundation) 11 CoreFoundation 0x000000019bc53948 ___CFXRegistrationPost_block_invoke (CoreFoundation) 12 CoreFoundation 0x000000019bc52eb0 _CFXRegistrationPost (CoreFoundation) 13 CoreFoundation 0x000000019bc52870 _CFXNotificationPost (CoreFoundation) 14 APP_Name 0x0000000104e3fcb8 -[MyEvent postObject:forName:] (MyEventWrapper.m:43) 15 APP_Name 0x0000000105186b24 -[HomeScreenButtonGridModel cellPressed:] (HomeScreenButtonGridModel.m:215) 16 APP_Name 0x00000001052da9a4 -[HomeScreenCollectionViewCell buttonTapped:] (HomeScreenCollectionViewCell.m:24) 17 UIKitCore 0x000000019e6b2e78 -[UIApplication sendAction:to:from:forEvent:] (UIKitCore) 18 UIKitCore 0x000000019dfe9ef0 -[UIControl sendAction:to:forEvent:] (UIKitCore) 19 UIKitCore 0x000000019dfea244 -[UIControl _sendActionsForEvents:withEvent:] (UIKitCore) 20 UIKitCore 0x000000019dfe8aa8 -[UIControl touchesEnded:withEvent:] (UIKitCore) 21 UIKitCore 0x000000019e1ec84c _UIGestureEnvironmentUpdate (UIKitCore) 22 UIKitCore 0x000000019e1ea9e0 -[UIGestureEnvironment _updateForEvent:window:] (UIKitCore) 23 UIKitCore 0x000000019e6f2e30 -[UIWindow sendEvent:] (UIKitCore) 24 UIKitCore 0x000000019e6cc1d4 -[UIApplication sendEvent:] (UIKitCore) 25 UIKitCore 0x000000019e7560ec __dispatchPreprocessedEventFromEventQueue (UIKitCore) 26 UIKitCore 0x000000019e7590a4 __processEventQueue (UIKitCore) 27 UIKitCore 0x000000019e750550 __eventFetcherSourceCallback (UIKitCore) 28 CoreFoundation 0x000000019bc7276c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ (CoreFoundation) 29 CoreFoundation 0x000000019bc72668 __CFRunLoopDoSource0 (CoreFoundation) 30 CoreFoundation 0x000000019bc71960 __CFRunLoopDoSources0 (CoreFoundation) 31 CoreFoundation 0x000000019bc6ba8c __CFRunLoopRun (CoreFoundation) 32 CoreFoundation 0x000000019bc6b21c CFRunLoopRunSpecific (CoreFoundation) 33 GraphicsServices 0x00000001b3835784 GSEventRunModal (GraphicsServices) 34 UIKitCore 0x000000019e6abee8 -[UIApplication _run] (UIKitCore) 35 UIKitCore 0x000000019e6b175c UIApplicationMain (UIKitCore) 36 APP_Name 0x0000000104d16718 main (main.m:17) 37 libdyld.dylib 0x000000019b92b6b0 start (libdyld.dylib)
Posted Last updated
.