Anki-Android icon indicating copy to clipboard operation
Anki-Android copied to clipboard

[Bug] CardBrowser Scroll Issue 8821

Open david-allison opened this issue 2 years ago • 8 comments

Reproduction Steps
  1. Open card browser
  2. Switch from follow system to "Light"
com.ichi2.anki.exception.ManuallyReportedException: CardBrowser Scroll Issue 8821
	at com.ichi2.anki.CrashReportService.sendExceptionReport(SourceFile:1)
	at com.ichi2.anki.CardBrowser$RenderOnScroll.onScroll(SourceFile:66)
	at android.widget.AbsListView.invokeOnItemScrollListener(AbsListView.java:1716)
	at android.widget.AbsListView.setOnScrollListener(AbsListView.java:1702)
	at com.ichi2.anki.CardBrowser.onCreate(SourceFile:258)
	at android.app.Activity.performCreate(Activity.java:8944)
	at android.app.Activity.performCreate(Activity.java:8913)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1456)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4146)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4322)
	at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:6493)
	at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:6377)
	at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:76)
	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96)
	at android.app.ClientTransactionHandler.executeTransaction(ClientTransactionHandler.java:68)
	at android.app.ActivityThread.handleRelaunchActivityLocally(ActivityThread.java:6453)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2695)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:230)
	at android.os.Looper.loop(Looper.java:319)
	at android.app.ActivityThread.main(ActivityThread.java:8893)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:608)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)

https://ankidroid.org/acra/app/1/bug/109835/report/71092432-97df-4524-a2d3-9eb6eec6f1b5

  • Related: #8821

david-allison avatar Feb 07 '24 15:02 david-allison

Could you be more descriptive with the reproduction steps? I couldn't reproduce it with what I understood

BrayanDSO avatar Feb 07 '24 22:02 BrayanDSO

Hmm... can't reproduce any more

david-allison avatar Feb 07 '24 23:02 david-allison

Tried:

  • Open card browser
  • Scroll down
  • Tap a card to edit
  • Switch to night mode
  • return to browser

Can only reproduce some times

Note that after a couple of tries, ACRA rate limiting kicks in and no log messages are produced

david-allison avatar Feb 07 '24 23:02 david-allison

Long-term fix: use SavedStateHandle in the ViewModel

david-allison avatar Feb 15 '24 17:02 david-allison

Long-term fix: use SavedStateHandle in the ViewModel

I want to try it

CyberButton avatar Apr 01 '24 16:04 CyberButton

Long-term fix: use SavedStateHandle in the ViewModel

Can you please clarify what exactly to store in the SavedStateHandle ?

CyberButton avatar Apr 01 '24 18:04 CyberButton

Scroll position may need to be saved if we're having issues with a refresh during onResume (this may be necessary if a user performs actions via the API which modify cards)

david-allison avatar Apr 01 '24 20:04 david-allison

Hello 👋, this issue has been opened for more than 3 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like still searching for solutions and if you found one, please open a pull request! You have 7 days until this gets closed automatically

github-actions[bot] avatar Aug 11 '24 21:08 github-actions[bot]