{"action":"created","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/224","repository_url":"https://api.github.com/repos/aws/aws-sdk-ios","labels_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/224/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/224/events","html_url":"https://github.com/aws/aws-sdk-ios/issues/224","id":97487419,"number":224,"title":"Crash in AWSURLSessionManager.m line 538 [NSConcreteFileHandle writeData:]","user":{"login":"antoescu","id":13149640,"avatar_url":"https://avatars.githubusercontent.com/u/13149640?v=3","gravatar_id":"","url":"https://api.github.com/users/antoescu","html_url":"https://github.com/antoescu","followers_url":"https://api.github.com/users/antoescu/followers","following_url":"https://api.github.com/users/antoescu/following{/other_user}","gists_url":"https://api.github.com/users/antoescu/gists{/gist_id}","starred_url":"https://api.github.com/users/antoescu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoescu/subscriptions","organizations_url":"https://api.github.com/users/antoescu/orgs","repos_url":"https://api.github.com/users/antoescu/repos","events_url":"https://api.github.com/users/antoescu/events{/privacy}","received_events_url":"https://api.github.com/users/antoescu/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/aws-sdk-ios/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2015-07-27T15:16:29Z","updated_at":"2016-04-16T01:02:49Z","closed_at":"2015-08-12T19:56:58Z","body":"We are receiving this error from Crashlytics (now Fabric) using the SDK. We are not able to track it down since we cannot reproduce it and it only affects a small number of users (but it is already in level 2). We are just asking to know if anyone have had a similar problem or you guys can give us a hint to know where to start from. The SKD version is 2.2.2.\r\n\r\nThe app is a social app where the user is able to see other user's posts in a scroll view (like Facebook). All the media (photos and videos) is downloaded from S3, as well as all the media used in the app (dynamic media, not static media). Also the user can create posts and the media is uploaded to S3.\r\n\r\nThe error shown in Crashlytics is ```[NSConcreteFileHandle writeData:]: Invalid argument```in the line 538 of ```AWSURLSessionManager.m```. Here is the log:\r\n\r\n```\r\nThread : Fatal Exception: NSFileHandleOperationException\r\n0  CoreFoundation                 0x283f4fef __exceptionPreprocess + 126\r\n1  libobjc.A.dylib                0x36a98c8b objc_exception_throw + 38\r\n2  CoreFoundation                 0x283f4f35 -[NSException initWithCoder:]\r\n3  Foundation                     0x290f5b6d _NSFileHandleRaiseOperationException + 144\r\n4  Foundation                     0x290f6405 -[NSConcreteFileHandle writeData:] + 60\r\n5  MyApp                      0x0095cb99 -[AWSURLSessionManager URLSession:dataTask:didReceiveData:] (AWSURLSessionManager.m:538)\r\n6  CFNetwork                      0x27f0151d __67-[NSURLSession delegate_dataTask:didReceiveData:completionHandler:]_block_invoke276 + 36\r\n7  Foundation                     0x2911e65d __NSBLOCKOPERATION_IS_CALLING_OUT_TO_A_BLOCK__ + 8\r\n8  Foundation                     0x290894d1 -[NSBlockOperation main] + 148\r\n9  Foundation                     0x2907be87 -[__NSOperationInternal _start:] + 774\r\n10 Foundation                     0x29120fc7 __NSOQSchedule_f + 186\r\n11 libdispatch.dylib              0x37031729 _dispatch_queue_drain + 1468\r\n12 libdispatch.dylib              0x3702baad _dispatch_queue_invoke + 84\r\n13 libdispatch.dylib              0x37032f9f _dispatch_root_queue_drain + 394\r\n14 libdispatch.dylib              0x370343c3 _dispatch_worker_thread3 + 94\r\n15 libsystem_pthread.dylib        0x37190dc1 _pthread_wqthread + 668\r\n16 libsystem_pthread.dylib        0x37190b14 start_wqthread + 8\r\n```\r\n\r\nI would like to provide code, but it is huge and I don't think it will help. The S3 downloads are throughout the app, so it could be anywhere. If helps, the downloads are asynchronous and as soon as they are received, the UIImageView (or AVPlayer) is updated. \r\n\r\n"},"comment":{"url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/comments/210701390","html_url":"https://github.com/aws/aws-sdk-ios/issues/224#issuecomment-210701390","issue_url":"https://api.github.com/repos/aws/aws-sdk-ios/issues/224","id":210701390,"user":{"login":"antoescu","id":13149640,"avatar_url":"https://avatars.githubusercontent.com/u/13149640?v=3","gravatar_id":"","url":"https://api.github.com/users/antoescu","html_url":"https://github.com/antoescu","followers_url":"https://api.github.com/users/antoescu/followers","following_url":"https://api.github.com/users/antoescu/following{/other_user}","gists_url":"https://api.github.com/users/antoescu/gists{/gist_id}","starred_url":"https://api.github.com/users/antoescu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antoescu/subscriptions","organizations_url":"https://api.github.com/users/antoescu/orgs","repos_url":"https://api.github.com/users/antoescu/repos","events_url":"https://api.github.com/users/antoescu/events{/privacy}","received_events_url":"https://api.github.com/users/antoescu/received_events","type":"User","site_admin":false},"created_at":"2016-04-16T01:02:49Z","updated_at":"2016-04-16T01:02:49Z","body":"I did stop using Parse a few months ago, but it seems it was an ios bug that is fixed with ios 9.3, hope it helps\n\n> On 16 Apr 2016, at 02:37, psopher <notifications@github.com> wrote:\n> \n> Hi @antoescu @yyzhu @ghost,\n> \n> I'm responding to the thread because I've received the same error. Has anyone learned how to fix it?\n> \n> ―\n> You are receiving this because you were mentioned.\n> Reply to this email directly or view it on GitHub\n> \n"}}