{"action":"created","issue":{"url":"https://api.github.com/repos/openscad/openscad/issues/1407","labels_url":"https://api.github.com/repos/openscad/openscad/issues/1407/labels{/name}","comments_url":"https://api.github.com/repos/openscad/openscad/issues/1407/comments","events_url":"https://api.github.com/repos/openscad/openscad/issues/1407/events","html_url":"https://github.com/openscad/openscad/issues/1407","id":99459678,"number":1407,"title":"Recursive module crash","user":{"login":"untaugh","id":2946907,"avatar_url":"https://avatars.githubusercontent.com/u/2946907?v=3","gravatar_id":"","url":"https://api.github.com/users/untaugh","html_url":"https://github.com/untaugh","followers_url":"https://api.github.com/users/untaugh/followers","following_url":"https://api.github.com/users/untaugh/following{/other_user}","gists_url":"https://api.github.com/users/untaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/untaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/untaugh/subscriptions","organizations_url":"https://api.github.com/users/untaugh/orgs","repos_url":"https://api.github.com/users/untaugh/repos","events_url":"https://api.github.com/users/untaugh/events{/privacy}","received_events_url":"https://api.github.com/users/untaugh/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/openscad/openscad/labels/Crash","name":"Crash","color":"e10c02"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-06T15:12:47Z","updated_at":"2015-09-01T22:39:34Z","closed_at":null,"body":"I'm using linux and the following code makes openscad crash for me:\r\n\r\nrec();\r\n\r\nmodule rec(a=1)\r\n{\r\n    rec([a,10,10]);    \r\n}\r\n\r\nI tried many of the older recursion issues, and they were all detected properly, this one is not. \r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/25443257-recursive-module-crash?utm_campaign=plugin&utm_content=tracker%2F52063&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F52063&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/openscad/openscad/issues/comments/136883249","html_url":"https://github.com/openscad/openscad/issues/1407#issuecomment-136883249","issue_url":"https://api.github.com/repos/openscad/openscad/issues/1407","id":136883249,"user":{"login":"kintel","id":186094,"avatar_url":"https://avatars.githubusercontent.com/u/186094?v=3","gravatar_id":"","url":"https://api.github.com/users/kintel","html_url":"https://github.com/kintel","followers_url":"https://api.github.com/users/kintel/followers","following_url":"https://api.github.com/users/kintel/following{/other_user}","gists_url":"https://api.github.com/users/kintel/gists{/gist_id}","starred_url":"https://api.github.com/users/kintel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kintel/subscriptions","organizations_url":"https://api.github.com/users/kintel/orgs","repos_url":"https://api.github.com/users/kintel/repos","events_url":"https://api.github.com/users/kintel/events{/privacy}","received_events_url":"https://api.github.com/users/kintel/received_events","type":"User","site_admin":false},"created_at":"2015-09-01T22:39:34Z","updated_at":"2015-09-01T22:39:34Z","body":"Initial investigation shows that the stack check fails due to a lot of stack being used between our checks.\r\nOne particular crash using the file above used ~370K stack here:\r\nhttps://github.com/openscad/openscad/blob/master/src/expr.cc#L412\r\n\r\nThe culprit appears to be that the std::vector copy constructor for a deep vector of vectors is recursive.\r\nOur vectors are vectors containing boost::variant values."}}