{"action":"created","issue":{"url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/4748","repository_url":"https://api.github.com/repos/Beep6581/RawTherapee","labels_url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/4748/labels{/name}","comments_url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/4748/comments","events_url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/4748/events","html_url":"https://github.com/Beep6581/RawTherapee/issues/4748","id":353993367,"node_id":"MDU6SXNzdWUzNTM5OTMzNjc=","number":4748,"title":"Hasselblad H4D-40 file loads unusually slow","user":{"login":"Thanatomanic","id":6567747,"node_id":"MDQ6VXNlcjY1Njc3NDc=","avatar_url":"https://avatars3.githubusercontent.com/u/6567747?v=4","gravatar_id":"","url":"https://api.github.com/users/Thanatomanic","html_url":"https://github.com/Thanatomanic","followers_url":"https://api.github.com/users/Thanatomanic/followers","following_url":"https://api.github.com/users/Thanatomanic/following{/other_user}","gists_url":"https://api.github.com/users/Thanatomanic/gists{/gist_id}","starred_url":"https://api.github.com/users/Thanatomanic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Thanatomanic/subscriptions","organizations_url":"https://api.github.com/users/Thanatomanic/orgs","repos_url":"https://api.github.com/users/Thanatomanic/repos","events_url":"https://api.github.com/users/Thanatomanic/events{/privacy}","received_events_url":"https://api.github.com/users/Thanatomanic/received_events","type":"User","site_admin":false},"labels":[{"id":246558290,"node_id":"MDU6TGFiZWwyNDY1NTgyOTA=","url":"https://api.github.com/repos/Beep6581/RawTherapee/labels/bug","name":"bug","color":"fc2929","default":true},{"id":281779740,"node_id":"MDU6TGFiZWwyODE3Nzk3NDA=","url":"https://api.github.com/repos/Beep6581/RawTherapee/labels/patch%20provided","name":"patch provided","color":"5319e7","default":false},{"id":246584591,"node_id":"MDU6TGFiZWwyNDY1ODQ1OTE=","url":"https://api.github.com/repos/Beep6581/RawTherapee/labels/performance","name":"performance","color":"ffff00","default":false},{"id":293920805,"node_id":"MDU6TGFiZWwyOTM5MjA4MDU=","url":"https://api.github.com/repos/Beep6581/RawTherapee/labels/raw","name":"raw","color":"009800","default":false}],"state":"open","locked":false,"assignee":{"login":"heckflosse","id":13733487,"node_id":"MDQ6VXNlcjEzNzMzNDg3","avatar_url":"https://avatars3.githubusercontent.com/u/13733487?v=4","gravatar_id":"","url":"https://api.github.com/users/heckflosse","html_url":"https://github.com/heckflosse","followers_url":"https://api.github.com/users/heckflosse/followers","following_url":"https://api.github.com/users/heckflosse/following{/other_user}","gists_url":"https://api.github.com/users/heckflosse/gists{/gist_id}","starred_url":"https://api.github.com/users/heckflosse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heckflosse/subscriptions","organizations_url":"https://api.github.com/users/heckflosse/orgs","repos_url":"https://api.github.com/users/heckflosse/repos","events_url":"https://api.github.com/users/heckflosse/events{/privacy}","received_events_url":"https://api.github.com/users/heckflosse/received_events","type":"User","site_admin":false},"assignees":[{"login":"heckflosse","id":13733487,"node_id":"MDQ6VXNlcjEzNzMzNDg3","avatar_url":"https://avatars3.githubusercontent.com/u/13733487?v=4","gravatar_id":"","url":"https://api.github.com/users/heckflosse","html_url":"https://github.com/heckflosse","followers_url":"https://api.github.com/users/heckflosse/followers","following_url":"https://api.github.com/users/heckflosse/following{/other_user}","gists_url":"https://api.github.com/users/heckflosse/gists{/gist_id}","starred_url":"https://api.github.com/users/heckflosse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heckflosse/subscriptions","organizations_url":"https://api.github.com/users/heckflosse/orgs","repos_url":"https://api.github.com/users/heckflosse/repos","events_url":"https://api.github.com/users/heckflosse/events{/privacy}","received_events_url":"https://api.github.com/users/heckflosse/received_events","type":"User","site_admin":false}],"milestone":null,"comments":4,"created_at":"2018-08-25T07:58:20Z","updated_at":"2018-08-25T08:42:51Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I was just playing around with some files of different make and origin from raw.pixls.us, when I tried to open this one: https://raw.pixls.us/getfile.php/2425/nice/Hasselblad%20-%20Hasselblad%20H6D-100cMS%20-%2016bit%20(4:3).fff (105.6 MP)\r\nand this one: https://raw.pixls.us/getfile.php/931/nice/Hasselblad%20-%20Hasselblad%20H4D-40%20-%2016bit%20(4:3).fff (40.2 MP)\r\nThe former file loads in roughly 4 seconds, while the latter takes me roughly 45 seconds (!). No clue why, but I'll just report it."},"comment":{"url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/comments/415953930","html_url":"https://github.com/Beep6581/RawTherapee/issues/4748#issuecomment-415953930","issue_url":"https://api.github.com/repos/Beep6581/RawTherapee/issues/4748","id":415953930,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTk1MzkzMA==","user":{"login":"heckflosse","id":13733487,"node_id":"MDQ6VXNlcjEzNzMzNDg3","avatar_url":"https://avatars3.githubusercontent.com/u/13733487?v=4","gravatar_id":"","url":"https://api.github.com/users/heckflosse","html_url":"https://github.com/heckflosse","followers_url":"https://api.github.com/users/heckflosse/followers","following_url":"https://api.github.com/users/heckflosse/following{/other_user}","gists_url":"https://api.github.com/users/heckflosse/gists{/gist_id}","starred_url":"https://api.github.com/users/heckflosse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/heckflosse/subscriptions","organizations_url":"https://api.github.com/users/heckflosse/orgs","repos_url":"https://api.github.com/users/heckflosse/repos","events_url":"https://api.github.com/users/heckflosse/events{/privacy}","received_events_url":"https://api.github.com/users/heckflosse/received_events","type":"User","site_admin":false},"created_at":"2018-08-25T08:42:51Z","updated_at":"2018-08-25T08:42:51Z","author_association":"COLLABORATOR","body":"@Thanatomanic Thanks for reporting.\r\nIt's caused by wrong (or unsupported) Hasselblad flat field data.\r\nHere's a fix\r\n\r\n```diff\r\ndiff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc\r\nindex da66bd6d..32fc9902 100644\r\n--- a/rtengine/dcraw.cc\r\n+++ b/rtengine/dcraw.cc\r\n@@ -2080,8 +2080,12 @@ void CLASS hasselblad_correct()\r\n         ffcols = get2();\r\n         ffrows = get2();\r\n         fseek(ifp, hbd.flatfield + 16 * 2, SEEK_SET);\r\n+        unsigned toRead = sizeof(ushort) * 4 * ffcols * ffrows;\r\n+        if (toRead > ifp->size) { // there must be something wrong, see Issue #4748\r\n+            return;\r\n+        }\r\n \r\n-        ushort *ffmap = (ushort *)malloc(sizeof(*ffmap) * 4 * ffcols * ffrows);\r\n+        ushort *ffmap = (ushort *)malloc(toRead);\r\n         for (i = 0; i < 4 * ffcols * ffrows; i++) ffmap[i] = get2();\r\n \r\n         /* Get reference values from center of field. This seems to be what Phocus does too,\r\n\r\n\r\n```\r\n"}}
{"actor":{"display_login":"heckflosse"}}