{"action":"opened","issue":{"url":"https://api.github.com/repos/gphoto/libgphoto2/issues/111","repository_url":"https://api.github.com/repos/gphoto/libgphoto2","labels_url":"https://api.github.com/repos/gphoto/libgphoto2/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/gphoto/libgphoto2/issues/111/comments","events_url":"https://api.github.com/repos/gphoto/libgphoto2/issues/111/events","html_url":"https://github.com/gphoto/libgphoto2/issues/111","id":191600115,"number":111,"title":"set-config capturetarget broken on EOS (at least 5Dm4)","user":{"login":"axxel","id":1038346,"avatar_url":"https://avatars.githubusercontent.com/u/1038346?v=3","gravatar_id":"","url":"https://api.github.com/users/axxel","html_url":"https://github.com/axxel","followers_url":"https://api.github.com/users/axxel/followers","following_url":"https://api.github.com/users/axxel/following{/other_user}","gists_url":"https://api.github.com/users/axxel/gists{/gist_id}","starred_url":"https://api.github.com/users/axxel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axxel/subscriptions","organizations_url":"https://api.github.com/users/axxel/orgs","repos_url":"https://api.github.com/users/axxel/repos","events_url":"https://api.github.com/users/axxel/events{/privacy}","received_events_url":"https://api.github.com/users/axxel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-11-24T22:58:27Z","updated_at":"2016-11-24T22:58:27Z","closed_at":null,"body":"Calling _set-config capturetarget_ on an EOS 5Dm4 causes the camera to go into a \"ERR 70\" state where you have to power cycle the body to have it work again. I found the problem but I did find out when this broke. The reason why the canon 'crashes' is, because it gets send a SetDevicePropValueEx ptp command with a property id of 0x0. I have not found out whether this has always been the case or has been introduced somewhere between 2.5.8 (last version I have been working with) and 2.5.11 as I have only access to a 5Dm4 body at the moment.\r\n\r\nThe root cause is a non-meaningful handling of the \"virtual\" capturetarget property. In `_set_config()` the `cursub->putfunc` pointer points to `_put_CaptureTarget()` which sends a proper SetDevicePropValueEx command to the camera and returns GP_OK, which is immediately followed by another `ptp_canon_eos_setdevicepropvalue` call inside `_set_config()`, only this time the propid is the \"virtual\" id 0x0. This makes no sense. It only gets through the check for valid _canon_props_ inside `ptp_canon_eos_setdevicepropvalue` because the canon did indeed enumerate a property with id 0x0 (for whatever reason):\r\n\r\n`0.192452 ptp                         (2): event 88: EOS prop 0000 info record, datasize is 16`\r\n\r\nThe question is: where is the most appropriate place to make sure this \"virtual\" propid gets not send to the camera and why has this worked before (at least with other canon bodies)."}}
{"actor":{"display_login":"axxel"}}