Coder Social home page Coder Social logo

Comments (5)

vinibaggio avatar vinibaggio commented on August 20, 2024

A way to easily reproduce this crash is to force _displayLink to nil on stop animating like so:

- (void)stopAnimating
{
    _displayLink = nil;
    if (self.animatedImage) {
        self.displayLink.paused = YES;
    } else {
        [super stopAnimating];
    }
}

from flanimatedimage.

vinibaggio avatar vinibaggio commented on August 20, 2024

After some research it seems obj_storeWeak is crashing when the object getting assigned is being deallocated. Changing FLWeakProxy's target object storage from weak to assign works, but it's definitely non-optimal, but now it's beyond my Objective-C knowledge in order for me to help more :(

from flanimatedimage.

raphaelschaad avatar raphaelschaad commented on August 20, 2024

-stopAnimating creating displayLink is problematic (it wouldn't _re_create it, as it never gets nil'ed out, but rather would create it the first time -- this could happen when you never started animating it before it goes away) and we have a straight-forward fix for it within the day. Thanks for pointing this issue out! We were never running into this edge-case the way we're using the views.

On your last note, we wouldn't want to lose the properties of a weak reference because switching to assign could lead to dangling pointers. The issue you're seeing is the "weak system" crashing when trying to grab a reference to an object half-way through deallocation. This will be addressed with the fix described above.

Thanks again & stay tuned, just reviewing the fix!

from flanimatedimage.

vinibaggio avatar vinibaggio commented on August 20, 2024

@raphaelschaad Thanks for your timely response! 🎉

from flanimatedimage.

raphaelschaad avatar raphaelschaad commented on August 20, 2024

This got fixed with PR #24 merged to master!

from flanimatedimage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.