Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

crash with ios 16.4 when build with xcode 14.3 #1576

Open
DrWaleedNour opened this issue Apr 19, 2023 · 10 comments
Open

crash with ios 16.4 when build with xcode 14.3 #1576

DrWaleedNour opened this issue Apr 19, 2023 · 10 comments

Comments

@DrWaleedNour
Copy link

occur crash with in devices have ios version: 16.4, when i build the app with xcode 14.3 , but when i build app with xcode 14.2 the crash disappear
the crash:
__67-[IGListAdapterUpdater performBatchUpdatesWithCollectionViewBlock:]_block_invoke.9

iglistkit version = 4.0.0

@TimOliver
Copy link
Member

Hi @DrWaleedNour! Sorry to hear you're experiencing a crash with IGListKit. Is there an error message that was visible in that crash?

We're working hard towards getting version 5.0 ready. Once I've merged my latest PRs to the codebase, I'll ask you to try the latest copy of IGListKit from the main branch and see if you're still having that issue.

@waleednour
Copy link

Fatal Exception: NSInternalInconsistencyException
0 CoreFoundation 0x119180 __exceptionPreprocess
1 libobjc.A.dylib 0x59f8 objc_exception_throw
2 CoreFoundation 0x3288c +[_CFXNotificationTokenRegistration keyCallbacks]
3 Foundation 0x8ab38 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:]
4 UIKitCore 0x1c6324 -[UICollectionView _endItemAnimationsWithInvalidationContext:tentativelyForReordering:animator:]
5 UIKitCore 0x1cd1b8 -[UICollectionView _endUpdatesWithInvalidationContext:tentativelyForReordering:animator:]
6 UIKitCore 0x1cd4ec -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:animator:]
7 UIKitCore 0x1cd34c -[UICollectionView _performBatchUpdates:completion:invalidationContext:tentativelyForReordering:]
8 UIKitCore 0x1cd2d0 -[UICollectionView _performBatchUpdates:completion:invalidationContext:]
9 UIKitCore 0x1cd20c -[UICollectionView performBatchUpdates:completion:]
10 liaqa 0x218c8a0 __67-[IGListAdapterUpdater performBatchUpdatesWithCollectionViewBlock:]_block_invoke.9 + 250 (IGListAdapterUpdater.m:250)
11 liaqa 0x218c0e4 -[IGListAdapterUpdater performBatchUpdatesWithCollectionViewBlock:] + 272 (IGListAdapterUpdater.m:272)
12 liaqa 0x218d7c4 __60-[IGListAdapterUpdater _queueUpdateWithCollectionViewBlock:]_block_invoke + 434 (IGListAdapterUpdater.m:434)
13 libdispatch.dylib 0x5fa38 _dispatch_call_block_and_release
14 libdispatch.dylib 0x607d4 _dispatch_client_callout
15 libdispatch.dylib 0xe008 _dispatch_main_queue_callback_4CF$VARIANT$mp
16 CoreFoundation 0xaab20 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
17 CoreFoundation 0xa5a58 __CFRunLoopRun
18 CoreFoundation 0xa4fb4 CFRunLoopRunSpecific
19 GraphicsServices 0xa79c GSEventRunModal
20 UIKitCore 0x8bcc38 UIApplicationMain
21 liaqa 0x229d0 main + 245 (AppDelegate.swift:245)
22 libdyld.dylib 0x18e0 start

@baveku
Copy link

baveku commented Apr 25, 2023

When 5.0?

@DrWaleedNour
Copy link
Author

Hi @DrWaleedNour! Sorry to hear you're experiencing a crash with IGListKit. Is there an error message that was visible in that crash?

We're working hard towards getting version 5.0 ready. Once I've merged my latest PRs to the codebase, I'll ask you to try the latest copy of IGListKit from the main branch and see if you're still having that issue.

any update or solution?

@TimOliver
Copy link
Member

@baveku Soon. :)

@DrWaleedNour Did you try with the latest version from the main branch yet?

@DimaVartanian
Copy link
Member

@DrWaleedNour hello! I have a question about your usage of IGListKit. Can you take a look at your usage of performBatchAnimated and similar methods (if perhaps you're calling the equivalent method directly on your collection view), and see if you ever make a model update outside of the update block? I believe you'll need to move any model mutations you might be making into the beginning of the update block and that may fix your issue.

@akuzminskyi
Copy link

I believe it was "fixed" in eb9b18a

@chwo
Copy link

chwo commented Jul 4, 2023

I am experiencing the same crashes with sdk version 4.0.0 since building Xcode 14.3.1. I am happy to see that there is already a fix to catch the crashing exception.

@TimOliver @DimaVartanian
Since your are not releasing minor updates anymore and the next version 5.0.0 update is marked as upcoming for quite some time now, can you please elaborate on what's the best way to integrate this fix?

  • Can you give an ETA on when version 5.0.0 will be released? E.g. more like weeks or months?
  • Do you you consider the main branch stable and ready for production? Do you at Instagram also use the main branch directly to utilize the developments since version 4.0.0?

@tahirmt
Copy link

tahirmt commented Jul 8, 2023

I believe it was "fixed" in eb9b18a

This doesn't seem to fix the actual issue. The app no longer crashes but the invalid updates end up leaving the collection view in a weird state of blank spaces and non-updating cells forever until the app is killed.

@ronaya2001
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants