{"action":"opened","issue":{"url":"https://api.github.com/repos/MilosKozak/AndroidAPS/issues/298","repository_url":"https://api.github.com/repos/MilosKozak/AndroidAPS","labels_url":"https://api.github.com/repos/MilosKozak/AndroidAPS/issues/298/labels{/name}","comments_url":"https://api.github.com/repos/MilosKozak/AndroidAPS/issues/298/comments","events_url":"https://api.github.com/repos/MilosKozak/AndroidAPS/issues/298/events","html_url":"https://github.com/MilosKozak/AndroidAPS/issues/298","id":244047767,"number":298,"title":"Synchronize Interval access methods","user":{"login":"AdrianLxM","id":9692866,"avatar_url":"https://avatars1.githubusercontent.com/u/9692866?v=4","gravatar_id":"","url":"https://api.github.com/users/AdrianLxM","html_url":"https://github.com/AdrianLxM","followers_url":"https://api.github.com/users/AdrianLxM/followers","following_url":"https://api.github.com/users/AdrianLxM/following{/other_user}","gists_url":"https://api.github.com/users/AdrianLxM/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrianLxM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrianLxM/subscriptions","organizations_url":"https://api.github.com/users/AdrianLxM/orgs","repos_url":"https://api.github.com/users/AdrianLxM/repos","events_url":"https://api.github.com/users/AdrianLxM/events{/privacy}","received_events_url":"https://api.github.com/users/AdrianLxM/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"AdrianLxM","id":9692866,"avatar_url":"https://avatars1.githubusercontent.com/u/9692866?v=4","gravatar_id":"","url":"https://api.github.com/users/AdrianLxM","html_url":"https://github.com/AdrianLxM","followers_url":"https://api.github.com/users/AdrianLxM/followers","following_url":"https://api.github.com/users/AdrianLxM/following{/other_user}","gists_url":"https://api.github.com/users/AdrianLxM/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrianLxM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrianLxM/subscriptions","organizations_url":"https://api.github.com/users/AdrianLxM/orgs","repos_url":"https://api.github.com/users/AdrianLxM/repos","events_url":"https://api.github.com/users/AdrianLxM/events{/privacy}","received_events_url":"https://api.github.com/users/AdrianLxM/received_events","type":"User","site_admin":false},"assignees":[{"login":"AdrianLxM","id":9692866,"avatar_url":"https://avatars1.githubusercontent.com/u/9692866?v=4","gravatar_id":"","url":"https://api.github.com/users/AdrianLxM","html_url":"https://github.com/AdrianLxM","followers_url":"https://api.github.com/users/AdrianLxM/followers","following_url":"https://api.github.com/users/AdrianLxM/following{/other_user}","gists_url":"https://api.github.com/users/AdrianLxM/gists{/gist_id}","starred_url":"https://api.github.com/users/AdrianLxM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AdrianLxM/subscriptions","organizations_url":"https://api.github.com/users/AdrianLxM/orgs","repos_url":"https://api.github.com/users/AdrianLxM/repos","events_url":"https://api.github.com/users/AdrianLxM/events{/privacy}","received_events_url":"https://api.github.com/users/AdrianLxM/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-07-19T13:50:27Z","updated_at":"2017-07-19T13:50:27Z","closed_at":null,"body":"It is possible to reset/reload the data of Intervals (OverlappingIntervals, NonOverlappingIntervals, ProfileIntervals) (https://github.com/MilosKozak/AndroidAPS/blob/dev/app/src/main/java/info/nightscout/androidaps/data/OverlappingIntervals.java#L21) while a search process is still running on the data. Here e.g. `binarySearch` (https://github.com/MilosKozak/AndroidAPS/blob/dev/app/src/main/java/info/nightscout/androidaps/data/OverlappingIntervals.java#L69).\r\n\r\nThis could be the cause for:\r\n\r\n```\r\njava.lang.ArrayIndexOutOfBoundsException: length=14; index=74\r\n                                                     at android.support.v4.util.LongSparseArray.valueAt(LongSparseArray.java:261)\r\n                                                     at info.nightscout.androidaps.data.OverlappingIntervals.binarySearch(OverlappingIntervals.java:75)\r\n                                                     at info.nightscout.androidaps.data.OverlappingIntervals.getValueByInterval(OverlappingIntervals.java:50)\r\n                                                     at info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin.getRealTempBasalFromHistory(TreatmentsPlugin.java:258)\r\n                                                     at info.nightscout.androidaps.plugins.Treatments.TreatmentsPlugin.getTempBasalFromHistor\r\n```\r\n\r\n"}}
{"actor":{"display_login":"AdrianLxM"}}