{"action":"created","issue":{"url":"https://api.github.com/repos/NESTCollaboration/nestpy/issues/11","repository_url":"https://api.github.com/repos/NESTCollaboration/nestpy","labels_url":"https://api.github.com/repos/NESTCollaboration/nestpy/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/NESTCollaboration/nestpy/issues/11/comments","events_url":"https://api.github.com/repos/NESTCollaboration/nestpy/issues/11/events","html_url":"https://github.com/NESTCollaboration/nestpy/issues/11","id":351181351,"node_id":"MDU6SXNzdWUzNTExODEzNTE=","number":11,"title":"Seg Faults when testing NESTCalc(VDetector*) constructor","user":{"login":"infophysics","id":17947575,"node_id":"MDQ6VXNlcjE3OTQ3NTc1","avatar_url":"https://avatars0.githubusercontent.com/u/17947575?v=4","gravatar_id":"","url":"https://api.github.com/users/infophysics","html_url":"https://github.com/infophysics","followers_url":"https://api.github.com/users/infophysics/followers","following_url":"https://api.github.com/users/infophysics/following{/other_user}","gists_url":"https://api.github.com/users/infophysics/gists{/gist_id}","starred_url":"https://api.github.com/users/infophysics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infophysics/subscriptions","organizations_url":"https://api.github.com/users/infophysics/orgs","repos_url":"https://api.github.com/users/infophysics/repos","events_url":"https://api.github.com/users/infophysics/events{/privacy}","received_events_url":"https://api.github.com/users/infophysics/received_events","type":"User","site_admin":false},"labels":[{"id":987433002,"node_id":"MDU6TGFiZWw5ODc0MzMwMDI=","url":"https://api.github.com/repos/NESTCollaboration/nestpy/labels/bug","name":"bug","color":"d73a4a","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-16T12:20:52Z","updated_at":"2018-08-16T12:59:34Z","closed_at":null,"author_association":"COLLABORATOR","body":"The following code crashes with a segmentation fault\r\n\r\n##################################\r\nfrom nestpy import nestpy\r\nimport unittest\r\n\r\nclass NESTcalcTestt(unittest.TestCase):\r\n        def test_nestcalc_const_vdetect(self):\r\n        detec2 = nestpy.VDetector()\r\n        detec2.Initialization()\r\n        nest2 = nestpy.NESTcalc(detec2)\r\n\r\nif __name__ == \"__main__\":\r\n        unittest.main()\r\n##################################\r\n\r\nThe reason seems to be that the deconstructor in NEST.cpp for NESTcalc is also deleting the VDetector object, which causes a crash at the end of the function above.  Commenting that deletion out of NEST.cpp removes the error\r\n"},"comment":{"url":"https://api.github.com/repos/NESTCollaboration/nestpy/issues/comments/413536774","html_url":"https://github.com/NESTCollaboration/nestpy/issues/11#issuecomment-413536774","issue_url":"https://api.github.com/repos/NESTCollaboration/nestpy/issues/11","id":413536774,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzUzNjc3NA==","user":{"login":"infophysics","id":17947575,"node_id":"MDQ6VXNlcjE3OTQ3NTc1","avatar_url":"https://avatars0.githubusercontent.com/u/17947575?v=4","gravatar_id":"","url":"https://api.github.com/users/infophysics","html_url":"https://github.com/infophysics","followers_url":"https://api.github.com/users/infophysics/followers","following_url":"https://api.github.com/users/infophysics/following{/other_user}","gists_url":"https://api.github.com/users/infophysics/gists{/gist_id}","starred_url":"https://api.github.com/users/infophysics/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/infophysics/subscriptions","organizations_url":"https://api.github.com/users/infophysics/orgs","repos_url":"https://api.github.com/users/infophysics/repos","events_url":"https://api.github.com/users/infophysics/events{/privacy}","received_events_url":"https://api.github.com/users/infophysics/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T12:59:34Z","updated_at":"2018-08-16T12:59:34Z","author_association":"COLLABORATOR","body":"adjusted the pybind11 declaration for VDetector to \r\n\r\npy::class_<VDetector, std::unique_ptr<VDetector, py::nodelete>>(m, \"VDetector\")\r\n\r\nwhich no longer causes a segmentation fault in unittest\r\n"}}
{"actor":{"display_login":"infophysics"}}