{"action":"created","issue":{"url":"https://api.github.com/repos/TextureGroup/Texture/issues/607","repository_url":"https://api.github.com/repos/TextureGroup/Texture","labels_url":"https://api.github.com/repos/TextureGroup/Texture/issues/607/labels{/name}","comments_url":"https://api.github.com/repos/TextureGroup/Texture/issues/607/comments","events_url":"https://api.github.com/repos/TextureGroup/Texture/issues/607/events","html_url":"https://github.com/TextureGroup/Texture/issues/607","id":263763665,"node_id":"MDU6SXNzdWUyNjM3NjM2NjU=","number":607,"title":"Recent master commit causes crash with ASEditableTextNode inside an ASCellNode","user":{"login":"djblake","id":16973509,"node_id":"MDQ6VXNlcjE2OTczNTA5","avatar_url":"https://avatars2.githubusercontent.com/u/16973509?v=4","gravatar_id":"","url":"https://api.github.com/users/djblake","html_url":"https://github.com/djblake","followers_url":"https://api.github.com/users/djblake/followers","following_url":"https://api.github.com/users/djblake/following{/other_user}","gists_url":"https://api.github.com/users/djblake/gists{/gist_id}","starred_url":"https://api.github.com/users/djblake/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djblake/subscriptions","organizations_url":"https://api.github.com/users/djblake/orgs","repos_url":"https://api.github.com/users/djblake/repos","events_url":"https://api.github.com/users/djblake/events{/privacy}","received_events_url":"https://api.github.com/users/djblake/received_events","type":"User","site_admin":false},"labels":[{"id":595760297,"node_id":"MDU6TGFiZWw1OTU3NjAyOTc=","url":"https://api.github.com/repos/TextureGroup/Texture/labels/Community%20Debugging","name":"Community Debugging","color":"ededed","default":false},{"id":595755112,"node_id":"MDU6TGFiZWw1OTU3NTUxMTI=","url":"https://api.github.com/repos/TextureGroup/Texture/labels/PR%20Open","name":"PR Open","color":"ededed","default":false},{"id":536273097,"node_id":"MDU6TGFiZWw1MzYyNzMwOTc=","url":"https://api.github.com/repos/TextureGroup/Texture/labels/bug","name":"bug","color":"ee0701","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":24,"created_at":"2017-10-09T00:06:42Z","updated_at":"2018-09-14T07:04:35Z","closed_at":"2017-11-06T15:51:48Z","author_association":"CONTRIBUTOR","body":"I am working on the master branch and a recent `pod update` caused my app to start instant crashing at a new main thread assert in the dealloc method of `ASTextKitComponents`, which I noticed was added recently in [the commit here](https://github.com/TextureGroup/Texture/commit/4379b31ac2ffb690845d183742875f312bcb5fdc)\r\n\r\nAfter struggling to find what was causing it for ages, I eventually worked out that it simply seemed to be caused by having an `ASEditableTextNode` as a child of an `ASCellNode` in an `ASCollectionNode`. To confirm this I managed to retro-fit an example Texture project which I created a few weeks ago to demonstrate another issue. I have attached this here:\r\n\r\n[TextureGifMemoryBug ASEditableTextNode Crash.zip](https://github.com/TextureGroup/Texture/files/1367301/TextureGifMemoryBug.ASEditableTextNode.Crash.zip)\r\n\r\nThe project was originally created to demonstrate a memory issue using gifs. As such when you run the project you'll see an `ASCollectionNode` with a lot of gifs. To demonstrate the crash issue discussed above, all you have to do is go into the `GifCellNode` class and unblock the line of code at the top of `layoutSpecThatFits:` that says:\r\n ```\r\nreturn [ASWrapperLayoutSpec wrapperWithLayoutElement:self.editableTextNode];\r\n```\r\nThis will switch the cells to instead use a simple `ASEditableTextNode` created in the `init` method, and as you will see will instantly crash the app on the assert added in the commit noted above.\r\n\r\n@maicki maybe you can help?"},"comment":{"url":"https://api.github.com/repos/TextureGroup/Texture/issues/comments/421252147","html_url":"https://github.com/TextureGroup/Texture/issues/607#issuecomment-421252147","issue_url":"https://api.github.com/repos/TextureGroup/Texture/issues/607","id":421252147,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTI1MjE0Nw==","user":{"login":"abhpan27","id":3840094,"node_id":"MDQ6VXNlcjM4NDAwOTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/3840094?v=4","gravatar_id":"","url":"https://api.github.com/users/abhpan27","html_url":"https://github.com/abhpan27","followers_url":"https://api.github.com/users/abhpan27/followers","following_url":"https://api.github.com/users/abhpan27/following{/other_user}","gists_url":"https://api.github.com/users/abhpan27/gists{/gist_id}","starred_url":"https://api.github.com/users/abhpan27/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abhpan27/subscriptions","organizations_url":"https://api.github.com/users/abhpan27/orgs","repos_url":"https://api.github.com/users/abhpan27/repos","events_url":"https://api.github.com/users/abhpan27/events{/privacy}","received_events_url":"https://api.github.com/users/abhpan27/received_events","type":"User","site_admin":false},"created_at":"2018-09-14T07:04:35Z","updated_at":"2018-09-14T07:04:35Z","author_association":"NONE","body":"We are observing similar crash. \r\nIt is happening if we disable editing of text node in didLoad().\r\n`self.reviewDescriptionScrollableNode.textView.isEditable = false`\r\n\r\nIt is not always reproducible.\r\n\r\n```\r\nFatal Exception: NSInternalInconsistencyException\r\n0  CoreFoundation                 0x1857bed8c __exceptionPreprocess\r\n1  libobjc.A.dylib                0x1849785ec objc_exception_throw\r\n2  CoreFoundation                 0x1857bebf8 +[NSException raise:format:]\r\n3  Foundation                     0x1861af00c -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:]\r\n4  UIFoundation                   0x1904b2adc -[NSLayoutManager(NSPrivate) _resizeTextViewForTextContainer:]\r\n5  UIFoundation                   0x19048bb74 -[NSLayoutManager(NSPrivate) _recalculateUsageForTextContainerAtIndex:]\r\n6  UIFoundation                   0x1904d0c8c _enableTextViewResizing\r\n7  UIFoundation                   0x1904d2978 -[NSLayoutManager textStorage:edited:range:changeInLength:invalidatedRange:]\r\n8  UIFoundation                   0x1904ecdd0 -[NSTextStorage _notifyEdited:range:changeInLength:invalidatedRange:]\r\n9  UIFoundation                   0x190482d5c -[NSTextStorage endEditing]\r\n10 UIKit                          0x18f62fb14 -[UITextView setAttributedText:]\r\n11 AsyncDisplayKit                0x102cb1374 (Missing)\r\n12 Flipkart                       0x101497b60 specialized ProductRatingNode.layoutSpecThatFits(ASSizeRange) -> ASLayoutSpec (ReviewFullScreenImageWidget.swift:464)\r\n13 Flipkart                       0x101495508 @objc ProductRatingNode.layoutSpecThatFits(ASSizeRange) -> ASLayoutSpec (ReviewFullScreenImageWidget.swift)\r\n14 AsyncDisplayKit                0x102ca3f28 -[ASDisplayNode _locked_layoutElementThatFits:]\r\n15 AsyncDisplayKit                0x102ca3acc -[ASDisplayNode calculateLayoutThatFits:]\r\n16 AsyncDisplayKit                0x102ca38f0 -[ASDisplayNode calculateLayoutThatFits:restrictedToSize:relativeToParentSize:]\r\n17 AsyncDisplayKit                0x102c944f8 -[ASDisplayNode(ASLayoutElement) layoutThatFits:parentSize:]\r\n18 AsyncDisplayKit                0x102cde6f8 (Missing)\r\n19 AsyncDisplayKit                0x102cc423c -[ASLayoutSpec calculateLayoutThatFits:restrictedToSize:relativeToParentSize:]\r\n20 AsyncDisplayKit                0x102cc40d8 -[ASLayoutSpec layoutThatFits:parentSize:]\r\n21 AsyncDisplayKit                0x102cd6008 (Missing)\r\n22 AsyncDisplayKit                0x102cc40d8 -[ASLayoutSpec layoutThatFits:parentSize:]\r\n23 AsyncDisplayKit                0x102ca3bac -[ASDisplayNode calculateLayoutThatFits:]\r\n24 AsyncDisplayKit                0x102ca38f0 -[ASDisplayNode calculateLayoutThatFits:restrictedToSize:relativeToParentSize:]\r\n25 AsyncDisplayKit                0x102c9643c (Missing)\r\n26 libdispatch.dylib              0x1850b0aa0 _dispatch_call_block_and_release\r\n27 libdispatch.dylib              0x1850b0a60 _dispatch_client_callout\r\n28 libdispatch.dylib              0x1850b7b84 _dispatch_queue_override_invoke$VARIANT$mp\r\n29 libdispatch.dylib              0x1850bdcac _dispatch_root_queue_drain\r\n30 libdispatch.dylib              0x1850bd9fc _dispatch_worker_thread3\r\n31 libsystem_pthread.dylib        0x1853e3fac _pthread_wqthread\r\n32 libsystem_pthread.dylib        0x1853e3b08 start_wqthread\r\n``` "}}
{"actor":{"display_login":"abhpan27"}}