{"action":"closed","issue":{"url":"https://api.github.com/repos/AltBeacon/android-beacon-library/issues/72","labels_url":"https://api.github.com/repos/AltBeacon/android-beacon-library/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/AltBeacon/android-beacon-library/issues/72/comments","events_url":"https://api.github.com/repos/AltBeacon/android-beacon-library/issues/72/events","html_url":"https://github.com/AltBeacon/android-beacon-library/issues/72","id":53450098,"number":72,"title":"App in StrictMode force-quits when ModelSpecificDistanceCalculator loads json file","user":{"login":"brianmuse","id":548885,"avatar_url":"https://avatars.githubusercontent.com/u/548885?v=3","gravatar_id":"","url":"https://api.github.com/users/brianmuse","html_url":"https://github.com/brianmuse","followers_url":"https://api.github.com/users/brianmuse/followers","following_url":"https://api.github.com/users/brianmuse/following{/other_user}","gists_url":"https://api.github.com/users/brianmuse/gists{/gist_id}","starred_url":"https://api.github.com/users/brianmuse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brianmuse/subscriptions","organizations_url":"https://api.github.com/users/brianmuse/orgs","repos_url":"https://api.github.com/users/brianmuse/repos","events_url":"https://api.github.com/users/brianmuse/events{/privacy}","received_events_url":"https://api.github.com/users/brianmuse/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-05T21:27:53Z","updated_at":"2015-01-29T01:26:34Z","closed_at":"2015-01-29T01:26:34Z","body":"This is likely lower priority, but I wanted to make you aware of it. I have an app that force closes when in Android's strict mode when AltBeacon is loading the JSON file containing the device specific information. The error is:\r\n\r\n`java.lang.Throwable: Explicit termination method 'end' not called`\r\n\r\nThis is likely due to the `detectLeakedClosableObjects` portion of the config below. \r\n\r\n```java\r\n            StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder()\r\n                    .detectDiskReads()\r\n                    .detectDiskWrites()\r\n                    .detectNetwork()\r\n                    .penaltyLog()\r\n                    .build());\r\n            StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()\r\n                    .detectLeakedSqlLiteObjects()\r\n                    .detectLeakedClosableObjects()\r\n                    .penaltyLog()\r\n                    .penaltyDeath()\r\n                    .build());\r\n```\r\n\r\nThis is the line that causes the crash: \r\nhttps://github.com/AltBeacon/android-beacon-library/blob/master/src/main/java/org/altbeacon/beacon/distance/ModelSpecificDistanceCalculator.java#L281\r\n\r\nI wasn't able to replicate this on a Nexus 5, but can replicate consistently on a Nexus 6."}}