{"action":"created","issue":{"url":"https://api.github.com/repos/Itseez/opencv/issues/3844","labels_url":"https://api.github.com/repos/Itseez/opencv/issues/3844/labels{/name}","comments_url":"https://api.github.com/repos/Itseez/opencv/issues/3844/comments","events_url":"https://api.github.com/repos/Itseez/opencv/issues/3844/events","html_url":"https://github.com/Itseez/opencv/pull/3844","id":62780415,"number":3844,"title":"Update load() to fix problem with bad/missing file","user":{"login":"franzcode","id":11543520,"avatar_url":"https://avatars.githubusercontent.com/u/11543520?v=3","gravatar_id":"","url":"https://api.github.com/users/franzcode","html_url":"https://github.com/franzcode","followers_url":"https://api.github.com/users/franzcode/followers","following_url":"https://api.github.com/users/franzcode/following{/other_user}","gists_url":"https://api.github.com/users/franzcode/gists{/gist_id}","starred_url":"https://api.github.com/users/franzcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franzcode/subscriptions","organizations_url":"https://api.github.com/users/franzcode/orgs","repos_url":"https://api.github.com/users/franzcode/repos","events_url":"https://api.github.com/users/franzcode/events{/privacy}","received_events_url":"https://api.github.com/users/franzcode/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"vpisarev","id":2110786,"avatar_url":"https://avatars.githubusercontent.com/u/2110786?v=3","gravatar_id":"","url":"https://api.github.com/users/vpisarev","html_url":"https://github.com/vpisarev","followers_url":"https://api.github.com/users/vpisarev/followers","following_url":"https://api.github.com/users/vpisarev/following{/other_user}","gists_url":"https://api.github.com/users/vpisarev/gists{/gist_id}","starred_url":"https://api.github.com/users/vpisarev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vpisarev/subscriptions","organizations_url":"https://api.github.com/users/vpisarev/orgs","repos_url":"https://api.github.com/users/vpisarev/repos","events_url":"https://api.github.com/users/vpisarev/events{/privacy}","received_events_url":"https://api.github.com/users/vpisarev/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-03-18T19:38:05Z","updated_at":"2015-03-19T13:45:04Z","closed_at":"2015-03-19T12:13:47Z","pull_request":{"url":"https://api.github.com/repos/Itseez/opencv/pulls/3844","html_url":"https://github.com/Itseez/opencv/pull/3844","diff_url":"https://github.com/Itseez/opencv/pull/3844.diff","patch_url":"https://github.com/Itseez/opencv/pull/3844.patch"},"body":" If a file was missing or unreadable due to permissions, CvStatModel::load() would __EXIT__ the function without reporting an error. Copied CV_ERROR() from CvStatModel::save()\r\n\r\nWithout this fix, using load() with CvANN_MLP or other CvStatModel, no error is returned if a file is unreadable, and your program will continue and then perform unexpectedly. This matches the behavior of the save() function in such a situation."},"comment":{"url":"https://api.github.com/repos/Itseez/opencv/issues/comments/83587066","html_url":"https://github.com/Itseez/opencv/pull/3844#issuecomment-83587066","issue_url":"https://api.github.com/repos/Itseez/opencv/issues/3844","id":83587066,"user":{"login":"franzcode","id":11543520,"avatar_url":"https://avatars.githubusercontent.com/u/11543520?v=3","gravatar_id":"","url":"https://api.github.com/users/franzcode","html_url":"https://github.com/franzcode","followers_url":"https://api.github.com/users/franzcode/followers","following_url":"https://api.github.com/users/franzcode/following{/other_user}","gists_url":"https://api.github.com/users/franzcode/gists{/gist_id}","starred_url":"https://api.github.com/users/franzcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franzcode/subscriptions","organizations_url":"https://api.github.com/users/franzcode/orgs","repos_url":"https://api.github.com/users/franzcode/repos","events_url":"https://api.github.com/users/franzcode/events{/privacy}","received_events_url":"https://api.github.com/users/franzcode/received_events","type":"User","site_admin":false},"created_at":"2015-03-19T13:45:04Z","updated_at":"2015-03-19T13:45:04Z","body":"  I have worked around this problem in  our project,  but am surprised by\nthis response.\nI can appreciate the viewpoint but respectfuly disagree with the\ndescision.  I find it odd/distateful that save has different  behaivor -\nthe mismatch feels wrong to me and counter intuitive.  The silent load\nfailures cause mlp code to run amok,  so it made sense to me to change it.\nIn the case if a missing file or path problem,  the user is left with a\nrunning program that returns bad results or crashes,  but later in\nexecution than expected - and the problem is difficult to troubleshoot. If\nsave behaved the same I would not care,  but the mismatch will never sit\nwell with me, just as silent errors will (which is never a best practice\nimho)\nOn Mar 19, 2015 8:14 AM, \"Vadim Pisarevsky\" <notifications@github.com>\nwrote:\n\n> Closed #3844 <https://github.com/Itseez/opencv/pull/3844>.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/Itseez/opencv/pull/3844#event-259302392>.\n>\n"}}