FastHub-RE icon indicating copy to clipboard operation
FastHub-RE copied to clipboard

Crash scrolling feed

Open Efreak opened this issue 3 years ago • 2 comments

I get this crash while scrolling my feed in the app, took quite a while to track it down. Going by the error, I'm guessing it's an issue with a release. I'm trying now to figure out which release it is.

07-05 00:42:26.932 21654 21654 E AndroidRuntime: FATAL EXCEPTION: main[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: Process: com.fastaccess.github.revival, PID: 21654[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: java.lang.NullPointerException: release!!.name must not be null[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at com.fastaccess.ui.adapter.viewholder.FeedsViewHolder.appendReleaseEvent(FeedsViewHolder.kt:168)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at com.fastaccess.ui.adapter.viewholder.FeedsViewHolder.bind(FeedsViewHolder.kt:101)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at com.fastaccess.ui.adapter.FeedsAdapter.onBindView(FeedsAdapter.kt:23)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at com.fastaccess.ui.adapter.FeedsAdapter.onBindView(FeedsAdapter.kt:12)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at com.fastaccess.ui.base.adapter.BaseRecyclerAdapter.onBindViewHolder(BaseRecyclerAdapter.kt:113)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at com.fastaccess.ui.base.adapter.BaseRecyclerAdapter.onBindViewHolder(BaseRecyclerAdapter.kt:18)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(RecyclerView.java:7254)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(RecyclerView.java:7337)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(RecyclerView.java:6194)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6460)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at androidx.recyclerview.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:288)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at androidx.recyclerview.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:345)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at androidx.recyclerview.widget.GapWorker.flushTasksWithDeadline(GapWorker.java:361)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at androidx.recyclerview.widget.GapWorker.prefetch(GapWorker.java:368)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at androidx.recyclerview.widget.GapWorker.run(GapWorker.java:399)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:938)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:226)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:313)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8663)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:567)[0m
07-05 00:42:26.932 21654 21654 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135)[0m

Efreak avatar Jul 05 '22 09:07 Efreak

It seems a release uses a non ASCII character, maybe an emoji?

Why should anyone include an emoji on the release name?

To fix it we should sanitize the release name before updating the view

LightDestory avatar Jul 05 '22 09:07 LightDestory

It seems a release uses a non ASCII character, maybe an emoji?

Why should anyone include an emoji on the release name?

To fix it we should sanitize the release name before updating the view

I myself use emojis in release name, its fun.

Instead of sanitizing I would suggest you simple add support with the help of emoji library with is an extension library for app-compat library

Iamlooker avatar Aug 03 '22 11:08 Iamlooker