CollectionNode icon indicating copy to clipboard operation
CollectionNode copied to clipboard

Update function can randomly cause a crash

Open FlorianML opened this issue 7 years ago • 4 comments

Report a bug

What did you expect to happen?

Swiping across the collection node and the app not crashing.

What actually happened?

Swiping across the collection node crashes. According to Xcode, the crash occurs within the update function of the collection node and the line causing the crash is printed below.

       let distance = -(trueVelocity * time)

What are the steps to reproduce that?

Its occurs when swiping the collection node but its not something that happens every time. Its random. Its happened a few times on my device and other test devices. Like I said, its not always crashing but you may get a random crash here and there.

Environment

Version of:

  • the CollectionNode:

  • Swift: 4

  • iOS: 10.1.1

  • Device: iPhone 6S Plus

  • Xcode:

  • If you use Cocoapods: run pod env | pbcopy and insert here

  • If you use Carthage: run carthage version | pbcopy and insert here

FlorianML avatar Oct 29 '17 16:10 FlorianML

oh, that probably happens if trueVelocity isn't started defined yet, i'll upload a possible fix

bwide avatar Oct 29 '17 17:10 bwide

ok, version 1.1.2 may have fixed the issue (i wasn't able to crash it)

bwide avatar Oct 29 '17 17:10 bwide

Cool thanks!!

FlorianML avatar Oct 29 '17 17:10 FlorianML

This is still an issue with the last master and on the latest devices. It is pretty random, but crashing app on line 71 with "Unexpectedly, found nil while implicitly unwrapping an Optional value: file CollectionNode.swift, line 71.

Looks like it is crashing the app when trying to initialize/re-initialize a view.

Please, re-open, so, people aware about it. If I have a fix for this I'll push it!

Regards,

alexrus123 avatar Oct 27 '19 21:10 alexrus123