{"action":"created","issue":{"url":"https://api.github.com/repos/google/fruit/issues/67","repository_url":"https://api.github.com/repos/google/fruit","labels_url":"https://api.github.com/repos/google/fruit/issues/67/labels{/name}","comments_url":"https://api.github.com/repos/google/fruit/issues/67/comments","events_url":"https://api.github.com/repos/google/fruit/issues/67/events","html_url":"https://github.com/google/fruit/issues/67","id":343950369,"node_id":"MDU6SXNzdWUzNDM5NTAzNjk=","number":67,"title":"Crash when moving PartialComponent to Component","user":{"login":"krojew","id":1268573,"node_id":"MDQ6VXNlcjEyNjg1NzM=","avatar_url":"https://avatars2.githubusercontent.com/u/1268573?v=4","gravatar_id":"","url":"https://api.github.com/users/krojew","html_url":"https://github.com/krojew","followers_url":"https://api.github.com/users/krojew/followers","following_url":"https://api.github.com/users/krojew/following{/other_user}","gists_url":"https://api.github.com/users/krojew/gists{/gist_id}","starred_url":"https://api.github.com/users/krojew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krojew/subscriptions","organizations_url":"https://api.github.com/users/krojew/orgs","repos_url":"https://api.github.com/users/krojew/repos","events_url":"https://api.github.com/users/krojew/events{/privacy}","received_events_url":"https://api.github.com/users/krojew/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-24T09:11:57Z","updated_at":"2018-07-24T11:40:08Z","closed_at":null,"author_association":"NONE","body":"EDIT: The description was revised due to further investigation.\r\n\r\nfruit requires the whole ParialComponent chain to be alive until the creation of an actual component. Due to PartialComponent being movable, yet keeping a reference to component store from a previous PartialComponent, we can easily achieve a scenario when code passing around partial components by value builds without any warning and crashes at runtime."},"comment":{"url":"https://api.github.com/repos/google/fruit/issues/comments/407375894","html_url":"https://github.com/google/fruit/issues/67#issuecomment-407375894","issue_url":"https://api.github.com/repos/google/fruit/issues/67","id":407375894,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzM3NTg5NA==","user":{"login":"poletti-marco","id":1547799,"node_id":"MDQ6VXNlcjE1NDc3OTk=","avatar_url":"https://avatars1.githubusercontent.com/u/1547799?v=4","gravatar_id":"","url":"https://api.github.com/users/poletti-marco","html_url":"https://github.com/poletti-marco","followers_url":"https://api.github.com/users/poletti-marco/followers","following_url":"https://api.github.com/users/poletti-marco/following{/other_user}","gists_url":"https://api.github.com/users/poletti-marco/gists{/gist_id}","starred_url":"https://api.github.com/users/poletti-marco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/poletti-marco/subscriptions","organizations_url":"https://api.github.com/users/poletti-marco/orgs","repos_url":"https://api.github.com/users/poletti-marco/repos","events_url":"https://api.github.com/users/poletti-marco/events{/privacy}","received_events_url":"https://api.github.com/users/poletti-marco/received_events","type":"User","site_admin":false},"created_at":"2018-07-24T11:40:08Z","updated_at":"2018-07-24T11:40:08Z","author_association":"CONTRIBUTOR","body":"Hi, yes, this is expected (but I understand that it might be surprising).\nYou should not create variables with type PartialComponent.\n\nSee the comment on PartialComponent here:\nhttps://github.com/google/fruit/blob/master/include/fruit/component.h\n\n\n\"Client code should never write `PartialComponent'; always start the\nconstruction of a component with\nfruit::createComponent(), and end it by casting the PartialComponent to the\ndesired Component (often done implicitly\nby returning a PartialComponent from a function that has Component<...> as\nthe return type).\n[...]\nNote that no variable of type PartialComponent has been declared; this\nclass should only be used for temporary\nvalues.\"\n\nOn Tue, 24 Jul 2018, 10:55 Kamil Rojewski, <notifications@github.com> wrote:\n\n> After some digging it looks to be related to moving - PartialComponent is\n> movable and moves its storage, which then simply keeps the reference to\n> previous storage which is about to expire, thus causing undefined\n> behavior.\n>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/google/fruit/issues/67#issuecomment-407350280>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/ABeeF_4c85IJ6uoeIInveU9R0kUvwyM9ks5uJu8RgaJpZM4VcXcy>\n> .\n>\n"}}
{"actor":{"display_login":"poletti-marco"}}