Skip to content
This repository has been archived by the owner on Nov 4, 2022. It is now read-only.

Crash in prefetcher #194

Open
paulfreeman opened this issue Dec 2, 2020 · 0 comments
Open

Crash in prefetcher #194

paulfreeman opened this issue Dec 2, 2020 · 0 comments

Comments

@paulfreeman
Copy link

paulfreeman commented Dec 2, 2020

Describe the bug
When scrolling the PhotoView in the demo app the app crashed in the prefetcher call to the onCell prefetch method.

Crash occurred on onCellEvent?(.prefetchForData(data: dataToPrefetch)) in ASSectionDataSource

The call is on the background thread

	func prefetch(_ indexPaths: [IndexPath])
	{
		let dataToPrefetch: [Data] = indexPaths.compactMap
		{
			data[safe: $0.item]
		}
       onCellEvent?(.prefetchForData(data: dataToPrefetch)) 
	}

To Reproduce
Run the demo app, rapidly scroll through photo content until the crash occurs. (I had been testing the memory by going in and out of the AppStore Layout view repeatedly prior to this).

ASCollectionView version
Latest master (1.7)

Xcode Version:
12.1.1

Simulator, Device, Both?
iPhone 12 pro Max, iOS 14.1

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

No branches or pull requests

1 participant