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

[Bug] CardBrowser Scroll Issue 8821 #15441

Open
david-allison opened this issue Feb 7, 2024 · 7 comments
Open

[Bug] CardBrowser Scroll Issue 8821 #15441

david-allison opened this issue Feb 7, 2024 · 7 comments
Labels
2.17 Bug Help Wanted Requesting Pull Requests from volunteers Needs Triage
Milestone

Comments

@david-allison
Copy link
Member

david-allison commented Feb 7, 2024

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

@david-allison david-allison added 2.17 Bug Help Wanted Requesting Pull Requests from volunteers Reproduced This bug has been reproduced by a maintainer labels Feb 7, 2024
@david-allison david-allison added this to the 2.17 release milestone Feb 7, 2024
@BrayanDSO
Copy link
Member

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

@david-allison
Copy link
Member Author

Hmm... can't reproduce any more

@david-allison david-allison added Needs Triage and removed Reproduced This bug has been reproduced by a maintainer labels Feb 7, 2024
@david-allison david-allison self-assigned this Feb 7, 2024
@david-allison
Copy link
Member Author

david-allison commented Feb 7, 2024

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 david-allison removed their assignment Feb 8, 2024
@david-allison
Copy link
Member Author

Long-term fix: use SavedStateHandle in the ViewModel

@CyberButton
Copy link
Contributor

Long-term fix: use SavedStateHandle in the ViewModel

I want to try it

@CyberButton
Copy link
Contributor

Long-term fix: use SavedStateHandle in the ViewModel

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

@david-allison
Copy link
Member Author

david-allison commented Apr 1, 2024

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)

@CyberButton CyberButton mentioned this issue Apr 2, 2024
3 tasks
@mikehardy mikehardy modified the milestones: 2.18 release, 2.19 release May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.17 Bug Help Wanted Requesting Pull Requests from volunteers Needs Triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants