I am using Glide version 4.7.1.
I display the thumbnail images which I parse from different types of content links and display those images inside list view.
The library works perfectly on the emulator and with different kind of news thumbnail links. The only problem is when I run the app on my Google Pixel phone (Android P) and try to load this link (or variations of apple news image) https://c.apple.news/AgEXQVdJY1JreHAxVE9DSzFBSUFPcTV5MFEAMA
RequestOptions options = new RequestOptions().skipMemoryCache(false).diskCacheStrategy(DiskCacheStrategy.AUTOMATIC).override(width,height).placeholder(context.getDrawable(R.drawable.ic_news_thumbnail_loading))
Glide.with(context).setDefaultRequestOptions(options).asBitmap()
.load("https://c.apple.news/AgEXQVdJY1JreHAxVE9DSzFBSUFPcTV5MFEAMA")
.into(imageViewContent);
I get following ANR
10-02 15:08:09.144 26856-27483/: Starting a blocking GC Alloc
10-02 15:08:09.170 26856-27483/: Waiting for a blocking GC Alloc
10-02 15:08:09.207 26856-27483/: WaitForGcToComplete blocked Alloc on HeapTrim for 36.324ms
Starting a blocking GC Alloc
10-02 15:08:09.233 26856-27483/: Waiting for a blocking GC Alloc
10-02 15:08:09.272 26856-27483/: WaitForGcToComplete blocked Alloc on HeapTrim for 38.495ms
Starting a blocking GC Alloc
10-02 15:08:09.380 26856-27483/I/: Waiting for a blocking GC Alloc
10-02 15:08:09.415 26856-27483/I/: WaitForGcToComplete blocked Alloc on HeapTrim for 35.169ms
Starting a blocking GC Alloc
10-02 15:08:10.241 26856-26869/: Background concurrent copying GC freed 103(264KB) AllocSpace objects, 99(60MB) LOS objects, 50% free, 19MB/39MB, paused 260us total 104.265ms
10-02 15:08:12.244 26856-26869/: Background concurrent copying GC freed 143(2MB) AllocSpace objects, 17(52MB) LOS objects, 24% free, 72MB/96MB, paused 68us total 689.954ms
10-02 15:08:14.323 26856-26869/: Background concurrent copying GC freed 481711(16MB) AllocSpace objects, 0(0B) LOS objects, 20% free, 91MB/115MB, paused 257us total 806.515ms
10-02 15:08:16.912 26856-26869/: Background concurrent copying GC freed 646828(18MB) AllocSpace objects, 0(0B) LOS objects, 17% free, 113MB/137MB, paused 131us total 1.188s
10-02 15:10:46.793 26856-26866/com: Waiting for a blocking GC Alloc
10-02 15:10:46.794 26856-27486/: Waiting for a blocking GC Alloc
10-02 15:10:46.794 26856-27589/: Waiting for a blocking GC Alloc
10-02 15:10:49.024 26856-26868/: Waiting for a blocking GC Alloc
I have done several tests and figured out that this problem always occurs when I try to load thumbnail image from Apple News website and does not happen on Emulator happens on actual device.
This problem also occurs when I try Picasso etc.