Post

Replies

Boosts

Views

Activity

A glitch with retained view controllers on Catalyst
Hello! I discovered a bug on Catalyst about a three years ago but it still seems to be not fixed. My bug report number is FB9705748. The Internet is silent on this so I'm even not sure, perhaps it's only me. So to the problem. When you display UICollectionViewController or UIViewController that contains UICollectionView, interact with the collection view then dismiss the view controller, the displayed view controller isn't released if dismissal is done through navigation bar item. The problem occurs only when the run target is My Mac (Mac Catalyst). Everything is fine when you run on iOS or via My Mac (Designed for iPad). The sample project is uploaded to GitHub. It has a video that shows this strange behavior, see the log for 'deinit' messages. I did have some workaround to fix this but it stops to work, presumable on the new macOS. Also, chances are that it's not only UICollectionView which initiates the glitch, it's just that I only encounter it with collection views.
1
0
192
Sep ’24
UIManagedDocument hangs the main thread
Under certain circumstances UIManagedDocument blocks the main thread: I encountered this with situation when two different external writers in quick succession request coordinated write on the document’s file. After the 1st writer finishes its work, UIManagedDocument starts the revert process, and if at the same time the 2nd writer requests coordinated write, it seems that the coordinator allows the 2nd writer to begin, but then everything hangs: on Main thread UIManagedDocument waits for coordinated read, while the 2nd writer never reaches its writer block. The problem occurs only on iOS, I get it on iPad. I have a sample project, one of the tests result, spindump from the failed test: https://www.dropbox.com/scl/fo/qm40ano3kz15lucjj1zx3/h?rlkey=2029ge5moou7ghaqqnklsp7us&dl=0 Open the project and start the test on iPad (there is only one test: testExternalWrite), the problem may occur inconsistently. I submitted a report in Feedback Assistant like a month ago—no reaction. If somebody has time to take a look and say something, thank you very much!
2
0
615
Aug ’23