{"action":"created","issue":{"url":"https://api.github.com/repos/segmentio/analytics-android/issues/172","labels_url":"https://api.github.com/repos/segmentio/analytics-android/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/segmentio/analytics-android/issues/172/comments","events_url":"https://api.github.com/repos/segmentio/analytics-android/issues/172/events","html_url":"https://github.com/segmentio/analytics-android/issues/172","id":57130365,"number":172,"title":"Crash in SDK internals related to Tape","user":{"login":"drspaceboo","id":1308624,"avatar_url":"https://avatars.githubusercontent.com/u/1308624?v=3","gravatar_id":"","url":"https://api.github.com/users/drspaceboo","html_url":"https://github.com/drspaceboo","followers_url":"https://api.github.com/users/drspaceboo/followers","following_url":"https://api.github.com/users/drspaceboo/following{/other_user}","gists_url":"https://api.github.com/users/drspaceboo/gists{/gist_id}","starred_url":"https://api.github.com/users/drspaceboo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drspaceboo/subscriptions","organizations_url":"https://api.github.com/users/drspaceboo/orgs","repos_url":"https://api.github.com/users/drspaceboo/repos","events_url":"https://api.github.com/users/drspaceboo/events{/privacy}","received_events_url":"https://api.github.com/users/drspaceboo/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/segmentio/analytics-android/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":17,"created_at":"2015-02-10T04:47:29Z","updated_at":"2015-03-14T01:29:05Z","closed_at":null,"body":"We recently added the Segment IO SDK into our application. Since then we have seen an increasing number of crashes caused within the SDK due to Tape. It appears that an exception is being thrown but not handled.\r\n\r\nThis crash is now the 2nd most prevalent crash in our application.\r\n\r\nBelow is the stack trace we are getting via HockeyApp:\r\n```\r\ncom.squareup.tape.FileException: Failed to remove.\r\n\tat com.squareup.tape.FileObjectQueue.remove(SourceFile:68)\r\n\tat com.segment.analytics.Segment.performFlush(SourceFile:123)\r\n\tat com.segment.analytics.Segment$SegmentHandler.handleMessage(SourceFile:181)\r\n\tat android.os.Handler.dispatchMessage(Handler.java:99)\r\n\tat android.os.Looper.loop(Looper.java:137)\r\n\tat android.os.HandlerThread.run(HandlerThread.java:60)\r\nCaused by: java.io.EOFException\r\n\tat java.io.RandomAccessFile.readFully(RandomAccessFile.java:419)\r\n\tat com.squareup.tape.QueueFile.ringRead(SourceFile:269)\r\n\tat com.squareup.tape.QueueFile.remove(SourceFile:506)\r\n\tat com.squareup.tape.FileObjectQueue.remove(SourceFile:65)\r\n\t... 5 more\r\n```\r\n\r\nWhile trying to debug it internally we also hit the following issue, however we're not sure if it is related:\r\n```\r\n java.lang.ArrayIndexOutOfBoundsException: length=4096; regionStart=0; regionLength=-1629\r\n            at java.util.Arrays.checkOffsetAndCount(Arrays.java:1719)\r\n            at libcore.io.IoBridge.write(IoBridge.java:491)\r\n            at java.io.RandomAccessFile.write(RandomAccessFile.java:688)\r\n            at com.segment.analytics.QueueFile.ringWrite(QueueFile.java:242)\r\n            at com.segment.analytics.QueueFile.ringErase(QueueFile.java:251)\r\n            at com.segment.analytics.QueueFile.remove(QueueFile.java:532)\r\n            at com.segment.analytics.Segment.performFlush(Segment.java:151)\r\n            at com.segment.analytics.Segment$SegmentHandler.handleMessage(Segment.java:301)\r\n            at android.os.Handler.dispatchMessage(Handler.java:102)\r\n            at android.os.Looper.loop(Looper.java:135)\r\n            at android.os.HandlerThread.run(HandlerThread.java:61)\r\n```\r\n\r\nWe are using the Core library version 2.5.3."},"comment":{"url":"https://api.github.com/repos/segmentio/analytics-android/issues/comments/79651509","html_url":"https://github.com/segmentio/analytics-android/issues/172#issuecomment-79651509","issue_url":"https://api.github.com/repos/segmentio/analytics-android/issues/172","id":79651509,"user":{"login":"adrien-aubel","id":1900608,"avatar_url":"https://avatars.githubusercontent.com/u/1900608?v=3","gravatar_id":"","url":"https://api.github.com/users/adrien-aubel","html_url":"https://github.com/adrien-aubel","followers_url":"https://api.github.com/users/adrien-aubel/followers","following_url":"https://api.github.com/users/adrien-aubel/following{/other_user}","gists_url":"https://api.github.com/users/adrien-aubel/gists{/gist_id}","starred_url":"https://api.github.com/users/adrien-aubel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adrien-aubel/subscriptions","organizations_url":"https://api.github.com/users/adrien-aubel/orgs","repos_url":"https://api.github.com/users/adrien-aubel/repos","events_url":"https://api.github.com/users/adrien-aubel/events{/privacy}","received_events_url":"https://api.github.com/users/adrien-aubel/received_events","type":"User","site_admin":false},"created_at":"2015-03-14T01:29:05Z","updated_at":"2015-03-14T01:29:05Z","body":"Would you have by any chance steps that the user should follow if he wants to fix the problem without uninstalling the app and lose his data?"}}