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

Crashes on load frequently #86

Open
joshwolff1 opened this issue Feb 11, 2020 · 0 comments
Open

Crashes on load frequently #86

joshwolff1 opened this issue Feb 11, 2020 · 0 comments

Comments

@joshwolff1
Copy link

joshwolff1 commented Feb 11, 2020

Thank you for the awesome pod!

Unfortunatley, I am unable to use it because it frequently crashes here:

#8 0x00000001063bbaa0 in closure #1 in OGDataProvider.fetchOGData(urlString:completion:) at .../Pods/URLEmbeddedView/URLEmbeddedView/Core/Cache/Data/OGDataProvider.swift:58

The main error I get is "Thread 1: EXC_BAD_ACCESS (code=1, address=0x8)" but XCode does not point to a particular line of code. This did not happen before using the pod, but it does now, and it always occurs during the same closure above.

I am loading one URLEmbeddedView per cell in a tableview with several cells, and usually a different link for each view. I am loading the View in cellForRowAt

The only code I am using is:

cell.embeddedLinkView.load(urlString: post._pub._link)
cell.embeddedLinkView.didTapHandler = { [weak self] _, url in
guard let self = self else { return }
....
}

in the cell:

let embeddedLinkView = URLEmbeddedView()
....

self.embeddedLinkView.translatesAutoresizingMaskIntoConstraints = false
self.embeddedLinkView.height(constant: 100)
self.embeddedLinkView.width(constant: self.frame.width)
myStack.addArrangedSubview(self.embeddedLinkView)
....

self.embeddedLinkView.isHidden = !self.data._pub.linkExists()
self.embeddedLinkView.textProvider[.title].fontColor = UIColor.lightGray
self.embeddedLinkView.textProvider[.description].fontColor = UIColor.lightGray
self.embeddedLinkView.textProvider[.domain].fontColor = UIColor.lightGray.withAlphaComponent(0.7)
self.embeddedLinkView.textProvider[.noDataTitle].fontColor = UIColor.lightGray.withAlphaComponent(0.6)

@joshwolff1 joshwolff1 changed the title Crashes on fetch a lot Crashes on load frequently Feb 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant