Good day everyone.
Have problems with xcode 13 (worst update i've ever seen).
On xcode 12.5.1 all works fine and run with no issues on real devices iOS 14/15. But on xcode 13.0 i faced strange things.
Runing/building on device/TestFlight and getting crash:
Thread 1: EXC_BAD_ACCESS (code=1, address=0x10)
In place where all must be right.
titleLbl.attributedText = nil
All variables are alive and we have access to it in console.
About crash place:
It's view in UICollectionViewCell and code called from prepareForReuse in mainThread.
Everything must be ok. But...
If i comment this line, we'll crash in another place with label and attr string. And etc.
On XC12 all works fine on iOS 14/15. No issues.
Attaching screen and parts of code from trace.
Can anyone help me with this? Please.
Shorted path of call - only main points:
# - 1
override func layoutSubviews() {
reload_fromLayout = true
super.layoutSubviews()
...
}
# - 2
collectionView.dequeueReusableCell(withReuseIdentifier: reuseIdentifier, for: indexPath)
....
# - 3
override func prepareForReuse() {
super.prepareForReuse()
content.prepareForReuse()
}
# - 4 - final crash point
func prepareForReuse() {
storeView.prepareForReuse()
giftView.prepareForReuse()
marker_data = nil
}
# - 5
func prepareForReuse() {
store_data = nil
imageView.image = nil
titleLbl.attributedText = nil
distanceView.prepareForReuse()
}
code-block
5
0
8.1k