{"action":"created","issue":{"url":"https://api.github.com/repos/openscad/openscad/issues/2640","repository_url":"https://api.github.com/repos/openscad/openscad","labels_url":"https://api.github.com/repos/openscad/openscad/issues/2640/labels{/name}","comments_url":"https://api.github.com/repos/openscad/openscad/issues/2640/comments","events_url":"https://api.github.com/repos/openscad/openscad/issues/2640/events","html_url":"https://github.com/openscad/openscad/issues/2640","id":393640962,"node_id":"MDU6SXNzdWUzOTM2NDA5NjI=","number":2640,"title":"Crash with --debug & output redirection","user":{"login":"MichaelAtOz","id":1972961,"node_id":"MDQ6VXNlcjE5NzI5NjE=","avatar_url":"https://avatars3.githubusercontent.com/u/1972961?v=4","gravatar_id":"","url":"https://api.github.com/users/MichaelAtOz","html_url":"https://github.com/MichaelAtOz","followers_url":"https://api.github.com/users/MichaelAtOz/followers","following_url":"https://api.github.com/users/MichaelAtOz/following{/other_user}","gists_url":"https://api.github.com/users/MichaelAtOz/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelAtOz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelAtOz/subscriptions","organizations_url":"https://api.github.com/users/MichaelAtOz/orgs","repos_url":"https://api.github.com/users/MichaelAtOz/repos","events_url":"https://api.github.com/users/MichaelAtOz/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelAtOz/received_events","type":"User","site_admin":false},"labels":[{"id":2528387,"node_id":"MDU6TGFiZWwyNTI4Mzg3","url":"https://api.github.com/repos/openscad/openscad/labels/Crash","name":"Crash","color":"e10c02","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-12-22T04:06:53Z","updated_at":"2018-12-22T06:32:54Z","closed_at":null,"author_association":"MEMBER","body":"`\"C:\\Program Files\\openscad-2018.12.08.ci706\\openscad\" --debug=all cmd-line.scad -o cmd-line.echo > cmd-line.txt`\r\n\r\nRegardless of .scad code, `-debug=all` without redirection, or redirection without `debug=all` works, but both crashes."},"comment":{"url":"https://api.github.com/repos/openscad/openscad/issues/comments/449549615","html_url":"https://github.com/openscad/openscad/issues/2640#issuecomment-449549615","issue_url":"https://api.github.com/repos/openscad/openscad/issues/2640","id":449549615,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0OTU0OTYxNQ==","user":{"login":"MichaelPFrey","id":24962768,"node_id":"MDQ6VXNlcjI0OTYyNzY4","avatar_url":"https://avatars2.githubusercontent.com/u/24962768?v=4","gravatar_id":"","url":"https://api.github.com/users/MichaelPFrey","html_url":"https://github.com/MichaelPFrey","followers_url":"https://api.github.com/users/MichaelPFrey/followers","following_url":"https://api.github.com/users/MichaelPFrey/following{/other_user}","gists_url":"https://api.github.com/users/MichaelPFrey/gists{/gist_id}","starred_url":"https://api.github.com/users/MichaelPFrey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MichaelPFrey/subscriptions","organizations_url":"https://api.github.com/users/MichaelPFrey/orgs","repos_url":"https://api.github.com/users/MichaelPFrey/repos","events_url":"https://api.github.com/users/MichaelPFrey/events{/privacy}","received_events_url":"https://api.github.com/users/MichaelPFrey/received_events","type":"User","site_admin":false},"created_at":"2018-12-22T06:32:54Z","updated_at":"2018-12-22T06:32:54Z","author_association":"MEMBER","body":"https://github.com/openscad/openscad/blob/f2848902e8264f2fd068694741de6aaaec33f452/src/openscad.cc#L352-L354\r\nhttps://github.com/openscad/openscad/blob/f2848902e8264f2fd068694741de6aaaec33f452/src/context.cc#L223-L256\r\n`v.second` has to become `v.second->toEchoString();` which is better:\r\n ```\r\n./openscad --debug=all cmd-line.scad -o cmd-line.echo > cmd-line.txt\r\nDebug on. --debug=all\r\nCamera: Camera()\r\nopenscad: BuiltinContext:\r\nContext: 0x7ffdf53055c0 (0)  document path:   vars:    PI = 3.14159    $vpr = [0, 0, 0]    $fs = 2    $fn = 0    $vpd = 500    $fa = 12    $t = 0    $preview = false    $vpt = [0, 0, 0]\r\n```\r\nnow we add a few new lines:\r\n```\r\n./openscad --debug=all cmd-line.scad -o cmd-line.echo > cmd-line.txt\r\nDebug on. --debug=all\r\nCamera: Camera()\r\nopenscad: BuiltinContext:\r\nContext: 0x7ffc9a68bad0 (0)\r\n  document path: \r\n  vars:    PI = 3.14159\r\n    $vpr = [0, 0, 0]\r\n    $fs = 2\r\n    $fn = 0\r\n    $vpd = 500\r\n    $fa = 12\r\n    $t = 0\r\n    $preview = false\r\n    $vpt = [0, 0, 0]\r\n```\r\nnow I wonder how\r\n```\r\n\t\ts << boost::format(\"Context: %p (%p)\\n\") % this % this->parent;\r\n```\r\nis supposed to work.\r\n\r\nI'll open a Pull request. But please look for other possible causes - I might be working on a separate issue, as I am not certain if I even show a crash."}}
{"actor":{"display_login":"MichaelPFrey"}}