lionheart / openradar-mirror

A mirror of radars pulled from http://openradar.me/.
245 stars 17 forks source link

123453467: The subclass of NSIncrementalStore causes infinite recursion after iOS upgrade #21308

Open openradar-mirror opened 5 years ago

openradar-mirror commented 5 years ago

Description

When calling metadataForPersistentStoreOfType:URL:error: to get metadata for custom NSIncrementalStore, the method causes an infinite loop.

Inside subclass of NSIncrementalStore I have code like this:

It seems that setMetadata: method calls loadMetadata: and it creates an infinite recursion(see screenshots).

https://www.dropbox.com/s/hj2nl3oenm5ycly/app%20crash.png?dl=0 https://www.dropbox.com/s/ze56t153jlvx1lc/Screen%20Shot%202019-08-22%20at%2010.44.40%20AM.png?dl=0

I've noticed it only after upgrade from iOS 13 beta 4 to iOS beta 6. The bug isn't reproducible on older iOS versions and on freshly installed apps.

Apple’s documentation also suggests the same approach at https://developer.apple.com/library/archive/documentation/DataManagement/Conceptual/IncrementalStorePG/ImplementationStrategy/ImplementationStrategy.html#//apple_ref/doc/uid/TP40010706-CH2-SW2

- Product Version: iOS 13 beta 6 Created: 2019-08-22T13:51:27.136470 Originated: 2019-08-15T00:00:00 Open Radar Link: http://www.openradar.me/123453467