Skip to content
New issue

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

sporadic app crashes when picking a custom emoji during post creation #328

Open
Stefan240 opened this issue Jan 6, 2024 · 4 comments
Open
Labels
bug Something isn't working

Comments

@Stefan240
Copy link

Stefan240 commented Jan 6, 2024

First some words on my setup. My instance runs akkoma on the stable branch and moshidons seems to do really great normally.

Describe the bug

The app tends to sporadically crash when I type in a shortcode for a custom-emoji. Normally I don't type out the whole name of the emoji but for a blobcat I would use something like :blob and then pick the correct emote I want. Sometimes but not reliably the app would crash for me. Funnily enough the app now that I am writing this report refuses to crash because of course lol.

To reproduce

Steps to reproduce the behavior:

  1. start writing a reply or post
  2. start searching for a custom-emoji you want to add to the post by typing :someemojiname
  3. Pick emoji from given list.
  4. App crashes sometimes.

Does this happen in the official app?

There is not really an official app for akkoma and mastodons app is not really usuable for this. I did not try megalodon though. The function does work as expected on the web-frontend akkoma-fe though.

Version

Moshidon version: [e.g. v2.1.4+fork.103.moshinda]

Crash log

btw thank your for adding the ability to collect crash logs so easily ❤️ This one is the most recent I got. i wanted it to crash again before posting just to be safe but it kinda is behaving atm.

2.1.4+fork.103.moshinda (103)
2024-01-06T08:12:26.279Z

java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid view holder adapter positionEmojiViewHolder{88b8882 position=8 id=-1, oldPos=-1, pLpos:-1 no parent} me.grishka.appkit.views.UsableRecyclerView{3906585 VFED..... ......ID 0,0-720,105}, adapter:me.grishka.appkit.utils.MergeRecyclerAdapter@dc998c1, layout:androidx.recyclerview.widget.LinearLayoutManager@1a70866, context:org.joinmastodon.android.MainActivity@d91d7a7
	at androidx.recyclerview.widget.RecyclerView$Recycler.validateViewHolderForOffsetPosition(RecyclerView.java:6159)
	at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6342)
	at androidx.recyclerview.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:287)
	at androidx.recyclerview.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:344)
	at androidx.recyclerview.widget.GapWorker.flushTasksWithDeadline(GapWorker.java:360)
	at androidx.recyclerview.widget.GapWorker.prefetch(GapWorker.java:367)
	at androidx.recyclerview.widget.GapWorker.run(GapWorker.java:398)
	at android.os.Handler.handleCallback(Handler.java:942)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:201)
	at android.os.Looper.loop(Looper.java:288)
	at android.app.ActivityThread.main(ActivityThread.java:7924)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
@Stefan240 Stefan240 added the bug Something isn't working label Jan 6, 2024
@Stefan240
Copy link
Author

This is seems also to be an issue with megalodon. See here: sk22#920

@nodeunit
Copy link

nodeunit commented Feb 17, 2024

I can confirm similar behavior when using the emoji picker or @ mention search. Usually it is triggered if I invoke the emoji picker with :, start writing the name of an emoji, and then start deleting text. It is guaranteed to crash if I fully dismiss the picker bar by deleting all text, and then shortly after invoke emoji search again.

Here's my logs:

2.1.4+fork.104.moshinda (104) 2024-02-17T06:54:38.775Z

java.lang.IllegalStateException: Can only create one instance of the view holder. parent=me.grishka.appkit.views.UsableRecyclerView{46c1dac VFED..... ......I. 0,0-1080,131}, viewType=47 at me.grishka.appkit.utils.SingleViewRecyclerAdapter.onCreateViewHolder(SingleViewRecyclerAdapter.java:24) at me.grishka.appkit.utils.SingleViewRecyclerAdapter.onCreateViewHolder(SingleViewRecyclerAdapter.java:9) at me.grishka.appkit.utils.MergeRecyclerAdapter.onCreateViewHolder(MergeRecyclerAdapter.java:118) at androidx.recyclerview.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:7297) at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6419) at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6303) at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6299) at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2328) at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1629) at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1589) at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:666) at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4300) at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4003) at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4569) at android.view.View.layout(View.java:22466) at android.view.ViewGroup.layout(ViewGroup.java:6304) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:22466) at android.view.ViewGroup.layout(ViewGroup.java:6304) 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:22466) at android.view.ViewGroup.layout(ViewGroup.java:6304) 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:22466) at android.view.ViewGroup.layout(ViewGroup.java:6304) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:22466) at android.view.ViewGroup.layout(ViewGroup.java:6304) 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:22466) at android.view.ViewGroup.layout(ViewGroup.java:6304) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:22466) at android.view.ViewGroup.layout(ViewGroup.java:6304) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:22466) at android.view.ViewGroup.layout(ViewGroup.java:6304) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:22466) at android.view.ViewGroup.layout(ViewGroup.java:6304) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332) at android.widget.FrameLayout.onLayout(FrameLayout.java:270) at android.view.View.layout(View.java:22466) at android.view.ViewGroup.layout(ViewGroup.java:6304) 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:779) at android.view.View.layout(View.java:22466) at android.view.ViewGroup.layout(ViewGroup.java:6304) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:3157) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2614) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1745) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7768) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:967) at android.view.Choreographer.doCallbacks(Choreographer.java:791) at android.view.Choreographer.doFrame(Choreographer.java:726) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

