{"action":"created","issue":{"url":"https://api.github.com/repos/HoraApps/LeafPic/issues/148","repository_url":"https://api.github.com/repos/HoraApps/LeafPic","labels_url":"https://api.github.com/repos/HoraApps/LeafPic/issues/148/labels{/name}","comments_url":"https://api.github.com/repos/HoraApps/LeafPic/issues/148/comments","events_url":"https://api.github.com/repos/HoraApps/LeafPic/issues/148/events","html_url":"https://github.com/HoraApps/LeafPic/issues/148","id":152046738,"number":148,"title":"Crashes when opening images from other apps (Content Provider)","user":{"login":"rugk","id":11966684,"avatar_url":"https://avatars.githubusercontent.com/u/11966684?v=3","gravatar_id":"","url":"https://api.github.com/users/rugk","html_url":"https://github.com/rugk","followers_url":"https://api.github.com/users/rugk/followers","following_url":"https://api.github.com/users/rugk/following{/other_user}","gists_url":"https://api.github.com/users/rugk/gists{/gist_id}","starred_url":"https://api.github.com/users/rugk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rugk/subscriptions","organizations_url":"https://api.github.com/users/rugk/orgs","repos_url":"https://api.github.com/users/rugk/repos","events_url":"https://api.github.com/users/rugk/events{/privacy}","received_events_url":"https://api.github.com/users/rugk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2016-04-30T19:01:58Z","updated_at":"2016-05-09T20:08:44Z","closed_at":null,"body":"I have an app which passes images using a [content provider](https://developer.android.com/guide/topics/providers/content-providers.html) (as a more secure method for sharing files). However when I use this app to share a image with LeafPic, LeafPic crashes.\r\n\r\nIt also failed when I instructed the other app to save my image and then used the \"File saved\" notification to pass the image to LeafPic.\r\n\r\nHere some lines from logcat:\r\n```\r\nW/PackageManager(  621): Not granting permission android.permission.WRITE_EXTERNAL_STORAGE to package com.horaapps.leafpic because it was previously installed without\r\nW/PackageManager(  621): Not granting permission android.permission.READ_EXTERNAL_STORAGE to package com.horaapps.leafpic because it was previously installed without\r\nW/PackageManager(  621): Not granting permission android.permission.WRITE_EXTERNAL_STORAGE to package com.horaapps.leafpic because it was previously installed without\r\nW/PackageManager(  621): Not granting permission android.permission.READ_EXTERNAL_STORAGE to package com.horaapps.leafpic because it was previously installed without\r\nI/PackageManager(  621): Setting last chosen activity com.horaapps.leafpic/.PhotoPagerActivity for user 0:\r\nI/ActivityManager(  621): START u0 {act=android.intent.action.VIEW dat=content://ch.*******.app.fileprovider/tmp_files/****EXAMPLEFILE****.gif typ=image/* flg=0x3000001 cmp=com.horaapps.leafpic/.PhotoPagerActivity} from uid 10202 on display 0\r\nI/ActivityManager(  621): Start proc 7582:com.horaapps.leafpic/u0a249 for activity com.horaapps.leafpic/.PhotoPagerActivity\r\nW/System  ( 7582): ClassLoader referenced unknown path: /data/app/com.horaapps.leafpic-1/lib/arm\r\nW/XPrivacy( 7582): Hooking package=com.horaapps.leafpic\r\nW/System.err( 7582): \tat com.horaapps.leafpic.utils.StringUtils.quoteReplace(StringUtils.java:157)\r\nW/System.err( 7582): \tat com.horaapps.leafpic.Base.CustomAlbumsHandler.checkAndCreateAlbum(CustomAlbumsHandler.java:67)\r\nW/System.err( 7582): \tat com.horaapps.leafpic.Base.CustomAlbumsHandler.getSettings(CustomAlbumsHandler.java:48)\r\nW/System.err( 7582): \tat com.horaapps.leafpic.Base.Album.setSettings(Album.java:109)\r\nW/System.err( 7582): \tat com.horaapps.leafpic.Base.Album.<init>(Album.java:78)\r\nW/System.err( 7582): \tat com.horaapps.leafpic.PhotoPagerActivity.onCreate(PhotoPagerActivity.java:101)\r\nE/AndroidRuntime( 7582): Process: com.horaapps.leafpic, PID: 7582\r\nE/AndroidRuntime( 7582): java.lang.RuntimeException: Unable to resume activity {com.horaapps.leafpic/com.horaapps.leafpic.PhotoPagerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.RelativeLayout.setBackgroundColor(int)' on a null object reference\r\nE/AndroidRuntime( 7582): \tat com.horaapps.leafpic.PhotoPagerActivity.setupUI(PhotoPagerActivity.java:216)\r\nE/AndroidRuntime( 7582): \tat com.horaapps.leafpic.PhotoPagerActivity.onResume(PhotoPagerActivity.java:251)\r\nW/ActivityManager(  621):   Force finishing activity com.horaapps.leafpic/.PhotoPagerActivity\r\nW/ActivityManager(  621): Activity pause timeout for ActivityRecord{1590eaf u0 com.horaapps.leafpic/.PhotoPagerActivity t30 f}\r\nI/ActivityManager(  621): Process com.horaapps.leafpic (pid 7582) has died\r\nI/PackageManager(  621): Setting last chosen activity com.horaapps.leafpic/.PhotoPagerActivity for user 0:\r\nI/ActivityManager(  621): START u0 {act=android.intent.action.VIEW dat=content://media/external/images/media/11087 typ=image/gif flg=0x13000000 cmp=com.horaapps.leafpic/.PhotoPagerActivity (has extras)} from uid 10010 on display 0\r\nI/ActivityManager(  621): Start proc 7952:com.horaapps.leafpic/u0a249 for activity com.horaapps.leafpic/.PhotoPagerActivity\r\nW/System  ( 7952): ClassLoader referenced unknown path: /data/app/com.horaapps.leafpic-1/lib/arm\r\nW/XPrivacy( 7952): Hooking package=com.horaapps.leafpic\r\nW/System.err( 7952): \tat com.horaapps.leafpic.utils.StringUtils.quoteReplace(StringUtils.java:157)\r\nW/System.err( 7952): \tat com.horaapps.leafpic.Base.CustomAlbumsHandler.checkAndCreateAlbum(CustomAlbumsHandler.java:67)\r\nW/System.err( 7952): \tat com.horaapps.leafpic.Base.CustomAlbumsHandler.getSettings(CustomAlbumsHandler.java:48)\r\nW/System.err( 7952): \tat com.horaapps.leafpic.Base.Album.setSettings(Album.java:109)\r\nW/System.err( 7952): \tat com.horaapps.leafpic.Base.Album.<init>(Album.java:78)\r\nW/System.err( 7952): \tat com.horaapps.leafpic.PhotoPagerActivity.onCreate(PhotoPagerActivity.java:101)\r\nE/AndroidRuntime( 7952): Process: com.horaapps.leafpic, PID: 7952\r\nE/AndroidRuntime( 7952): java.lang.RuntimeException: Unable to resume activity {com.horaapps.leafpic/com.horaapps.leafpic.PhotoPagerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.RelativeLayout.setBackgroundColor(int)' on a null object reference\r\nE/AndroidRuntime( 7952): \tat com.horaapps.leafpic.PhotoPagerActivity.setupUI(PhotoPagerActivity.java:216)\r\nE/AndroidRuntime( 7952): \tat com.horaapps.leafpic.PhotoPagerActivity.onResume(PhotoPagerActivity.java:251)\r\nW/ActivityManager(  621):   Force finishing activity com.horaapps.leafpic/.PhotoPagerActivity\r\nW/ActivityManager(  621): Activity pause timeout for ActivityRecord{54e73c3 u0 com.horaapps.leafpic/.PhotoPagerActivity t32 f}\r\nI/ActivityManager(  621): Process com.horaapps.leafpic (pid 7952) has died\r\nI/ActivityManager(  621): START u0 {act=android.intent.action.VIEW dat=file:///storage/emulated/0/*******/******* Pictures/Dark.jpg typ=image/jpeg flg=0x10000001 cmp=com.horaapps.leafpic/.PhotoPagerActivity (has extras)} from uid 10093 on display 0\r\nI/ActivityManager(  621): Start proc 8458:com.horaapps.leafpic/u0a249 for activity com.horaapps.leafpic/.PhotoPagerActivity\r\nW/System  ( 8458): ClassLoader referenced unknown path: /data/app/com.horaapps.leafpic-1/lib/arm\r\nW/XPrivacy( 8458): Hooking package=com.horaapps.leafpic\r\nI/ActivityManager(  621): Displayed com.horaapps.leafpic/.PhotoPagerActivity: +976ms\r\nI/PackageManager(  621): Setting last chosen activity com.horaapps.leafpic/.PhotoPagerActivity for user 0:\r\nI/ActivityManager(  621): START u0 {act=android.intent.action.VIEW dat=content://ch.*******.app.fileprovider/tmp_files/****EXAMPLEFILE****.gif typ=image/* flg=0x3000001 cmp=com.horaapps.leafpic/.PhotoPagerActivity} from uid 10202 on display 0\r\nW/System.err( 8458): \tat com.horaapps.leafpic.utils.StringUtils.quoteReplace(StringUtils.java:157)\r\nW/System.err( 8458): \tat com.horaapps.leafpic.Base.CustomAlbumsHandler.checkAndCreateAlbum(CustomAlbumsHandler.java:67)\r\nW/System.err( 8458): \tat com.horaapps.leafpic.Base.CustomAlbumsHandler.getSettings(CustomAlbumsHandler.java:48)\r\nW/System.err( 8458): \tat com.horaapps.leafpic.Base.Album.setSettings(Album.java:109)\r\nW/System.err( 8458): \tat com.horaapps.leafpic.Base.Album.<init>(Album.java:78)\r\nW/System.err( 8458): \tat com.horaapps.leafpic.PhotoPagerActivity.onCreate(PhotoPagerActivity.java:101)\r\nE/AndroidRuntime( 8458): Process: com.horaapps.leafpic, PID: 8458\r\nE/AndroidRuntime( 8458): java.lang.RuntimeException: Unable to resume activity {com.horaapps.leafpic/com.horaapps.leafpic.PhotoPagerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.RelativeLayout.setBackgroundColor(int)' on a null object reference\r\nE/AndroidRuntime( 8458): \tat com.horaapps.leafpic.PhotoPagerActivity.setupUI(PhotoPagerActivity.java:216)\r\nE/AndroidRuntime( 8458): \tat com.horaapps.leafpic.PhotoPagerActivity.onResume(PhotoPagerActivity.java:251)\r\nW/ActivityManager(  621):   Force finishing activity com.horaapps.leafpic/.PhotoPagerActivity\r\nW/ActivityManager(  621): Activity pause timeout for ActivityRecord{a8b6c9 u0 com.horaapps.leafpic/.PhotoPagerActivity t30 f}\r\nI/ActivityManager(  621): Process com.horaapps.leafpic (pid 8458) has died\r\n```\r\n\r\nNote there are different exceptions...\r\n\r\nCyanogenmod 13 (based on Android 6.0.1)"},"comment":{"url":"https://api.github.com/repos/HoraApps/LeafPic/issues/comments/217974382","html_url":"https://github.com/HoraApps/LeafPic/issues/148#issuecomment-217974382","issue_url":"https://api.github.com/repos/HoraApps/LeafPic/issues/148","id":217974382,"user":{"login":"craftyguy","id":1474209,"avatar_url":"https://avatars.githubusercontent.com/u/1474209?v=3","gravatar_id":"","url":"https://api.github.com/users/craftyguy","html_url":"https://github.com/craftyguy","followers_url":"https://api.github.com/users/craftyguy/followers","following_url":"https://api.github.com/users/craftyguy/following{/other_user}","gists_url":"https://api.github.com/users/craftyguy/gists{/gist_id}","starred_url":"https://api.github.com/users/craftyguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craftyguy/subscriptions","organizations_url":"https://api.github.com/users/craftyguy/orgs","repos_url":"https://api.github.com/users/craftyguy/repos","events_url":"https://api.github.com/users/craftyguy/events{/privacy}","received_events_url":"https://api.github.com/users/craftyguy/received_events","type":"User","site_admin":false},"created_at":"2016-05-09T20:08:44Z","updated_at":"2016-05-09T20:08:44Z","body":"This issue is resolved for me with the latest release (0.3), thanks for the quick fix!"}}