{"action":"created","issue":{"url":"https://api.github.com/repos/zotonic/zotonic/issues/1556","repository_url":"https://api.github.com/repos/zotonic/zotonic","labels_url":"https://api.github.com/repos/zotonic/zotonic/issues/1556/labels{/name}","comments_url":"https://api.github.com/repos/zotonic/zotonic/issues/1556/comments","events_url":"https://api.github.com/repos/zotonic/zotonic/issues/1556/events","html_url":"https://github.com/zotonic/zotonic/issues/1556","id":194091099,"number":1556,"title":"z_media_identify - Crash while importing some images","user":{"login":"fredpook","id":5276922,"avatar_url":"https://avatars.githubusercontent.com/u/5276922?v=3","gravatar_id":"","url":"https://api.github.com/users/fredpook","html_url":"https://github.com/fredpook","followers_url":"https://api.github.com/users/fredpook/followers","following_url":"https://api.github.com/users/fredpook/following{/other_user}","gists_url":"https://api.github.com/users/fredpook/gists{/gist_id}","starred_url":"https://api.github.com/users/fredpook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredpook/subscriptions","organizations_url":"https://api.github.com/users/fredpook/orgs","repos_url":"https://api.github.com/users/fredpook/repos","events_url":"https://api.github.com/users/fredpook/events{/privacy}","received_events_url":"https://api.github.com/users/fredpook/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-07T16:06:57Z","updated_at":"2016-12-07T16:09:29Z","closed_at":null,"body":"While importing a large amount of rsc's the process stops sometimes on irregular images. The mime type check fails somehow. This since the changes to z_media_identify.erl 2 months ago 23b3d1e.\r\n\r\nMaybe it is easiest to check with this image:\r\n\r\n![tinableuler_act](https://cloud.githubusercontent.com/assets/5276922/20974973/3a751296-bc9e-11e6-8686-366c54b3cb81.jpg)\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/zotonic/zotonic/issues/comments/265489761","html_url":"https://github.com/zotonic/zotonic/issues/1556#issuecomment-265489761","issue_url":"https://api.github.com/repos/zotonic/zotonic/issues/1556","id":265489761,"user":{"login":"fredpook","id":5276922,"avatar_url":"https://avatars.githubusercontent.com/u/5276922?v=3","gravatar_id":"","url":"https://api.github.com/users/fredpook","html_url":"https://github.com/fredpook","followers_url":"https://api.github.com/users/fredpook/followers","following_url":"https://api.github.com/users/fredpook/following{/other_user}","gists_url":"https://api.github.com/users/fredpook/gists{/gist_id}","starred_url":"https://api.github.com/users/fredpook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredpook/subscriptions","organizations_url":"https://api.github.com/users/fredpook/orgs","repos_url":"https://api.github.com/users/fredpook/repos","events_url":"https://api.github.com/users/fredpook/events{/privacy}","received_events_url":"https://api.github.com/users/fredpook/received_events","type":"User","site_admin":false},"created_at":"2016-12-07T16:09:29Z","updated_at":"2016-12-07T16:09:29Z","body":"Error:\r\n`\r\n2016-12-07 16:22:20.529 [info] mod_import_anymeta:1927 [mediamatic] info @ mod_import_anymeta:1927  15827: updating (zotonic id: 19625)\r\n2016-12-07 16:22:20.547 [info] mod_import_anymeta:1927 [mediamatic] info @ mod_import_anymeta:1927      Add file <<\"tinableuler_act.jpg\">> (26274 bytes)\r\n2016-12-07 16:22:20.557 [info] <0.20972.130>@z_media_identify:identify_file_imagemagick_1:289 identify of \"'/tmp/ztmp-zotonic001@ginger-import-19439696.34944993[0]'\" failed - \"/tmp/ztmp-zotonic001@ginger-import-19439696.34944993[0]=>/tmp/ztmp-zotonic001@ginger-import-19439696.34944993 JPEG 350x263 350x263+0+0 8-bit sRGB 26.3KB 0.000u 0:00.000\\n\"\r\n2016-12-07 16:22:20.558 [info] <0.20972.130> DEBUG: z_media_identify:288  {error,{badmatch,6834},[{exif,read_exif,1,[{file,\"src/exif.erl\"},{line,121}]},{z_media_identify,exif,1,[{file,\"src/support/z_media_identify.erl\"},{line,406}]},{z_media_identify,identify_file_imagemagick_1,4,[{file,\"src/support/z_media_identify.erl\"},{line,273}]},{z_media_identify,identify_file_direct,2,[{file,\"src/support/z_media_identify.erl\"},{line,94}]},{m_media,add_medium_info,4,[{file,\"src/models/m_media.erl\"},{line,750}]},{m_media,replace_file,6,[{file,\"src/models/m_media.erl\"},{line,486}]},{mod_import_anymeta,write_file,6,[{file,\"/srv/zotonic/modules/mod_import_anymeta/mod_import_anymeta.erl\"},{line,1620}]},{mod_import_anymeta,import_loop_1,4,[{file,\"/srv/zotonic/modules/mod_import_anymeta/mod_import_anymeta.erl\"},{line,460}]}]}\r\n2016-12-07 16:22:20.558 [error] emulator Error in process <0.20972.130> on node 'zotonic001@ginger-import' with exit value:\r\n{function_clause,[{z_media_sanitize,sanitize,[{media_upload_preprocess,19625,undefined,\"/tmp/ztmp-zotonic001@ginger-import-19439696.34944993\",<<\"tinableuler_act.jpg\">>,[{size,26274},{original_filename,<<\"tinableuler_act.jpg\">>}],undefined},{context,mediamatic,{wm_reqdata,#Port<0.228506>,{dict,0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}},undefined,\"95.97.67.51\",undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined,[],undefined,[],undefined,undefined,{0,nil},undefined,undefined,undefined,undefined,undefined,false,undefined,undefined,[]},undefined,<0.11024.119>,undefined,<0.20506.130>,undefined,undefined,'z_depcache$mediamatic','z_notifier$mediamatic','z_session_manager$mediamatic','z_dispatcher$mediamatic','z_template$mediamatic','z_scomp$mediamatic','z_dropbox$mediamatic','z_pivot_rsc$mediamatic','z_module_indexer$mediamatic',143458,undefined,{'z_db_pool$mediamatic',z_db_pgsql},en,<<\"Europe/Berlin\">>,{aclug,[325],[],publish},1,[],[],[],[],[],[],[],[{q,[{\"triggervalue\",[]},{\"z_v\",\"start-id:ORyvURfkiaqgoIBMjCKHpwL93LGDaANrAAhzdGFydC1pZGsACHN0YXJ0LWlkbAAAAAFoA2QADG51bWVyaWNhbGl0eWQAG3ZhbGlkYXRvcl9iYXNlX251bWVyaWNhbGl0eWwAAAADZAAFZmFsc2VhAWL_____amo\"},{\"z_v\",\"end-id:T9oEqwu-zKlxbb_4eZKAeAqMSFuDaANrAAZlbmQtaWRrAAZlbmQtaWRsAAAAAWgDZAAMbnVtZXJpY2FsaXR5ZAAbdmFsaWRhdG9yX2Jhc2VfbnVtZXJpY2FsaXR5bAAAAANkAAVmYWxzZWEBYv____9qag\"},{\"host\",\"www.mediamatic.net\"},{\"host_original\",\"www.mediamatic.net\"},{\"start-id\",\"1\"},{\"end-id\",\"20000\"},{\"content-group\",[]},{\"content-group-trust\",\"343\"},{\"only-authoritative\",[]},{\"skip-deleted\",\"1\"},{\"sysadmin-pw\",\"runexport\"},{\"blobs\",\"y\"},{\"zotonic_host\",\"mediamatic\"},{\"zotonic_dispatch_path\",[\"websocket\"]},{\"zotonic_dispatch\",\"websocket\"}]},{q_validated,[{\"end-id\",\"20000\"},{\"start-id\",\"1\"}]},{ws_request,true},{ws_handler,controller_websocket},{ssl,any},{zotonic_dispatch,websocket}]}],[{file,\"src/support/z_media_sanitize.erl\"},{line,31}]},{m_media,replace_file_acl_ok,6,[{file,\"src/models/m_media.erl\"},{line,526}]},{mod_import_anymeta,write_file,6,[{file,\"/srv/zotonic/modules/mod_import_anymeta/mod_import_anymeta.erl\"},{line,1620}]},{mod_import_anymeta,import_loop_1,4,[{file,\"/srv/zotonic/modules/mod_import_anymeta/mod_import_anymeta.erl\"},{line,460}]}]}\r\n`\r\n"}}
{"actor":{"display_login":"fredpook"}}