We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
version: implementation 'com.github.bumptech.glide:glide:4.11.0'
XiaoMi/MIUI Android 10,level 29
When the image is not loaded, jump to the interface and crash,here is my code in RecyclerView Adapter:
Glide.with(activity).load(url).error(R.drawable.user_header).downloadOnly(new SimpleTarget() { @OverRide public void onResourceReady(@nonnull File resource, @nullable Transition<? super File> transition) { String fileName = Hash.getSHA256(shortNo); File destFile = new File(appPaths.getContactsFile(), fileName);
FileUtils.copyFile(resource.getAbsolutePath(), destFile.getAbsolutePath()); activity.runOnUiThread(new Runnable() { @Override public void run() { Glide.with(activity).load(resource) .skipMemoryCache(true) .diskCacheStrategy(DiskCacheStrategy.NONE) .into(headerView); } }); } @Override public void onLoadFailed(@Nullable Drawable errorDrawable) { super.onLoadFailed(errorDrawable); } });
Layout: <com.daimajia.swipe.SwipeLayout android:layout_marginTop="@dimen/dp_8" android:id="@+id/swipe_layout" xmlns:android="http://schemas.android.com/apk/res/android" android:background="@drawable/white_small_round_bg" android:layout_width="match_parent" android:layout_height="wrap_content" xmlns:app="http://schemas.android.com/apk/res-auto">
<ImageView android:scaleType="centerCrop" android:layout_centerInParent="true" android:src="@drawable/recall" android:layout_width="@dimen/dp_30" android:layout_height="@dimen/dp_30"/> </RelativeLayout> <RelativeLayout android:visibility="gone" android:id="@+id/star_layout" android:background="@color/lite_color" android:layout_width="@dimen/dp_80" android:layout_height="match_parent"> <ImageView android:id="@+id/star_text" android:layout_centerInParent="true" android:scaleType="centerCrop" android:src="@drawable/star_white" android:layout_width="@dimen/dp_30" android:layout_height="@dimen/dp_30"/> </RelativeLayout> <RelativeLayout android:visibility="visible" android:id="@+id/delete_layout" android:background="@drawable/delete_red_conner_bg" android:layout_width="@dimen/dp_80" android:layout_height="match_parent"> <ImageView android:scaleType="centerCrop" android:layout_centerInParent="true" android:src="@drawable/delete" android:layout_width="@dimen/dp_30" android:layout_height="@dimen/dp_30"/> </RelativeLayout> </LinearLayout>
<com.ruffian.library.widget.RImageView android:layout_marginBottom="@dimen/dp_12" android:layout_marginTop="@dimen/dp_12" android:layout_marginLeft="@dimen/dp_12" android:src="@drawable/user_header" app:corner_radius="@dimen/dp_24" android:layout_width="@dimen/dp_48" android:layout_height="@dimen/dp_48" android:id="@+id/header"/>
<TextView android:layout_marginBottom="@dimen/dp_4" android:layout_toRightOf="@id/day" android:layout_alignParentBottom="true" android:layout_marginLeft="@dimen/dp_20" android:id="@+id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="xxx" android:textColor="#ffa2a2a2" android:textSize="13sp" /> <ImageView android:visibility="invisible" android:layout_alignParentRight="true" android:layout_marginRight="@dimen/dp_16" android:layout_marginTop="@dimen/dp_8" android:id="@+id/star" android:src="@drawable/star_filled_light" android:layout_width="@dimen/dp_20" android:layout_height="@dimen/dp_20"/> <TextView android:id="@+id/read_count" android:layout_marginRight="@dimen/dp_16" android:layout_alignParentRight="true" android:layout_below="@id/shareSubject" android:layout_alignBaseline="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/reads" android:textColor="#ffbbbbbb" android:textSize="13sp" />
</com.daimajia.swipe.SwipeLayout>
crash: #00 pc 000354cc /apex/com.android.runtime/lib/bionic/libc.so (malloc_init_hard_a0_locked+863) [armeabi-v8::7103c0ea4dad751f797aed4598de945f] 2 #1 pc 00207591 /apex/com.android.runtime/lib/libart.so (bool art::interpreter::DoFieldPut<(art::FindFieldType)42, (art::Primitive::Type)1, true, true>(art::Thread*, art::ShadowFrame const&, art::Instruction const*, unsigned short)+1504) [armeabi-v8::e497aa7e525a0107d8274679da8cc609] 3 #2 pc 001bb5d1 /apex/com.android.runtime/lib/libart.so (bool std::__1::__insertion_sort_incomplete<art::gc::space::MemoryToolMallocSpace<art::gc::space::RosAllocSpace, 8u, false, true>::FreeList(art::Thread*, unsigned int, art::mirror::Object**)::'lambda'(art::mirror::Object*, art::mirror::Object*)&, art::mirror::Object**>(art::mirror::Object**, art::mirror::Object**, art::gc::space::MemoryToolMallocSpace<art::gc::space::RosAllocSpace, 8u, false, true>::FreeList(art::Thread*, unsigned int, art::mirror::Object**)::'lambda'(art::mirror::Object*, art::mirror::Object*)&)+280) [armeabi-v8::e497aa7e525a0107d8274679da8cc609] 4 #3 pc 001ab44f /apex/com.android.runtime/lib/libart.so (art::gc::Heap::LogGC(art::gc::GcCause, art::gc::collector::GarbageCollector*)+734) [armeabi-v8::e497aa7e525a0107d8274679da8cc609] 5 #4 pc 00016d03 /apex/com.android.runtime/lib/libjavacore.so (timesTenToTheEHighPrecision(unsigned long long*, int, int)+686) [armeabi-v8::0c046f876b99b3526028bf1bc60d831d] 6 #5 pc 001e254b /system/framework/arm/boot-core-libart.oat [armeabi::d26c7c7476ab84de645e86d23412b508] 7 java: 8 android.graphics.BitmapFactory.decodeStreamInternal(BitmapFactory.java:790) 9 android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:765) 10 com.bumptech.glide.load.resource.bitmap.ImageReader$InputStreamImageReader.decodeBitmap(ImageReader.java:50) 11 com.bumptech.glide.load.resource.bitmap.Downsampler.decodeStream(Downsampler.java:742) 12 com.bumptech.glide.load.resource.bitmap.Downsampler.decodeFromWrappedStreams(Downsampler.java:390) 13 com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:248) 14 com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:207) 15 com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:177) 16 com.bumptech.glide.load.resource.bitmap.ByteBufferBitmapDecoder.decode(ByteBufferBitmapDecoder.java:31) 17 com.bumptech.glide.load.resource.bitmap.ByteBufferBitmapDecoder.decode(ByteBufferBitmapDecoder.java:14) 18 com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:92) 19 com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:70) 20 com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:59) 21 com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:76) 22 com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:57) 23 com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:524) 24 com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:488) 25 com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:474) 26 com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:426) 27 com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:390) 28 com.bumptech.glide.load.engine.SourceGenerator.onDataReadyInternal(SourceGenerator.java:148) 29 com.bumptech.glide.load.engine.SourceGenerator$1.onDataReady(SourceGenerator.java:76) 30 com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:70) 31 com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:70) 32 com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:63) 33 com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:310) 34 com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:276) 35 com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:234) 36 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) 37 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) 38 java.lang.Thread.run(Thread.java:919) 39 com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:393)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
version:
implementation 'com.github.bumptech.glide:glide:4.11.0'
XiaoMi/MIUI Android 10,level 29
When the image is not loaded, jump to the interface and crash,here is my code in RecyclerView Adapter:
Glide.with(activity).load(url).error(R.drawable.user_header).downloadOnly(new SimpleTarget() {
@OverRide
public void onResourceReady(@nonnull File resource, @nullable Transition<? super File> transition) {
String fileName = Hash.getSHA256(shortNo);
File destFile = new File(appPaths.getContactsFile(), fileName);
Layout:
<com.daimajia.swipe.SwipeLayout
android:layout_marginTop="@dimen/dp_8"
android:id="@+id/swipe_layout"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@drawable/white_small_round_bg"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">
<com.ruffian.library.widget.RImageView
android:layout_marginBottom="@dimen/dp_12"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginLeft="@dimen/dp_12"
android:src="@drawable/user_header"
app:corner_radius="@dimen/dp_24"
android:layout_width="@dimen/dp_48"
android:layout_height="@dimen/dp_48"
android:id="@+id/header"/>
</com.daimajia.swipe.SwipeLayout>
crash:
#00 pc 000354cc /apex/com.android.runtime/lib/bionic/libc.so (malloc_init_hard_a0_locked+863) [armeabi-v8::7103c0ea4dad751f797aed4598de945f]
2
#1 pc 00207591 /apex/com.android.runtime/lib/libart.so (bool art::interpreter::DoFieldPut<(art::FindFieldType)42, (art::Primitive::Type)1, true, true>(art::Thread*, art::ShadowFrame const&, art::Instruction const*, unsigned short)+1504) [armeabi-v8::e497aa7e525a0107d8274679da8cc609]
3
#2 pc 001bb5d1 /apex/com.android.runtime/lib/libart.so (bool std::__1::__insertion_sort_incomplete<art::gc::space::MemoryToolMallocSpace<art::gc::space::RosAllocSpace, 8u, false, true>::FreeList(art::Thread*, unsigned int, art::mirror::Object**)::'lambda'(art::mirror::Object*, art::mirror::Object*)&, art::mirror::Object**>(art::mirror::Object**, art::mirror::Object**, art::gc::space::MemoryToolMallocSpace<art::gc::space::RosAllocSpace, 8u, false, true>::FreeList(art::Thread*, unsigned int, art::mirror::Object**)::'lambda'(art::mirror::Object*, art::mirror::Object*)&)+280) [armeabi-v8::e497aa7e525a0107d8274679da8cc609]
4
#3 pc 001ab44f /apex/com.android.runtime/lib/libart.so (art::gc::Heap::LogGC(art::gc::GcCause, art::gc::collector::GarbageCollector*)+734) [armeabi-v8::e497aa7e525a0107d8274679da8cc609]
5
#4 pc 00016d03 /apex/com.android.runtime/lib/libjavacore.so (timesTenToTheEHighPrecision(unsigned long long*, int, int)+686) [armeabi-v8::0c046f876b99b3526028bf1bc60d831d]
6
#5 pc 001e254b /system/framework/arm/boot-core-libart.oat [armeabi::d26c7c7476ab84de645e86d23412b508]
7
java:
8
android.graphics.BitmapFactory.decodeStreamInternal(BitmapFactory.java:790)
9
android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:765)
10
com.bumptech.glide.load.resource.bitmap.ImageReader$InputStreamImageReader.decodeBitmap(ImageReader.java:50)
11
com.bumptech.glide.load.resource.bitmap.Downsampler.decodeStream(Downsampler.java:742)
12
com.bumptech.glide.load.resource.bitmap.Downsampler.decodeFromWrappedStreams(Downsampler.java:390)
13
com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:248)
14
com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:207)
15
com.bumptech.glide.load.resource.bitmap.Downsampler.decode(Downsampler.java:177)
16
com.bumptech.glide.load.resource.bitmap.ByteBufferBitmapDecoder.decode(ByteBufferBitmapDecoder.java:31)
17
com.bumptech.glide.load.resource.bitmap.ByteBufferBitmapDecoder.decode(ByteBufferBitmapDecoder.java:14)
18
com.bumptech.glide.load.engine.DecodePath.decodeResourceWithList(DecodePath.java:92)
19
com.bumptech.glide.load.engine.DecodePath.decodeResource(DecodePath.java:70)
20
com.bumptech.glide.load.engine.DecodePath.decode(DecodePath.java:59)
21
com.bumptech.glide.load.engine.LoadPath.loadWithExceptionList(LoadPath.java:76)
22
com.bumptech.glide.load.engine.LoadPath.load(LoadPath.java:57)
23
com.bumptech.glide.load.engine.DecodeJob.runLoadPath(DecodeJob.java:524)
24
com.bumptech.glide.load.engine.DecodeJob.decodeFromFetcher(DecodeJob.java:488)
25
com.bumptech.glide.load.engine.DecodeJob.decodeFromData(DecodeJob.java:474)
26
com.bumptech.glide.load.engine.DecodeJob.decodeFromRetrievedData(DecodeJob.java:426)
27
com.bumptech.glide.load.engine.DecodeJob.onDataFetcherReady(DecodeJob.java:390)
28
com.bumptech.glide.load.engine.SourceGenerator.onDataReadyInternal(SourceGenerator.java:148)
29
com.bumptech.glide.load.engine.SourceGenerator$1.onDataReady(SourceGenerator.java:76)
30
com.bumptech.glide.load.model.ByteBufferFileLoader$ByteBufferFetcher.loadData(ByteBufferFileLoader.java:70)
31
com.bumptech.glide.load.engine.SourceGenerator.startNextLoad(SourceGenerator.java:70)
32
com.bumptech.glide.load.engine.SourceGenerator.startNext(SourceGenerator.java:63)
33
com.bumptech.glide.load.engine.DecodeJob.runGenerators(DecodeJob.java:310)
34
com.bumptech.glide.load.engine.DecodeJob.runWrapped(DecodeJob.java:276)
35
com.bumptech.glide.load.engine.DecodeJob.run(DecodeJob.java:234)
36
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
37
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
38
java.lang.Thread.run(Thread.java:919)
39
com.bumptech.glide.load.engine.executor.GlideExecutor$DefaultThreadFactory$1.run(GlideExecutor.java:393)
The text was updated successfully, but these errors were encountered: