Code Monkey home page Code Monkey logo

Comments (12)

appleguy avatar appleguy commented on May 29, 2024

@l4u thank you for providing the sample project!! I've tried several things, and am unable to get it to build (the cocoapod configuration appears to be messed up). If you have time to fix it so that a typical pod install call will work, that would be great (I tried having a local checkout of AsyncDisplayKit where the path points to, and still no luck).

I appreciate you reporting this issue. Another alternative would be to copy/paste the stack trace you are seeing and any other console logs.

from asyncdisplaykit.

l4u avatar l4u commented on May 29, 2024

Thanks! I've updated the repo to use a remote git pod spec. Please let me know if it works for you.

from asyncdisplaykit.

l4u avatar l4u commented on May 29, 2024

log: https://gist.github.com/l4u/2556d1c67ac376c14a57

from asyncdisplaykit.

l4u avatar l4u commented on May 29, 2024

It crashes when a kitten image is set on a background thread.

from asyncdisplaykit.

lldong avatar lldong commented on May 29, 2024

@appleguy @l4u I can reproduce on the device (iPhone 4S iOS 8.0.2)

The _imageNode.nodeLoaded property become YES at this line (it should be NO):

https://github.com/facebook/AsyncDisplayKit/blob/master/examples/Kittens/Sample/KittenNode.m#L148

Accessing the nodeLoaded property is not safe here, maybe ASDisplayNode should provide some mechanism to perform a block with this property locked.

from asyncdisplaykit.

lldong avatar lldong commented on May 29, 2024

@l4u with your sample code I also encounter another crash at this line:

'NSInvalidArgumentException', reason: '*** setObjectForKey: object cannot be nil (key: <NSIndexPath: 0x396230> {length = 2, path = 0 - 2})'

https://github.com/facebook/AsyncDisplayKit/blob/c1f7d9f78d721ab5d5fa590f7decb2bc97ec4d62/AsyncDisplayKit/Details/ASRangeController.mm#L539

When you switch pages fast enough, the ViewController is deallocated, but the sizing task is still running and will get a nil _delegate.

from asyncdisplaykit.

l4u avatar l4u commented on May 29, 2024

Yes, sometimes I can see that crash too. Still finding ways to fix this.

from asyncdisplaykit.

appleguy avatar appleguy commented on May 29, 2024

@l4u @lldong, I verified this issue late last week and we have a fix planned (should be landing in the coming week).

Basically, ASImageNode should allow you to set the .image property off the main thread, even after its corresponding view has been created. It's a simple error that it is asserting thread affinity, because it already has locking installed to protect the property during use on multiple threads.

Thanks again for reporting this (and providing the sample project, which I got to work). Apologies for the inconvenience here, and let us know if you have any other questions about the framework!

from asyncdisplaykit.

secretiverhyme avatar secretiverhyme commented on May 29, 2024

@l4u β€” both of these issues should now be fixed. Thanks for the report and sample project!

from asyncdisplaykit.

megakode avatar megakode commented on May 29, 2024

This can still happen. I use ASTableViews inside UICollectionViewCells (i know, bit strange, but optimal in my situation) and if i scroll pretty fast through the collectionview i get this crash consistently.

from asyncdisplaykit.

phatmann avatar phatmann commented on May 29, 2024

@megakode, if you can confirm that this issue is the cause of your crash, we should either re-open this issue or you should file a new one.

from asyncdisplaykit.

secretiverhyme avatar secretiverhyme commented on May 29, 2024

We haven't seen any reports of this particular crash recently, but please do file a new issue if they recur. The thread-affinity API is something we've been wanting to remove for a while, and it's on our radar for AsyncDisplayKit 1.3 β€” subscribe to #134 if you'd like to follow along.

from asyncdisplaykit.

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.