Glide Version:
4.6.1, but it was happening since long time ago.
Integration libraries:
None
Device/Android Version:
Only Android 7.1. Mostly Xiaomi and Motorola devices. Looks like that most of them were using Lineage OS. Happens also on high memory devices.
Issue details / Repro steps / Use case background:
I can't give repro details because this is happening on a production application with large user base. Also, current bug tracker (Fabric) won't catch those native crashes. The application handles files and makes heavy operation with them but there is not any memory leak as far as I know, in fact the application is getting only few OOM out of many thousands sessions per day. Images displayed are all static and are both files and urls.
Glide load line / GlideModule (if any) / list Adapter code (if any):
Sorry in advance for the long code, I just tried to be as complete as possible.
public class CustomGlideModule extends AppGlideModule {
@Override
public void applyOptions(Context context, GlideBuilder builder) {
MemorySizeCalculator calculator = new MemorySizeCalculator.Builder(context)
.setMemoryCacheScreens(1)
.setLowMemoryMaxSizeMultiplier(0.2f)
.setMaxSizeMultiplier(0.2f)
.build();
builder.setMemoryCache(new LruResourceCache((int) (calculator.getMemoryCacheSize() * 0.8)));
builder.setDiskCache(new ExternalCacheDiskCacheFactory(context));
builder.setBitmapPool(new LruBitmapPool((int) (calculator.getBitmapPoolSize() * 0.6)));
builder.setDefaultRequestOptions(new RequestOptions().fitCenter().placeholder(R.drawable.ic_music_note_grey_600_24dp).format(DecodeFormat.PREFER_RGB_565).sizeMultiplier(0.7f));
}
@Override
public boolean isManifestParsingEnabled() {
return false;
}
}
Sometimes loads like this:
RequestOptions options = new RequestOptions()
.fitCenter()
.placeholder(R.drawable.mydraw);
Glide.with(activity)
.load(file path / File object / url string)
.apply(options)
.into(ImageView);
Example of loading inside adapter:
public class coversAdapter extends RecyclerView.Adapter<coversAdapter.ViewHolder> {
private ArrayList<String> urls;
private CustomImageItemClickListener clickListener;
private RequestManager mRequestManager;
private Context mContext;
public coversAdapter(Context context, ArrayList<String> urls, CustomImageItemClickListener clickListener, RequestManager requestManager) {
this.urls = urls;
this.mContext = context;
this.clickListener = clickListener;
mRequestManager = requestManager;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) {
View view = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.item_cover, viewGroup, false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(ViewHolder viewHolder, int i) {
String url = urls.get(i);
if(url.contains("1200x1200bb")) url = url.replace("1200x1200bb", "200x200bb");
RequestOptions options = new RequestOptions()
.fitCenter()
.placeholder(R.drawable.ic_music_note_grey_600_24dp);
mRequestManager.load(url).apply(options).into(viewHolder.imgCover);
}
@Override
public void onViewRecycled(ViewHolder holder) {
super.onViewRecycled(holder);
if(holder.imgCover == null) return;
RequestOptions options = new RequestOptions()
.fitCenter();
if(mContext == null || ((Activity) mContext).isFinishing()) return;
Glide.with(mContext).clear(holder.imgCover);
mRequestManager
.load(R.drawable.ic_music_note_grey_600_24dp)
.apply(options)
.into(holder.imgCover);
}
@Override
public int getItemCount() {
if (urls == null) return 0;
return urls.size();
}
class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
ImageView imgCover;
ViewHolder(View view) {
super(view);
itemView.setOnClickListener(this);
imgCover = (ImageView) view.findViewById(R.id.imgCover);
}
@Override
public void onClick(View view) {
clickListener.onItemClick(urls.get(getAdapterPosition()), getAdapterPosition(), (getItemCount() - getAdapterPosition()) == 1);
}
}
@Override
public void onDetachedFromRecyclerView(RecyclerView recyclerView) {
super.onDetachedFromRecyclerView(recyclerView);
mRequestManager = null;
clickListener = null;
urls = null;
mContext = null;
}
}
Other adapter example querying to Android MediaStore
public class ListRecyclerAdapter extends RecyclerView.Adapter<ListRecyclerAdapter.SongViewHolder> implements FastScrollRecyclerView.SectionedAdapter {
public interface ListAdapterInterface {
void onSongClick(View v, int position);
void onSongLongClick(View v, int position);
void onSongsLoaded(int count);
}
private static final int VIEW_TYPE_SONG = 1;
private static final int VIEW_TYPE_EMPTY = 2;
// PATCH: Because RecyclerView.Adapter in its current form doesn't natively support
// cursors, we "wrap" a CursorAdapter that will do all teh job
// for us
public MediaStoreHelper mediaStoreHelper;
private CustomCursorAdapter mCursorAdapter;
private ListAdapterInterface mListener;
private Context mContext;
private String query;
private RequestManager mRequestManager;
public ListRecyclerAdapter(Context context, Cursor c, ListAdapterInterface listener, RequestManager requestManager) {
mContext = context;
mListener = listener;
mediaStoreHelper = new MediaStoreHelper(context);
mCursorAdapter = new CustomCursorAdapter(mContext, c, 0);
mRequestManager = requestManager;
if(c != null)
mListener.onSongsLoaded(c.getCount());
mContext.registerReceiver(mMessageReceiver, new IntentFilter(TagWriterService.BROADCAST_CHANNEL_NAME));
}
public ListRecyclerAdapter(Context context, Cursor c, ListAdapterInterface listener, RequestManager requestManager, String q) {
mContext = context;
mListener = listener;
mediaStoreHelper = new MediaStoreHelper(context);
mCursorAdapter = new CustomCursorAdapter(mContext, c, 0);
mRequestManager = requestManager;
query = q;
if(c != null)
mListener.onSongsLoaded(c.getCount());
mContext.registerReceiver(mMessageReceiver, new IntentFilter(TagWriterService.BROADCAST_CHANNEL_NAME));
}
@Override
public int getItemViewType(int position) {
if (mCursorAdapter.getCount() == 0) {
return VIEW_TYPE_EMPTY;
}else {
return VIEW_TYPE_SONG;
}
}
@NonNull
@Override
public String getSectionName(int position) {
if(mCursorAdapter.getCursor() == null) return "";
int backup_pos = mCursorAdapter.getCursor().getPosition();
Cursor cursor = mCursorAdapter.getCursor();
if(position >= cursor.getCount() || position < 0) return "#";
cursor.moveToPosition(position);
String titleName = cursor.getString(cursor.getColumnIndex("title"));
if(titleName == null || titleName.length() == 0) return "#";
Character c = titleName.charAt(0);
mCursorAdapter.getCursor().moveToPosition(backup_pos);
return c.toString();
}
class SongViewHolder extends RecyclerView.ViewHolder {
// each data item is just a string in this case
TextView textItemTitle;
TextView textItemSub;
ImageView imgArt;
public int position;
DownloadImageTask downloadImageTask;
public String album_id;
public String path_art;
String path_file;
SongViewHolder(View v) {
super(v);
textItemTitle = v.findViewById(R.id.textItemTitle);
textItemSub = v.findViewById(R.id.textItemSub);
imgArt = v.findViewById(R.id.imgArt);
}
@SuppressWarnings("unused")
SongViewHolder(View v, int hack) {
super(v);
}
}
private class DownloadImageTask extends AsyncTask<String, String, String> {
private MediaStoreHelper mediaStoreHelper;
private ImageView imageView;
DownloadImageTask(MediaStoreHelper mediaStoreHelper, ImageView imageView)
{
this.mediaStoreHelper = mediaStoreHelper;
this.imageView = imageView;
}
@Override
protected String doInBackground(String... ids) {
return mediaStoreHelper.getAlbumArtPath(ids[0]);
}
protected void onPostExecute(String result) {
if(!isCancelled()) {
RequestOptions options = new RequestOptions()
.fitCenter()
.override(200)
.placeholder(R.drawable.ic_music_note_grey_600_24dp);
mRequestManager
.load(new File(result))
.apply(options)
.into(imageView);
}
}
}
private class CustomCursorAdapter extends CursorAdapter {
CustomCursorAdapter(Context context, Cursor c, int flags) {
super(context, c, flags);
}
@Override
public View newView(final Context context, Cursor cursor, ViewGroup parent) {
View v = LayoutInflater.from(parent.getContext())
.inflate(R.layout.song_item, parent, false);
final SongViewHolder holder = new SongViewHolder(v);
v.setTag(holder);
return v;
}
@Override
public void bindView(View view, Context context, Cursor cursor) {
SongViewHolder holder = (SongViewHolder) view.getTag();
holder.position = cursor.getPosition();
holder.textItemTitle.setText(cursor.getString(cursor.getColumnIndex("title")));
holder.textItemSub.setText(cursor.getString(cursor.getColumnIndex("artist")));
holder.album_id = cursor.getString(cursor.getColumnIndex("album_id"));
holder.path_file = cursor.getString(cursor.getColumnIndex("_data"));
if(holder.downloadImageTask != null)
holder.downloadImageTask.cancel(true);
holder.downloadImageTask = (DownloadImageTask) new DownloadImageTask(mediaStoreHelper, holder.imgArt).execute(holder.album_id);
}
}
@Override
public void onViewRecycled(SongViewHolder holder) {
if(holder.imgArt == null) return;
RequestOptions options = new RequestOptions()
.fitCenter();
if(mContext == null || !isAttached) return;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1 && ((Activity) mContext).isDestroyed()) return;
Glide.with(holder.itemView.getContext()).clear(holder.imgArt);
mRequestManager
.load(R.drawable.ic_music_note_grey_600_24dp)
.apply(options)
.into(holder.imgArt);
if(holder != null) {
holder.downloadImageTask = null;
}
super.onViewRecycled(holder);
}
public SongArgsData getSongData(View view) {
SongViewHolder itemHolder = (SongViewHolder) view.getTag();
SongArgsData description = new SongArgsData();
description.album_id = itemHolder.album_id;
description.path_file = itemHolder.path_file;
description.path_art = itemHolder.path_art;
description.position = itemHolder.position;
return description;
}
@Override
public int getItemCount() {
if(mCursorAdapter == null) return 0;
if(mCursorAdapter.getCount() == 0 && query == null) return 1;
return mCursorAdapter.getCount();
}
@Override
public void onBindViewHolder(SongViewHolder holder, int position) {
// Passing the binding operation to cursor loader
if(mCursorAdapter.getCount() == 0) return;
mCursorAdapter.getCursor().moveToPosition(position);
mCursorAdapter.bindView(holder.itemView, mContext, mCursorAdapter.getCursor());
}
@Override
public SongViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
// Passing the inflater job to the cursor-adapter
View v;
SongViewHolder vh;
if (viewType == VIEW_TYPE_SONG) {
v = mCursorAdapter.newView(mContext, mCursorAdapter.getCursor(), parent);
vh = new SongViewHolder(v);
v.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mListener.onSongClick(v, ((SongViewHolder)v.getTag()).position);
}
});
v.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View v) {
mListener.onSongLongClick(v, ((SongViewHolder)v.getTag()).position);
return true;
}
});
} else {
v = LayoutInflater.from(parent.getContext()).inflate(
R.layout.item_songs_empty, parent, false);
vh = new SongViewHolder(v, 0);
}
return vh;
}
private BroadcastReceiver mMessageReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
int status = intent.getIntExtra(TagWriterService.STATUS_BROADCAST_FIELD, 5);
if(status == 0 || status == -1) {
final Handler handler = new Handler();
handler.postDelayed(new Runnable() {
@Override
public void run() {
update();
}
}, 310);
}
}
};
public void update() {
if(mContext == null) return;
int order = PreferenceUtil.getListDisplayOrder(mContext);
int mode = PreferenceUtil.getListDisplayMode(mContext);
Cursor cursor;
if(query != null)
cursor = this.mCursorAdapter.swapCursor(mediaStoreHelper.searchMusic(query));
else
cursor = this.mCursorAdapter.swapCursor(mediaStoreHelper.loadAllSupportedMusic(mode, order));
if(cursor != null && !cursor.isClosed()) cursor.close();
notifyDataSetChanged();
}
private boolean isAttached;
@Override
public void onAttachedToRecyclerView(RecyclerView recyclerView) {
super.onAttachedToRecyclerView(recyclerView);
isAttached = true;
}
@Override
public void onDetachedFromRecyclerView(RecyclerView recyclerView) {
isAttached = false;
if(mCursorAdapter.getCursor() != null && !mCursorAdapter.getCursor().isClosed()) mCursorAdapter.getCursor().close();
mContext.unregisterReceiver(mMessageReceiver);
mMessageReceiver = null;
mCursorAdapter = null;
mContext = null;
mediaStoreHelper = null;
mListener = null;
super.onDetachedFromRecyclerView(recyclerView);
}
}
Custom squared ImageView class
public class SquareImageView extends ImageView {
public SquareImageView(Context context) {
super(context);
}
public SquareImageView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public SquareImageView(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int width = getMeasuredWidth();
setMeasuredDimension(width, width);
}
}
Layout XML:
First
<android.support.design.widget.CoordinatorLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:id="@+id/songCoordinatorLayout"
android:background="?attr/background_color">
<android.support.design.widget.AppBarLayout
android:id="@+id/app_layout_bar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
>
<android.support.design.widget.CollapsingToolbarLayout
android:id="@+id/collapsing_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:expandedTitleTextAppearance="@android:color/transparent"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:contentScrim="?attr/background_color"
>
<uielements.SquareImageView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/songCoverImage"
android:scaleType="centerCrop"
app:layout_collapseMode="pin"
/>
<View
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@drawable/shape_scrim"
android:layout_gravity="top"
android:alpha="0.8" />
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar_actionbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@null"
app:layout_collapseMode="pin"
app:layout_scrollFlags="enterAlways|exitUntilCollapsed">
<include
android:id="@+id/toolbar_header_view"
layout="@layout/toolbar_header_view"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:layout_marginRight="@dimen/header_view_end_margin_right"
android:visibility="gone"
/>
</android.support.v7.widget.Toolbar>
</android.support.design.widget.CollapsingToolbarLayout>
</android.support.design.widget.AppBarLayout>
Adapter item layout example:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:layout_height="70dp"
android:layout_width="match_parent"
android:orientation="vertical"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="?android:attr/selectableItemBackground"
android:clickable="true"
android:focusable="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<ImageView
android:layout_width="70dp"
android:layout_height="70dp"
android:id="@+id/imgArt" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:orientation="vertical"
android:paddingLeft="12dp"
android:paddingRight="12dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textItemTitle"
android:singleLine="true"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/textItemSub"
android:singleLine="true"
android:layout_marginTop="4dp"
android:textAppearance="@android:style/TextAppearance.DeviceDefault.Small" />
</LinearLayout>
</LinearLayout>
<ImageView
android:layout_width="18dp"
android:layout_height="18dp"
android:src="@drawable/ic_memory"
android:visibility="gone"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true" />
</RelativeLayout>
Stack trace / LogCat:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
LineageOS Version: 'unknown'
Build fingerprint: 'samsung/j5lteub/j5lte:6.0.1/MMB29M/J500MUBU1BQH2:user/release-keys'
Revision: '5'
ABI: 'arm'
pid: 10935, tid: 11080, name: glide-source-th >>> com. <<<
signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0x902d8000
r0 a4b3a670 r1 9385e5ec r2 902d8000 r3 00000000
r4 00000075 r5 70edc0cc r6 902d8000 r7 00000000
r8 00000063 r9 94903f00 sl 0000001b fp 00000075
ip b0052537 sp 9385e5e0 lr 73cc09a3 pc b0052536 cpsr 600d0030
backtrace:
#00 pc 002c0536 /system/lib/libart.so (_ZN3artL16Unsafe_putDoubleEP7_JNIEnvP8_jobjectS3_xd+31)
#01 pc 73cc09a1 /data/dalvik-cache/arm/system@[email protected] (offset 0x283e000)
Do you have the complete native stack trace? Does it originate from BitmapFactory? Do you have a sample image that you're able to reproduce this on?
Native crashes are often caused by unrelated OOMs. We've also seen cases where certain versions of Android or certain OEM devices crash when attempting to decode certain images. If the native traces just seem to originate in places where objects are allocated, then it may just be OOMs.
Looking at Google Play Console,this is likely to be the complete stacktrace.
I'm not using BitmapFactory anywhere if this is what you mean.
I don't have specific image samples because they both come from user device and online iTunes API (for this second one the size is always 1100*1100).
Looking at very old crash reports, I could not find this kind of crash in app version that used Glide 3.7.0. The first affected version was Glide 4.0.0 RC0.
I made a cross check between the distribution of app versions, the arise of this problem and code changes between releases of my app. Fortunately I only distributed two versions of the app during that 30-days period and, between those two versions, only few code changes were made: one of them was Glide update from 3.7.0 to 4.0.0-RC0. Now I'm almost completely sure of what I'm saying.
Do you think it's worth to release a version of my app with Glide 3.x and see what happens?
Glide uses BitmapFactory, which has been known to cause native crashes, that's all I meant. I don't have any idea otherwise really. OOM is reasonably likely. Or there's some issue specific to these devices that's related to our usage of framework APIs that use native code. Or you're just getting unlucky... The best I can say is I that I haven't seen this specific error before.
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
Writing here again to confirm that moving back to Glide 3.7 definitely solved the issue.
I can now see many OOM crashes in managed code but they are very fewer compared to Glide 4.6.
If you can't reproduce it in v3, it may be related to the extra scaling that v4 does in Downsampler. Try one of the downsampling only DownsampleStrategys in v4 and see if that also fixes the issue, like: http://bumptech.github.io/glide/javadocs/460/com/bumptech/glide/load/resource/bitmap/DownsampleStrategy.html#AT_LEAST
Going to try it with .downsample(AT_LEAST) parameter and I will let you know.
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
No luck, problem persists.
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
The other possibility is that the OOMs are just occurring in native code and causing native crashes instead of in java code. I don't have a great explanation for why v4 would trigger more native code usage than v3.
This issue has been automatically marked as stale because it has not had activity in the last seven days. It will be closed if no further activity occurs within the next seven days. Thank you for your contributions.
Problem persists on xiaomi. On other devices it`s wokred properly
we're seeing this too since we implemented the latest version of Glide in our app. The crashes seem to be random at best, which may point towards OOM on the system as @sjudd mentioned, tried to reproduce on about 15 different devices but no luck. Any new ideas as to what this may be related to? All i can get from the Play Console crash reports is signal 7 (SIGBUS), code 2 (BUS_ADRERR) in memcpy. thx
This issue still exists exists in 4.9.0. Didn't face with it in 3.7.0 version. Is there any way to catch such kind of exceptions? It crashes the whole app.
Model: SM-A520F
Manufacture: samsung
Device: universal7880 samsung
Device OS: 8.0.0
--------- beginning of crash
09-11 07:35:25.655 16377 16600 F libc : Fatal signal 7 (SIGBUS), code 2, fault addr 0x7d889ac000 in tid 16600 (glide-source-th)
09-11 07:35:25.960 16748 16748 I crash_dump64: obtaining output fd from tombstoned
09-11 07:35:25.963 16748 16748 I crash_dump64: performing dump of process 16377 (target tid = 16600)
09-11 07:35:25.963 16748 16748 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-11 07:35:25.963 16748 16748 F DEBUG : Build fingerprint: 'samsung/a5y17ltexx/a5y17lte:8.0.0/R16NW/A520FXXSBCSH4:user/release-keys'
09-11 07:35:25.963 16748 16748 F DEBUG : Revision: '8'
09-11 07:35:25.963 16748 16748 F DEBUG : ABI: 'arm64'
09-11 07:35:25.963 16748 16748 F DEBUG : pid: 16377, tid: 16600, name: glide-source-th >>> tr.com.turkcell.akillidepo <<<
09-11 07:35:25.963 16748 16748 F DEBUG : signal 7 (SIGBUS), code 2 (BUS_ADRERR), fault addr 0x7d889ac000
09-11 07:35:25.963 16748 16748 F DEBUG : x0 0000007d9283a200 x1 0000007d90401e14 x2 0000007d889ac000 x3 0000000000000000
09-11 07:35:25.963 16748 16748 F DEBUG : x4 0000000000000000 x5 0000000000000000 x6 0000000000000000 x7 000000006f90d060
09-11 07:35:25.963 16748 16748 F DEBUG : x8 0000007d9283a200 x9 0000000000000001 x10 0000000000000000 x11 0000007dbf4b55b0
09-11 07:35:25.963 16748 16748 F DEBUG : x12 0000007dbf4b56c0 x13 0000007dbf4b4eb0 x14 0000007dbf4b4fa0 x15 0000007dbf4b45f0
09-11 07:35:25.964 16748 16748 F DEBUG : x16 0000007d90401e00 x17 0000007dc30f2b10 x18 0000007dbf4b4880 x19 0000007db4a1de00
09-11 07:35:25.964 16748 16748 F DEBUG : x20 0000007dbf365540 x21 0000000013c404f8 x22 000000006f924c80 x23 000000000001ff98
09-11 07:35:25.964 16748 16748 F DEBUG : x24 00000000ffffffa2 x25 000000006f75a938 x26 0000000000001000 x27 0000007d889ac000
09-11 07:35:25.964 16748 16748 F DEBUG : x28 0000000000000001 x29 0000007d90401f48 x30 0000000070dd4938
09-11 07:35:25.964 16748 16748 F DEBUG : sp 0000007d90401e00 pc 0000007dbf365540 pstate 0000000080000000
09-11 07:35:26.116 16748 16748 F DEBUG :
09-11 07:35:26.116 16748 16748 F DEBUG : backtrace:
09-11 07:35:26.116 16748 16748 F DEBUG : #00 pc 00000000003c0540 /system/lib64/libart.so (_ZN3artL15Unsafe_getByteJEP7_JNIEnvP8_jobjectl)
09-11 07:35:26.116 16748 16748 F DEBUG : #01 pc 00000000006f8934 /system/framework/arm64/boot.oat (offset 0x1dc000) (sun.misc.Unsafe.getByte+132)
09-11 07:35:26.116 16748 16748 F DEBUG : #02 pc 0000000000360f48 /system/framework/arm64/boot.oat (offset 0x1dc000) (java.nio.MappedByteBuffer.load+936)
09-11 07:35:26.116 16748 16748 F DEBUG : #03 pc 0000000000507f84 /system/lib64/libart.so (art_quick_invoke_stub+580)
09-11 07:35:26.116 16748 16748 F DEBUG : #04 pc 00000000000d84f4 /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+200)
09-11 07:35:26.116 16748 16748 F DEBUG : #05 pc 0000000000282054 /system/lib64/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+352)
09-11 07:35:26.116 16748 16748 F DEBUG : #06 pc 000000000027c71c /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+672)
09-11 07:35:26.116 16748 16748 F DEBUG : #07 pc 00000000004f28a4 /system/lib64/libart.so (MterpInvokeVirtualQuick+680)
09-11 07:35:26.116 16748 16748 F DEBUG : #08 pc 00000000004fd614 /system/lib64/libart.so (ExecuteMterpImpl+29972)
09-11 07:35:26.116 16748 16748 F DEBUG : #09 pc 000000000025d498 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
09-11 07:35:26.116 16748 16748 F DEBUG : #10 pc 00000000004e3600 /system/lib64/libart.so (artQuickToInterpreterBridge+1468)
09-11 07:35:26.116 16748 16748 F DEBUG : #11 pc 000000000051141c /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
09-11 07:35:26.116 16748 16748 F DEBUG : #12 pc 0000000000508238 /system/lib64/libart.so (art_quick_invoke_static_stub+600)
09-11 07:35:26.116 16748 16748 F DEBUG : #13 pc 00000000000d8530 /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+260)
09-11 07:35:26.116 16748 16748 F DEBUG : #14 pc 0000000000282054 /system/lib64/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+352)
09-11 07:35:26.116 16748 16748 F DEBUG : #15 pc 000000000027c71c /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+672)
09-11 07:35:26.116 16748 16748 F DEBUG : #16 pc 00000000004f0ca4 /system/lib64/libart.so (MterpInvokeStatic+468)
09-11 07:35:26.116 16748 16748 F DEBUG : #17 pc 00000000004f9a14 /system/lib64/libart.so (ExecuteMterpImpl+14612)
09-11 07:35:26.116 16748 16748 F DEBUG : #18 pc 000000000025d498 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
09-11 07:35:26.116 16748 16748 F DEBUG : #19 pc 0000000000263b98 /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
09-11 07:35:26.116 16748 16748 F DEBUG : #20 pc 000000000027c6fc /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
09-11 07:35:26.116 16748 16748 F DEBUG : #21 pc 00000000004f06cc /system/lib64/libart.so (MterpInvokeInterface+1732)
09-11 07:35:26.116 16748 16748 F DEBUG : #22 pc 00000000004f9a94 /system/lib64/libart.so (ExecuteMterpImpl+14740)
09-11 07:35:26.116 16748 16748 F DEBUG : #23 pc 000000000025d498 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
09-11 07:35:26.116 16748 16748 F DEBUG : #24 pc 0000000000263b98 /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
09-11 07:35:26.116 16748 16748 F DEBUG : #25 pc 000000000027c6fc /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
09-11 07:35:26.116 16748 16748 F DEBUG : #26 pc 00000000004f06cc /system/lib64/libart.so (MterpInvokeInterface+1732)
09-11 07:35:26.116 16748 16748 F DEBUG : #27 pc 00000000004f9a94 /system/lib64/libart.so (ExecuteMterpImpl+14740)
09-11 07:35:26.116 16748 16748 F DEBUG : #28 pc 000000000025d498 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
09-11 07:35:26.116 16748 16748 F DEBUG : #29 pc 0000000000263b98 /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
09-11 07:35:26.116 16748 16748 F DEBUG : #30 pc 000000000027c6fc /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
09-11 07:35:26.116 16748 16748 F DEBUG : #31 pc 00000000004f09ec /system/lib64/libart.so (MterpInvokeDirect+504)
09-11 07:35:26.117 16748 16748 F DEBUG : #32 pc 00000000004f9994 /system/lib64/libart.so (ExecuteMterpImpl+14484)
09-11 07:35:26.117 16748 16748 F DEBUG : #33 pc 000000000025d498 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
09-11 07:35:26.117 16748 16748 F DEBUG : #34 pc 0000000000263b98 /system/lib64/libart.so (_ZN3art11interpreter33ArtInterpreterToInterpreterBridgeEPNS_6ThreadEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+212)
09-11 07:35:26.117 16748 16748 F DEBUG : #35 pc 000000000027c6fc /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+640)
09-11 07:35:26.117 16748 16748 F DEBUG : #36 pc 00000000004f09ec /system/lib64/libart.so (MterpInvokeDirect+504)
09-11 07:35:26.117 16748 16748 F DEBUG : #37 pc 00000000004f9994 /system/lib64/libart.so (ExecuteMterpImpl+14484)
09-11 07:35:26.117 16748 16748 F DEBUG : #38 pc 000000000025d498 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
09-11 07:35:26.117 16748 16748 F DEBUG : #39 pc 00000000004e3600 /system/lib64/libart.so (artQuickToInterpreterBridge+1468)
09-11 07:35:26.117 16748 16748 F DEBUG : #40 pc 000000000051141c /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
09-11 07:35:26.117 16748 16748 F DEBUG : #41 pc 00000000005ec91c /system/framework/arm64/boot.oat (offset 0x1dc000) (java.util.concurrent.ThreadPoolExecutor.runWorker+1084)
09-11 07:35:26.117 16748 16748 F DEBUG : #42 pc 00000000005fb434 /system/framework/arm64/boot.oat (offset 0x1dc000) (java.util.concurrent.ThreadPoolExecutor$Worker.run+68)
09-11 07:35:26.117 16748 16748 F DEBUG : #43 pc 00000000001fcc0c /system/framework/arm64/boot.oat (offset 0x1dc000) (java.lang.Thread.run+76)
09-11 07:35:26.117 16748 16748 F DEBUG : #44 pc 0000000000507f84 /system/lib64/libart.so (art_quick_invoke_stub+580)
09-11 07:35:26.117 16748 16748 F DEBUG : #45 pc 00000000000d84f4 /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+200)
09-11 07:35:26.117 16748 16748 F DEBUG : #46 pc 0000000000282054 /system/lib64/libart.so (_ZN3art11interpreter34ArtInterpreterToCompiledCodeBridgeEPNS_6ThreadEPNS_9ArtMethodEPKNS_7DexFile8CodeItemEPNS_11ShadowFrameEPNS_6JValueE+352)
09-11 07:35:26.117 16748 16748 F DEBUG : #47 pc 000000000027c71c /system/lib64/libart.so (_ZN3art11interpreter6DoCallILb0ELb0EEEbPNS_9ArtMethodEPNS_6ThreadERNS_11ShadowFrameEPKNS_11InstructionEtPNS_6JValueE+672)
09-11 07:35:26.117 16748 16748 F DEBUG : #48 pc 00000000004efd04 /system/lib64/libart.so (MterpInvokeSuper+1440)
09-11 07:35:26.117 16748 16748 F DEBUG : #49 pc 00000000004f9914 /system/lib64/libart.so (ExecuteMterpImpl+14356)
09-11 07:35:26.117 16748 16748 F DEBUG : #50 pc 000000000025d498 /system/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadEPKNS_7DexFile8CodeItemERNS_11ShadowFrameENS_6JValueEb+444)
09-11 07:35:26.117 16748 16748 F DEBUG : #51 pc 00000000004e3600 /system/lib64/libart.so (artQuickToInterpreterBridge+1468)
09-11 07:35:26.117 16748 16748 F DEBUG : #52 pc 000000000051141c /system/lib64/libart.so (art_quick_to_interpreter_bridge+92)
09-11 07:35:26.117 16748 16748 F DEBUG : #53 pc 0000000000507f84 /system/lib64/libart.so (art_quick_invoke_stub+580)
09-11 07:35:26.117 16748 16748 F DEBUG : #54 pc 00000000000d84f4 /system/lib64/libart.so (_ZN3art9ArtMethod6InvokeEPNS_6ThreadEPjjPNS_6JValueEPKc+200)
09-11 07:35:26.117 16748 16748 F DEBUG : #55 pc 0000000000430718 /system/lib64/libart.so (_ZN3artL18InvokeWithArgArrayERKNS_33ScopedObjectAccessAlreadyRunnableEPNS_9ArtMethodEPNS_8ArgArrayEPNS_6JValueEPKc+104)
09-11 07:35:26.117 16748 16748 F DEBUG : #56 pc 00000000004318a4 /system/lib64/libart.so (_ZN3art35InvokeVirtualOrInterfaceWithJValuesERKNS_33ScopedObjectAccessAlreadyRunnableEP8_jobjectP10_jmethodIDP6jvalue+432)
09-11 07:35:26.117 16748 16748 F DEBUG : #57 pc 00000000004578ec /system/lib64/libart.so (_ZN3art6Thread14CreateCallbackEPv+1140)
09-11 07:35:26.117 16748 16748 F DEBUG : #58 pc 0000000000067d04 /system/lib64/libc.so (_ZL15__pthread_startPv+200)
09-11 07:35:26.117 16748 16748 F DEBUG : #59 pc 000000000001f348 /system/lib64/libc.so (__start_thread+68)
Can confirm, i have a lot of such native crashes in production app. I use glide 4.9.0. Don't know what to do with it.
Most helpful comment
Problem persists on xiaomi. On other devices it`s wokred properly