{"action":"created","issue":{"url":"https://api.github.com/repos/BradLarson/GPUImage/issues/1632","labels_url":"https://api.github.com/repos/BradLarson/GPUImage/issues/1632/labels{/name}","comments_url":"https://api.github.com/repos/BradLarson/GPUImage/issues/1632/comments","events_url":"https://api.github.com/repos/BradLarson/GPUImage/issues/1632/events","html_url":"https://github.com/BradLarson/GPUImage/issues/1632","id":36216540,"number":1632,"title":"GPUImageiOSBlurFilter imageByFilteringImage returning nil","user":{"login":"ShaharHD","id":700985,"avatar_url":"https://avatars.githubusercontent.com/u/700985?v=3","gravatar_id":"","url":"https://api.github.com/users/ShaharHD","html_url":"https://github.com/ShaharHD","followers_url":"https://api.github.com/users/ShaharHD/followers","following_url":"https://api.github.com/users/ShaharHD/following{/other_user}","gists_url":"https://api.github.com/users/ShaharHD/gists{/gist_id}","starred_url":"https://api.github.com/users/ShaharHD/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShaharHD/subscriptions","organizations_url":"https://api.github.com/users/ShaharHD/orgs","repos_url":"https://api.github.com/users/ShaharHD/repos","events_url":"https://api.github.com/users/ShaharHD/events{/privacy}","received_events_url":"https://api.github.com/users/ShaharHD/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2014-06-21T04:19:04Z","updated_at":"2015-04-09T15:14:32Z","closed_at":null,"body":"Running on simulator (4-inch) sometimes the following code results in imageByFilteringImage returning nil but when calling it again - it just works fine (the while loop is the workaround).\r\n\r\n```\r\n        UIGraphicsBeginImageContextWithOptions([[self view] bounds].size, NO, [[UIScreen mainScreen] scale]);\r\n        \r\n        [[self view] drawViewHierarchyInRect:[[self view] bounds] afterScreenUpdates:NO];\r\n        \r\n        UIImage *screenImage = UIGraphicsGetImageFromCurrentImageContext();\r\n        UIGraphicsEndImageContext();\r\n        \r\n        GPUImageiOSBlurFilter *imageFilter = [GPUImageiOSBlurFilter new];\r\n        [imageFilter setBlurRadiusInPixels:10.0];\r\n        UIImage *blurImage;\r\n        \r\n        int errorCount = 0;\r\n        //Loop workaround for some unknown GPUImage issue where sometimes the result is nil.\r\n        while (! (blurImage = [imageFilter imageByFilteringImage:screenImage]) ) {\r\n            ++errorCount;\r\n        }\r\n        \r\n        //Track error.\r\n        if (errorCount > 0) {\r\n            NSLog(@\"GPUImageiOSBlurFilter imageByFilteringImage error count: %i\", errorCount);\r\n        }\r\n\r\n```\r\nAny idea where to start looking? to maybe get some insight on the issue and what causing it?\r\nMy fear is that the issue will happen on the iOS devices at some point as well."},"comment":{"url":"https://api.github.com/repos/BradLarson/GPUImage/issues/comments/91260949","html_url":"https://github.com/BradLarson/GPUImage/issues/1632#issuecomment-91260949","issue_url":"https://api.github.com/repos/BradLarson/GPUImage/issues/1632","id":91260949,"user":{"login":"fluidsonic","id":85242,"avatar_url":"https://avatars.githubusercontent.com/u/85242?v=3","gravatar_id":"","url":"https://api.github.com/users/fluidsonic","html_url":"https://github.com/fluidsonic","followers_url":"https://api.github.com/users/fluidsonic/followers","following_url":"https://api.github.com/users/fluidsonic/following{/other_user}","gists_url":"https://api.github.com/users/fluidsonic/gists{/gist_id}","starred_url":"https://api.github.com/users/fluidsonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fluidsonic/subscriptions","organizations_url":"https://api.github.com/users/fluidsonic/orgs","repos_url":"https://api.github.com/users/fluidsonic/repos","events_url":"https://api.github.com/users/fluidsonic/events{/privacy}","received_events_url":"https://api.github.com/users/fluidsonic/received_events","type":"User","site_admin":false},"created_at":"2015-04-09T15:14:32Z","updated_at":"2015-04-09T15:14:32Z","body":"Same issue here. We just started using GPUImage (latest in CocoaPods) and blurred images are randomly `nil`.\r\n\r\nSo far we only noticed it in the Simulator though."}}