sk22 / megalodon

Pink modification of the official Mastodon for Android app
https://sk22.github.io/megalodon
GNU General Public License v3.0
551 stars 32 forks source link

crash when searching @ #986

Open kat8918 opened 8 months ago

kat8918 commented 8 months ago

Describe the bug

when i type @ into the search the app crashes

To reproduce

Steps to reproduce the behavior:

  1. Go to the search box
  2. type the @ symbol
  3. See error

Does this happen in the official app?

doesn't happen in the mastodon app

Screenshots and screen recordings

https://github.com/sk22/megalodon/assets/141296990/24d88869-2d42-4d35-b9d2-78953f5f5722

Version

Megalodon version: 2.1.6+fork.110 (110)

Crash log

2.1.6+fork.110 (110) 2024-03-11T11:33:51.226Z

android.content.res.Resources$NotFoundException: String resource ID #0x0 at android.content.res.Resources.getText(Resources.java:444) at android.widget.TextView.setText(TextView.java:6461) at org.joinmastodon.android.ui.viewholders.ListItemViewHolder.onBind(SourceFile:37) at org.joinmastodon.android.ui.viewholders.ListItemViewHolder.onBind(SourceFile:20) at me.grishka.appkit.utils.BindableViewHolder.bind(SourceFile:33) at org.joinmastodon.android.fragments.discover.SearchQueryFragment$SearchResultsAdapter.onBindViewHolder(SourceFile:560) at me.grishka.appkit.utils.MergeRecyclerAdapter.onBindViewHolder(SourceFile:123) at me.grishka.appkit.views.UsableRecyclerView$FooterRecyclerAdapter.onBindViewHolder(SourceFile:433) at androidx.recyclerview.widget.RecyclerView$Adapter.onBindViewHolder(SourceFile:7256) at androidx.recyclerview.widget.RecyclerView$Adapter.bindViewHolder(SourceFile:7339) at androidx.recyclerview.widget.RecyclerView$Recycler.tryBindViewHolderByDeadline(SourceFile:6197) at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(SourceFile:6463) at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(SourceFile:6303) at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(SourceFile:6299) at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(SourceFile:2328) at androidx.recyclerview.widget.GridLayoutManager.layoutChunk(SourceFile:571) at androidx.recyclerview.widget.LinearLayoutManager.fill(SourceFile:1589) at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(SourceFile:666) at androidx.recyclerview.widget.GridLayoutManager.onLayoutChildren(SourceFile:169) at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(SourceFile:4300) at androidx.recyclerview.widget.RecyclerView.dispatchLayout(SourceFile:4003) at androidx.recyclerview.widget.RecyclerView.onLayout(SourceFile:4569) at android.view.View.layout(View.java:22900) at android.view.ViewGroup.layout(ViewGroup.java:6389) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:22900) at android.view.ViewGroup.layout(ViewGroup.java:6389) at androidx.swiperefreshlayout.widget.SwipeRefreshLayout.onLayout(SourceFile:671) at android.view.View.layout(View.java:22900) at android.view.ViewGroup.layout(ViewGroup.java:6389) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:22900) at android.view.ViewGroup.layout(ViewGroup.java:6389) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1829) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1673) at android.widget.LinearLayout.onLayout(LinearLayout.java:1582) at android.view.View.layout(View.java:22900) at android.view.ViewGroup.layout(ViewGroup.java:6389) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:22900) at android.view.ViewGroup.layout(ViewGroup.java:6389) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:22900) at android.view.ViewGroup.layout(ViewGroup.java:6389) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:22900) at android.view.ViewGroup.layout(ViewGroup.java:6389) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:22900) at android.view.ViewGroup.layout(ViewGroup.java:6389) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at com.android.internal.policy.DecorView.onLayout(DecorView.java:831) at android.view.View.layout(View.java:22900) at android.view.ViewGroup.layout(ViewGroup.java:6389) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3607) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3075) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2048) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8409) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:972) at android.view.Choreographer.doCallbacks(Choreographer.java:796) at android.view.Choreographer.doFrame(Choreographer.java:731) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:957) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:250) at android.app.ActivityThread.main(ActivityThread.java:7877) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:958)

nrgeen commented 7 months ago

Same Here:

Crash Log:

2.1.6+fork.110 (110)
2024-04-27T05:38:24.317Z

java.lang.IllegalStateException: Can only create one instance of the view holder. parent=me.grishka.appkit.views.UsableRecyclerView{3685fca VFED..... ......I. 0,0-1080,147 aid=1073742622}, viewType=45
    at me.grishka.appkit.utils.SingleViewRecyclerAdapter.onCreateViewHolder(SourceFile:24)
    at me.grishka.appkit.utils.SingleViewRecyclerAdapter.onCreateViewHolder(SourceFile:9)
    at me.grishka.appkit.utils.MergeRecyclerAdapter.onCreateViewHolder(SourceFile:118)
    at androidx.recyclerview.widget.RecyclerView$Adapter.createViewHolder(SourceFile:7297)
    at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(SourceFile:6419)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(SourceFile:6303)
    at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(SourceFile:6299)
    at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(SourceFile:2328)
    at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(SourceFile:1629)
    at androidx.recyclerview.widget.LinearLayoutManager.fill(SourceFile:1589)
    at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(SourceFile:666)
    at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(SourceFile:4300)
    at androidx.recyclerview.widget.RecyclerView.dispatchLayout(SourceFile:4003)
    at androidx.recyclerview.widget.RecyclerView.onLayout(SourceFile:4569)
    at android.view.View.layout(View.java:24722)
    at android.view.ViewGroup.layout(ViewGroup.java:6450)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
    at android.view.View.layout(View.java:24722)
    at android.view.ViewGroup.layout(ViewGroup.java:6450)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
    at android.view.View.layout(View.java:24722)
    at android.view.ViewGroup.layout(ViewGroup.java:6450)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
    at android.view.View.layout(View.java:24722)
    at android.view.ViewGroup.layout(ViewGroup.java:6450)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
    at android.view.View.layout(View.java:24722)
    at android.view.ViewGroup.layout(ViewGroup.java:6450)
    at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
    at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
    at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
    at android.view.View.layout(View.java:24722)
    at android.view.ViewGroup.layout(ViewGroup.java:6450)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
    at android.view.View.layout(View.java:24722)
    at android.view.ViewGroup.layout(ViewGroup.java:6450)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
    at android.view.View.layout(View.java:24722)
    at android.view.ViewGroup.layout(ViewGroup.java:6450)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
    at android.view.View.layout(View.java:24722)
    at android.view.ViewGroup.layout(ViewGroup.java:6450)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
    at android.view.View.layout(View.java:24722)
    at android.view.ViewGroup.layout(ViewGroup.java:6450)
    at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
    at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
    at com.android.internal.policy.DecorView.onLayout(DecorView.java:807)
    at android.view.View.layout(View.java:24722)
    at android.view.ViewGroup.layout(ViewGroup.java:6450)
    at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:4485)
    at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3786)
    at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2659)
    at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9789)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1399)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1408)
    at android.view.Choreographer.doCallbacks(Choreographer.java:1008)
    at android.view.Choreographer.doFrame(Choreographer.java:938)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1382)
    at android.os.Handler.handleCallback(Handler.java:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8501)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)