Post

Replies

Boosts

Views

Activity

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 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 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 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 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 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
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
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 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 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 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 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