{"action":"created","issue":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1460","repository_url":"https://api.github.com/repos/facebook/AsyncDisplayKit","labels_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1460/labels{/name}","comments_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1460/comments","events_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1460/events","html_url":"https://github.com/facebook/AsyncDisplayKit/issues/1460","id":144602103,"number":1460,"title":"ASRenderingEngineDidDisplayScheduledNodes notification posted, but another ASTableView catches it","user":{"login":"aphylotus","id":670820,"avatar_url":"https://avatars.githubusercontent.com/u/670820?v=3","gravatar_id":"","url":"https://api.github.com/users/aphylotus","html_url":"https://github.com/aphylotus","followers_url":"https://api.github.com/users/aphylotus/followers","following_url":"https://api.github.com/users/aphylotus/following{/other_user}","gists_url":"https://api.github.com/users/aphylotus/gists{/gist_id}","starred_url":"https://api.github.com/users/aphylotus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aphylotus/subscriptions","organizations_url":"https://api.github.com/users/aphylotus/orgs","repos_url":"https://api.github.com/users/aphylotus/repos","events_url":"https://api.github.com/users/aphylotus/events{/privacy}","received_events_url":"https://api.github.com/users/aphylotus/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-30T14:00:23Z","updated_at":"2016-03-30T20:26:02Z","closed_at":null,"body":"Hello,\r\n\r\n  I have a ViewController containing an ASTableView, which is on top of the stack. Working fine. When poping this ViewController, it is not deallocated instantly (later by the autoreleasepool), need to figure out why.\r\n\r\n  But during this, I have the upfront ASTableView, but also still the not-yet dealloacted ASTableView behind. Scrolling will post the ASRenderingEngineDidDisplayScheduledNodes notification to the default NotificationCenter, where then both ViewControllers will catch them.\r\n  One TableView has 1 section, the other more. So sometimes the wrong one gets the wrong amount of sections, which will cause a crash -[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0] in the ASFlowLayoutController findIndexPathAtDistance:fromIndexPath:] + 226.\r\n\r\n  Any ideas ? 2 pop in my mind, add the reference to the table in the notification, so it may check if it is actually the needed receiver. Or a way to cancel the notification listener from the outside?\r\n\r\n  Hope my case it is not too strange\r\n\r\n  Thanks\r\n  Tom"},"comment":{"url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/comments/203617918","html_url":"https://github.com/facebook/AsyncDisplayKit/issues/1460#issuecomment-203617918","issue_url":"https://api.github.com/repos/facebook/AsyncDisplayKit/issues/1460","id":203617918,"user":{"login":"appleguy","id":565251,"avatar_url":"https://avatars.githubusercontent.com/u/565251?v=3","gravatar_id":"","url":"https://api.github.com/users/appleguy","html_url":"https://github.com/appleguy","followers_url":"https://api.github.com/users/appleguy/followers","following_url":"https://api.github.com/users/appleguy/following{/other_user}","gists_url":"https://api.github.com/users/appleguy/gists{/gist_id}","starred_url":"https://api.github.com/users/appleguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/appleguy/subscriptions","organizations_url":"https://api.github.com/users/appleguy/orgs","repos_url":"https://api.github.com/users/appleguy/repos","events_url":"https://api.github.com/users/appleguy/events{/privacy}","received_events_url":"https://api.github.com/users/appleguy/received_events","type":"User","site_admin":false},"created_at":"2016-03-30T20:26:02Z","updated_at":"2016-03-30T20:26:02Z","body":"We definitely need to fix this, and have planned improvements here for a while now.  Thank you for reporting!\n\nCan someone tag Huy for his thoughts on the simplest initial fix?\n\nSent from my iPhone\n\n> On Mar 30, 2016, at 7:00 AM, aphylotus <notifications@github.com> wrote:\n> \n> Hello,\n> \n> I have a ViewController containing an ASTableView, which is on top of the stack. Working fine. When poping this ViewController, it is not deallocated instantly (later by the autoreleasepool), need to figure out why.\n> \n> But during this, I have the upfront ASTableView, but also still the not-yet dealloacted ASTableView behind. Scrolling will post the ASRenderingEngineDidDisplayScheduledNodes notification to the default NotificationCenter, where then both ViewControllers will catch them.\n> One TableView has 1 section, the other more. So sometimes the wrong one gets the wrong amount of sections, which will cause a crash -[__NSArrayM objectAtIndex:]: index 1 beyond bounds [0 .. 0] in the ASFlowLayoutController findIndexPathAtDistance:fromIndexPath:] + 226.\n> \n> Any ideas ? 2 pop in my mind, add the reference to the table in the notification, so it may check if it is actually the needed receiver. Or a way to cancel the notification listener from the outside?\n> \n> Hope my case it is not too strange\n> \n> Thanks\n> Tom\n> \n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly or view it on GitHub\n> \n"}}