{"action":"created","issue":{"url":"https://api.github.com/repos/nostra13/Android-Universal-Image-Loader/issues/666","labels_url":"https://api.github.com/repos/nostra13/Android-Universal-Image-Loader/issues/666/labels{/name}","comments_url":"https://api.github.com/repos/nostra13/Android-Universal-Image-Loader/issues/666/comments","events_url":"https://api.github.com/repos/nostra13/Android-Universal-Image-Loader/issues/666/events","html_url":"https://github.com/nostra13/Android-Universal-Image-Loader/issues/666","id":36546590,"number":666,"title":"loadImageSync return null","user":{"login":"saltcoffee","id":1784843,"avatar_url":"https://avatars.githubusercontent.com/u/1784843?v=3","gravatar_id":"","url":"https://api.github.com/users/saltcoffee","html_url":"https://github.com/saltcoffee","followers_url":"https://api.github.com/users/saltcoffee/followers","following_url":"https://api.github.com/users/saltcoffee/following{/other_user}","gists_url":"https://api.github.com/users/saltcoffee/gists{/gist_id}","starred_url":"https://api.github.com/users/saltcoffee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saltcoffee/subscriptions","organizations_url":"https://api.github.com/users/saltcoffee/orgs","repos_url":"https://api.github.com/users/saltcoffee/repos","events_url":"https://api.github.com/users/saltcoffee/events{/privacy}","received_events_url":"https://api.github.com/users/saltcoffee/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nostra13/Android-Universal-Image-Loader/labels/Problem","name":"Problem","color":"0b02e1"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2014-06-26T05:18:21Z","updated_at":"2016-01-11T17:39:23Z","closed_at":"2014-07-19T20:14:29Z","body":"hello, guys. \r\nwhy when i use \"loadImageSync\" , it returned null.\r\n``` java\r\nImageLoader imageLoader = ImageLoader.getInstance();\r\nBitmap bitmap =  imageLoader.loadImageSync(\"http://thumb.dongtw.com/?width=240&height=180&url=http%3A%2F%2Fs2.imgs.cc%2Fimg%2Fjdr4HwY.jpg\");\r\nimageView.setImageBitmap(bitmap);\r\nbitmap is null, \r\n```\r\nbut when i use \r\n``` java\r\nimageLoader.displayImage(\"http://thumb.dongtw.com/?width=320&height=180&url=http%3A%2F%2Fs2.imgs.cc%2Fimg%2Fjdr4HwY.jpg\", imageView);\r\n```\r\nit worked well. so why this happened, thx, :)"},"comment":{"url":"https://api.github.com/repos/nostra13/Android-Universal-Image-Loader/issues/comments/170628841","html_url":"https://github.com/nostra13/Android-Universal-Image-Loader/issues/666#issuecomment-170628841","issue_url":"https://api.github.com/repos/nostra13/Android-Universal-Image-Loader/issues/666","id":170628841,"user":{"login":"asafchet","id":3617625,"avatar_url":"https://avatars.githubusercontent.com/u/3617625?v=3","gravatar_id":"","url":"https://api.github.com/users/asafchet","html_url":"https://github.com/asafchet","followers_url":"https://api.github.com/users/asafchet/followers","following_url":"https://api.github.com/users/asafchet/following{/other_user}","gists_url":"https://api.github.com/users/asafchet/gists{/gist_id}","starred_url":"https://api.github.com/users/asafchet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asafchet/subscriptions","organizations_url":"https://api.github.com/users/asafchet/orgs","repos_url":"https://api.github.com/users/asafchet/repos","events_url":"https://api.github.com/users/asafchet/events{/privacy}","received_events_url":"https://api.github.com/users/asafchet/received_events","type":"User","site_admin":false},"created_at":"2016-01-11T17:39:23Z","updated_at":"2016-01-11T17:39:23Z","body":"I had the same issue as described here, i solved it by wrapping the loadImageSync method with a synchronized object.\r\nI had a case where there is a chance the method was called from two different threads simultaneously. looks like it solved the problem."}}