{"action":"created","issue":{"url":"https://api.github.com/repos/seven332/EhViewer/issues/49","labels_url":"https://api.github.com/repos/seven332/EhViewer/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/seven332/EhViewer/issues/49/comments","events_url":"https://api.github.com/repos/seven332/EhViewer/issues/49/events","html_url":"https://github.com/seven332/EhViewer/issues/49","id":63475202,"number":49,"title":"[Since 0.6.13] Crashes on thumbnails load while running on ARChon(1.2/2.1 Chrome 64-bit, Windows 7 x64)","user":{"login":"RadarNyan","id":2091529,"avatar_url":"https://avatars.githubusercontent.com/u/2091529?v=3","gravatar_id":"","url":"https://api.github.com/users/RadarNyan","html_url":"https://github.com/RadarNyan","followers_url":"https://api.github.com/users/RadarNyan/followers","following_url":"https://api.github.com/users/RadarNyan/following{/other_user}","gists_url":"https://api.github.com/users/RadarNyan/gists{/gist_id}","starred_url":"https://api.github.com/users/RadarNyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RadarNyan/subscriptions","organizations_url":"https://api.github.com/users/RadarNyan/orgs","repos_url":"https://api.github.com/users/RadarNyan/repos","events_url":"https://api.github.com/users/RadarNyan/events{/privacy}","received_events_url":"https://api.github.com/users/RadarNyan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-03-22T01:33:39Z","updated_at":"2015-03-26T11:43:58Z","closed_at":null,"body":"java.lang.NullPointerException\r\nat android.graphics.Bitmap.getAllocationByteCount(Bitmap.java:1170)\r\nat com.hippo.ehviewer.b.r.a(ImageCache.java:103)\r\nat com.hippo.ehviewer.b.r.a(ImageCache.java:99)\r\nat com.hippo.ehviewer.b.g.a(AnyCache.java:318)\r\nat com.hippo.ehviewer.b.g.b(AnyCache.java:307)\r\nat android.support.v4.c.g.c(LruCache.java:249)\r\nat android.support.v4.c.g.a(LruCache.java:139)\r\nat com.hippo.ehviewer.b.a.a(AnyCache.java:183)\r\nat com.hippo.ehviewer.f.run(ImageLoader.java:162)\r\nat java.lang.Thread.run(Thread.java:841)\r\n\r\nE/Process (  204): java.lang.Exception: Backtrace information\r\nE/Process (  204): \tat android.os.Process.killProcess(Process.java:1011)\r\nE/Process (  204): \tat com.hippo.ehviewer.AppContext.uncaughtException(AppContext.java:160)\r\nE/Process (  204): \tat java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:693)\r\nE/Process (  204): \tat java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:690)\r\n\r\n(Working fine on my real Android device running CM11 though)\r\n\r\nEDIT: Last working version (for ARChon) is: ~~0.6.11.2~~ 0.6.1.2"},"comment":{"url":"https://api.github.com/repos/seven332/EhViewer/issues/comments/86478476","html_url":"https://github.com/seven332/EhViewer/issues/49#issuecomment-86478476","issue_url":"https://api.github.com/repos/seven332/EhViewer/issues/49","id":86478476,"user":{"login":"seven332","id":4018618,"avatar_url":"https://avatars.githubusercontent.com/u/4018618?v=3","gravatar_id":"","url":"https://api.github.com/users/seven332","html_url":"https://github.com/seven332","followers_url":"https://api.github.com/users/seven332/followers","following_url":"https://api.github.com/users/seven332/following{/other_user}","gists_url":"https://api.github.com/users/seven332/gists{/gist_id}","starred_url":"https://api.github.com/users/seven332/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seven332/subscriptions","organizations_url":"https://api.github.com/users/seven332/orgs","repos_url":"https://api.github.com/users/seven332/repos","events_url":"https://api.github.com/users/seven332/events{/privacy}","received_events_url":"https://api.github.com/users/seven332/received_events","type":"User","site_admin":false},"created_at":"2015-03-26T11:43:58Z","updated_at":"2015-03-26T11:43:58Z","body":"It is my mistake, I didn't check the log carefully. I should have gotten the reason earlier.\r\nActually it is a bug of kitkat. I checked the source code of Android.\r\nIn kitkat-release branch, it will throw NullPointerException if mBuffer is null\r\n```java\r\n1169    public final int getAllocationByteCount() {\r\n1170        return mBuffer.length;\r\n1171    }\r\n```\r\nIn kitkat-mr1-release branch, they fixed the bug\r\n```java\r\n1169    public final int getAllocationByteCount() {\r\n1170        if (mBuffer == null) {\r\n1171            // native backed bitmaps don't support reconfiguration,\r\n1172            // so alloc size is always content size\r\n1173            return getByteCount();\r\n1174        }\r\n1175        return mBuffer.length;\r\n1176    }\r\n```\r\nSo just avoid invoking this method.\r\n\r\nIt should work this time.\r\nhttps://mega.co.nz/#!kpFVhZJI!mn6e2sK2IMl1sSKqh8KpT_3XVoVmhyKoevnAiOsHsns"}}