Post

Replies

Boosts

Views

Activity

Reply to Code 173 no longer triggers receipt generation
This issue started for me today (5/13/22) IMMEDIATELY after Mac Software Update installed Xcode Command Line Tools 13.4. After that ANY MacOS App running in Xcode under does an Exit(173) due to NOT finding any App Store Receipts. I get this message: “x” is damaged and can’t be opened. Delete “x” and download it again from the App Store. I am not sure why it installed 13.4 before Xcode 13.4 is released but that is what update automatically installed. I'm on MacOS 12.3.1 (M1) and running Xcode 13.3.1. I tried rolling back to the 13.3.1 Command line tools but that didn't fix anything. Only way I can run and develop my mac apps now is to comment out the Receipt check. Bug report filed - FB10017618
Topic: App & System Services SubTopic: Core OS Tags:
May ’22
Reply to Crash Writing NSUserDefaults in CompletionBlock of dismissViewController
Thanks for the suggested code, but look at the code posted. It crashes (or that is how it looks while trying to write a value it just read from UserDefaults. Look at the code, it reads some counts stored in NSUserDefaults then does some math all in that method and then crashes while updating and attempting to write the updated counts all of which are in variables local to that method. It is only reading and writing values obtained from userDefaults?
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’22
Reply to Crash Writing NSUserDefaults from applicationDidEnterBackground
I spent quite a while logging items, but here again, I have never actually seen this crash in Xcode or on any device or it would have been easier to find. I had a theory that perhaps the more controller or one of the tabs on it was not nilled out but could never prove it. The thing that is puzzling is that the documentation for applicationDidEnterBackground states that that is the place to do quick things like save state. And that is all this method is doing, it is saving the order of the users tabs and the last one selected so that it can remember it for next time. The symbolicated crash log indicates it crashes on the second to last line of saveAppData, the last call to setObject before the synchronize. Anyway darkPaw, thanks for your ideas. These are all good suggestions and they definitely got me thinking in probably the right direction. I don't know yet if they are the "RIGHT" answer but they are good suggestions.
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’22
Reply to Crash Writing NSUserDefaults from applicationDidEnterBackground
But!! I did find this in the documentation for the tabBarController: In iOS 6 and later, if you assign a value to this view controller’s restorationIdentifier property, it preserves a reference to the view controller in the selected tab. At restore time, it uses the reference to select the tab with the same view controller. My code is older than iOS 6, to give you an idea how long that has been there :)- LOL and I missed the bit about state preservation. Probably I should just let it do it for me and not have my own code for that.
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’22
Reply to Crash Writing NSUserDefaults in CompletionBlock of dismissViewController
***** THIS WAS THE REAL PROBLEM and SOLUTION ***** Moving stuff around helped me find a reliable way to produce the crash in Xcode and catch it in the debugger. Then I was able to consistently see way down in the crash report well after my code that each time it was mentioning an observer of NSUserDefaults. The class where all the above code was being used was registering itself as an observer of NSUserDefaults and also some Notifications. I was removing self as observer of NSNotifications but NOT NSUserDefaults. So after this class was released and attempted to persist values in NSUserDefaults that triggered a notification to it just as it was being release leading to -> CRASH!
Topic: App & System Services SubTopic: Core OS Tags:
Nov ’22
Reply to NSFetchedResultsController use-after-free issues in iOS 16.1
Yup! I am suddenly seeing a lot of crash reports (over 100 in the last couple of days) and ALL from users on iOS 16.1. This is new and nothing in that part of the App changed. Crashing right after the CoreData is initialized and NSPersistentCloudKitContainer is ready. At that point the controller does a fetchRequest for items in the Table and Crash with some kind of memory error. In my case it is simply making a request for items sorted alphabetically?!
Topic: App & System Services SubTopic: Core OS Tags:
Dec ’22
Reply to NSFetchedResultsController use-after-free issues in iOS 16.1
I filed a bug report on this with all the crash logs we are getting in Organizer (FB11875507). And then submitted a TSR for help with a work around. Apples response was that there is no work around and it is there issue. Seeing a lot less crash reports (but still some with the same issue) on iOS 16.2 and now also some from beta users on 16.3, but the numbers are way down and I have been telling customers to upgrade to latest iOS. It helps most.
Topic: App & System Services SubTopic: Core OS Tags:
Jan ’23
Reply to Code 173 no longer triggers receipt generation
This issue started for me today (5/13/22) IMMEDIATELY after Mac Software Update installed Xcode Command Line Tools 13.4. After that ANY MacOS App running in Xcode under does an Exit(173) due to NOT finding any App Store Receipts. I get this message: “x” is damaged and can’t be opened. Delete “x” and download it again from the App Store. I am not sure why it installed 13.4 before Xcode 13.4 is released but that is what update automatically installed. I'm on MacOS 12.3.1 (M1) and running Xcode 13.3.1. I tried rolling back to the 13.3.1 Command line tools but that didn't fix anything. Only way I can run and develop my mac apps now is to comment out the Receipt check. Bug report filed - FB10017618
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to Code 173 no longer triggers receipt generation
Same issue for me. Started immediately after Mac Software Update installed Command Line Tools 13.4. Still running Xcode 13.3.1 and tried rolling back to command tools for 13.3.1. Didn't help :( Apple!!! Dang it
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
May ’22
Reply to Crash Writing NSUserDefaults in CompletionBlock of dismissViewController
Thanks for the suggested code, but look at the code posted. It crashes (or that is how it looks while trying to write a value it just read from UserDefaults. Look at the code, it reads some counts stored in NSUserDefaults then does some math all in that method and then crashes while updating and attempting to write the updated counts all of which are in variables local to that method. It is only reading and writing values obtained from userDefaults?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Crash Writing NSUserDefaults in CompletionBlock of dismissViewController
Ok, I will follow the angle you are suggesting. As for logging it, I have NEVER actually seen this crash on any device or in testing. I have only seen it via Crash Reports in Organizer. Whatever is going on never seems to happen on my devices or where I can catch it in Xcode.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Crash Writing NSUserDefaults from applicationDidEnterBackground
I spent quite a while logging items, but here again, I have never actually seen this crash in Xcode or on any device or it would have been easier to find. I had a theory that perhaps the more controller or one of the tabs on it was not nilled out but could never prove it. The thing that is puzzling is that the documentation for applicationDidEnterBackground states that that is the place to do quick things like save state. And that is all this method is doing, it is saving the order of the users tabs and the last one selected so that it can remember it for next time. The symbolicated crash log indicates it crashes on the second to last line of saveAppData, the last call to setObject before the synchronize. Anyway darkPaw, thanks for your ideas. These are all good suggestions and they definitely got me thinking in probably the right direction. I don't know yet if they are the "RIGHT" answer but they are good suggestions.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Crash Writing NSUserDefaults from applicationDidEnterBackground
But!! I did find this in the documentation for the tabBarController: In iOS 6 and later, if you assign a value to this view controller’s restorationIdentifier property, it preserves a reference to the view controller in the selected tab. At restore time, it uses the reference to select the tab with the same view controller. My code is older than iOS 6, to give you an idea how long that has been there :)- LOL and I missed the bit about state preservation. Probably I should just let it do it for me and not have my own code for that.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Crash Writing NSUserDefaults from applicationDidEnterBackground
Full log now attached.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Crash Writing NSUserDefaults from applicationDidEnterBackground
Full Log 2022-11-15_14-28-39.6056_-0600-7ef0b8eca13f1281b1b0f3186ff46f5a59e728d2.crash
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Crash Writing NSUserDefaults in CompletionBlock of dismissViewController
***** THIS WAS THE REAL PROBLEM and SOLUTION ***** Moving stuff around helped me find a reliable way to produce the crash in Xcode and catch it in the debugger. Then I was able to consistently see way down in the crash report well after my code that each time it was mentioning an observer of NSUserDefaults. The class where all the above code was being used was registering itself as an observer of NSUserDefaults and also some Notifications. I was removing self as observer of NSNotifications but NOT NSUserDefaults. So after this class was released and attempted to persist values in NSUserDefaults that triggered a notification to it just as it was being release leading to -> CRASH!
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to Crash Writing NSUserDefaults from applicationDidEnterBackground
The root cause of this was that a ViewController that was dismissed by the time the application went into the background was still registered as an Observer of NSUserDefaults and when the app saved state that class was called and -> CRASH!
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Nov ’22
Reply to NSFetchedResultsController use-after-free issues in iOS 16.1
Yup! I am suddenly seeing a lot of crash reports (over 100 in the last couple of days) and ALL from users on iOS 16.1. This is new and nothing in that part of the App changed. Crashing right after the CoreData is initialized and NSPersistentCloudKitContainer is ready. At that point the controller does a fetchRequest for items in the Table and Crash with some kind of memory error. In my case it is simply making a request for items sorted alphabetically?!
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Dec ’22
Reply to NSFetchedResultsController use-after-free issues in iOS 16.1
I filed a bug report on this with all the crash logs we are getting in Organizer (FB11875507). And then submitted a TSR for help with a work around. Apples response was that there is no work around and it is there issue. Seeing a lot less crash reports (but still some with the same issue) on iOS 16.2 and now also some from beta users on 16.3, but the numbers are way down and I have been telling customers to upgrade to latest iOS. It helps most.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jan ’23
Reply to NSFetchedResultsController use-after-free issues in iOS 16.1
Issue STILL there in 16.3. APPLE!!!! Get the finger out on this one! This is causing hundreds of crashes and I get support emails every day about this crap. Also related are when the user uses a fetch with predicate and if the initial poster is correct will definitely change the section naming order. :(
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Feb ’23
Reply to NSFetchedResultsController use-after-free issues in iOS 16.1
Issue STILL there in 16.3.1?! Does anyone have anymore information on this and how to resolve it or a workaround?! This is starting to be a real issue for me with bad reviews.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’23
Reply to Xcode - organizer not showing crashes
As of right now Mar. 22, 2023 NO TestFlight build that is crashing is delivering ANY crash reports. I am having to have users email them manually. What is going on APPLE?!
Replies
Boosts
Views
Activity
Mar ’23