@EngineerDali
Copy link

Can confirm it's still happening

2.3.0+fork.105.moshinda (105)
2024-06-09T11:22:25.736Z

java.lang.IllegalArgumentException: start=368 > end=69 at me.grishka.appkit.imageloader.ListImageLoader.loadRange(ListImageLoader.java:48) at me.grishka.appkit.imageloader.ListImageLoader.loadRange(ListImageLoader.java:43) at me.grishka.appkit.imageloader.ListImageLoaderWrapper.onScroll(ListImageLoaderWrapper.java:258) at me.grishka.appkit.imageloader.RecyclerViewDelegate$1.onScrolled(RecyclerViewDelegate.java:84) at androidx.recyclerview.widget.RecyclerView.dispatchOnScrolled(RecyclerView.java:5334) at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:4396) at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:4022) at androidx.recyclerview.widget.RecyclerView.consumePendingUpdateOperations(RecyclerView.java:2021) at androidx.recyclerview.widget.RecyclerView.scrollByInternal(RecyclerView.java:2060) at androidx.recyclerview.widget.RecyclerView.scrollBy(RecyclerView.java:1873) at org.joinmastodon.android.ui.utils.UiUtils.updateList(UiUtils.java:1004) at org.joinmastodon.android.ui.viewcontrollers.ComposeAutocompleteViewController.setText(ComposeAutocompleteViewController.java:220) at org.joinmastodon.android.fragments.ComposeFragment.onSelectionChanged(ComposeFragment.java:1797) at org.joinmastodon.android.ui.views.ComposeEditText.onSelectionChanged(ComposeEditText.java:46) at android.widget.TextView.spanChange(TextView.java:11996) at android.widget.TextView$ChangeWatcher.onSpanChanged(TextView.java:15278) at android.text.SpannableStringBuilder.sendSpanChanged(SpannableStringBuilder.java:1317) at android.text.SpannableStringBuilder.sendToSpanWatchers(SpannableStringBuilder.java:661) at android.text.SpannableStringBuilder.replace(SpannableStringBuilder.java:590) at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:231) at android.text.SpannableStringBuilder.delete(SpannableStringBuilder.java:38) at android.text.method.BaseKeyListener.backspaceOrForwardDelete(BaseKeyListener.java:376) at android.text.method.BaseKeyListener.backspace(BaseKeyListener.java:71) at android.text.method.BaseKeyListener.onKeyDown(BaseKeyListener.java:485) at android.text.method.QwertyKeyListener.onKeyDown(QwertyKeyListener.java:362) at android.text.method.TextKeyListener.onKeyDown(TextKeyListener.java:141) at android.widget.TextView.doKeyDown(TextView.java:9479) at android.widget.TextView.onKeyDown(TextView.java:9244) at android.view.KeyEvent.dispatch(KeyEvent.java:3624) at android.view.View.dispatchKeyEvent(View.java:15050) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1986) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1986) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1986) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1986) at android.widget.ScrollView.dispatchKeyEvent(ScrollView.java:740) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1986) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1986) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1986) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1986) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1986) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1986) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1986) at android.view.ViewGroup.dispatchKeyEvent(ViewGroup.java:1986) at com.android.internal.policy.DecorView.superDispatchKeyEvent(DecorView.java:901) at com.android.internal.policy.PhoneWindow.superDispatchKeyEvent(PhoneWindow.java:1947) at android.app.Activity.dispatchKeyEvent(Activity.java:4142) at me.grishka.appkit.FragmentStackActivity.dispatchKeyEvent(FragmentStackActivity.java:309) at com.android.internal.policy.DecorView.dispatchKeyEvent(DecorView.java:756) at android.view.ViewRootImpl$ViewPostImeInputStage.processKeyEvent(ViewRootImpl.java:7365) at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:7191) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6595) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6652) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6618) at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:6786) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6626) at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:6843) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6599) at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:6652) at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:6618) at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:6626) at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:6599) at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:9880) at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:9718) at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:9671) at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:6206) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:246) at android.app.ActivityThread.main(ActivityThread.java:8653) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)

@LucasGGamerM
Copy link
Owner

I love recycler views :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants