{"action":"created","issue":{"url":"https://api.github.com/repos/looooo/pivy/issues/8","repository_url":"https://api.github.com/repos/looooo/pivy","labels_url":"https://api.github.com/repos/looooo/pivy/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/looooo/pivy/issues/8/comments","events_url":"https://api.github.com/repos/looooo/pivy/issues/8/events","html_url":"https://github.com/looooo/pivy/issues/8","id":220555512,"number":8,"title":"Sensor callback (threading) still crashes with 64-bit Python3 on 64-bit Windows despite fix","user":{"login":"InventorMentor","id":26519368,"avatar_url":"https://avatars2.githubusercontent.com/u/26519368?v=3","gravatar_id":"","url":"https://api.github.com/users/InventorMentor","html_url":"https://github.com/InventorMentor","followers_url":"https://api.github.com/users/InventorMentor/followers","following_url":"https://api.github.com/users/InventorMentor/following{/other_user}","gists_url":"https://api.github.com/users/InventorMentor/gists{/gist_id}","starred_url":"https://api.github.com/users/InventorMentor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/InventorMentor/subscriptions","organizations_url":"https://api.github.com/users/InventorMentor/orgs","repos_url":"https://api.github.com/users/InventorMentor/repos","events_url":"https://api.github.com/users/InventorMentor/events{/privacy}","received_events_url":"https://api.github.com/users/InventorMentor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-04-10T07:09:28Z","updated_at":"2017-04-10T10:16:10Z","closed_at":null,"body":"Issue: Sensor callback still crashes for me using 64-bit Python3 on 64-bit Microsoft Windows\r\n\r\nScenario: despite using the fixes in branch \"threads\", the sensor callback problem still occurs using the following two configurations:\r\n- Python 3.6.1 (x64), Windows 10 (64-bit), MSVC14 \r\n- Python 3.4.4 (x64), Windows 7 (64-bit), MSVC10\r\n\r\nThe test cases used where the following two Inventor Mentor examples:\r\n- 12.1.FieldSensor.py bird.iv  (crash occurs when attempting to drag the bird)\r\n- 12.3.AlarmSensor.py  (crash occurs after 12 secs when the asynchronous C++ callback is triggered)\r\n\r\nRequest: Could you please re-test the sensor callback threading fix also on a 64-bit Python3 configuration on a 64-bit Windows system and confirm that the current fix is working for you.\r\n\r\nMany thanks in advance! Best wishes, Peter"},"comment":{"url":"https://api.github.com/repos/looooo/pivy/issues/comments/292908290","html_url":"https://github.com/looooo/pivy/issues/8#issuecomment-292908290","issue_url":"https://api.github.com/repos/looooo/pivy/issues/8","id":292908290,"user":{"login":"InventorMentor","id":26519368,"avatar_url":"https://avatars2.githubusercontent.com/u/26519368?v=3","gravatar_id":"","url":"https://api.github.com/users/InventorMentor","html_url":"https://github.com/InventorMentor","followers_url":"https://api.github.com/users/InventorMentor/followers","following_url":"https://api.github.com/users/InventorMentor/following{/other_user}","gists_url":"https://api.github.com/users/InventorMentor/gists{/gist_id}","starred_url":"https://api.github.com/users/InventorMentor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/InventorMentor/subscriptions","organizations_url":"https://api.github.com/users/InventorMentor/orgs","repos_url":"https://api.github.com/users/InventorMentor/repos","events_url":"https://api.github.com/users/InventorMentor/events{/privacy}","received_events_url":"https://api.github.com/users/InventorMentor/received_events","type":"User","site_admin":false},"created_at":"2017-04-10T10:16:10Z","updated_at":"2017-04-10T10:16:10Z","body":"Many thanks for your confirmation on linux64 -python3.5 (conda). Here, I'm refering to \r\ncommit 4e0fb106442ee4459f44afa6b2e2c67fa153d364\r\n\r\nHowever, without this fix in branch \"threads\" referenced above,\r\nI can also confirm that 12.3.AlarmSensor.py works fine without\r\napplying the threading fix on a 32-bit Debian 7 system (3.2.86-1 i686 GNU/Linux)\r\njust with the following default Coin/Pivy packages installed from Debian repositories:\r\n- Python 2.7.3 (32-bit)\r\n- Coin3D 3.1.3-2.2\r\n- Pivy 0.5.0~v609hg-1\r\n\r\nMy issues are on both 64-Bit Windows 7 and 10, where I've used swigwin-3.0.11 to build the current \"threads\" branch of Pivy 0.6.0 (commit referenced above) employing\r\n- Python 3.6.1 (64-bit)\r\n- Coin 4.0.0a\r\n- Quarter 1.0.0\r\n\r\nIn Pivy's setup.py modified in the \"threads\" branch, I've found that if I leave the \"-threads\" option in SWIG_PARAMS list, none of the Inventor Mentor examples is going to work for me and if I remove it from SWIG_PARAMS all Ithisnventor Mentor examples run fine on 64-Bit Windows 7/10 without those in chapter 12 (employing sensor callbacks). I also found that within file coin_wrap.cpp generated by SWIG 3.0.11 there is no call PyEval_InitThreads() if the \"-threads\" option is removed from SWIG_PARAMS. My manual attempts to insert it in coin_wrap.cpp after module creation / initialization were without success regarding the sensor examples in chapter 12. The GIL seems not to be properly initialized. I tried to follow the suggestion in\r\n\r\nhttp://stackoverflow.com/questions/16606872/calling-python-method-from-c-or-c-callback\r\n\r\nas given at\r\n\r\nhttp://stackoverflow.com/a/16609899"}}
{"actor":{"display_login":"InventorMentor"}}