Giter Site home page Giter Site logo

Comments (13)

BrayanDSO avatar BrayanDSO commented on June 11, 2024 1

I suggest adding more logs into CardMediaPlayer, PreviewerFragment and PreviewerViewModel in the code paths that can result in a sound being played

from anki-android.

oyeraghib avatar oyeraghib commented on June 11, 2024

@david-allison any ways to reproduce it? So I can test manually once.

from anki-android.

david-allison avatar david-allison commented on June 11, 2024

That's the first step

from anki-android.

david-allison avatar david-allison commented on June 11, 2024
-- beginning of main
04-30 07:22:54.214 I/AnkiDroid(21266): Timber config: PRODUCTION
04-30 07:22:54.216 I/AnkiDroid(21266): initialize()
04-30 07:22:54.519 I/AnkiDroid(21266): Not participating in analytics sample (sample percentage vs random: 10 43)
04-30 07:22:54.519 I/AnkiDroid(21266): setOptIn(): from false to true
04-30 07:22:54.519 I/AnkiDroid(21266): Not participating in analytics sample (sample percentage vs random: 10 72)
04-30 07:22:54.639 I/AnkiDroid(21266): Creating notification channel with id/name: General Notifications/AnkiDroid
04-30 07:22:54.640 I/AnkiDroid(21266): Creating notification channel with id/name: Synchronization/Sincronização
04-30 07:22:54.641 I/AnkiDroid(21266): Creating notification channel with id/name: Global Reminders/Cartões pendentes
04-30 07:22:54.641 I/AnkiDroid(21266): Creating notification channel with id/name: Deck Reminders/Lembretes
04-30 07:22:54.641 I/AnkiDroid(21266): Creating notification channel with id/name: Scoped Storage/Migração do armazenamento
04-30 07:22:54.650 I/AnkiDroid(21266): AnkiDroidApp: Starting Services
04-30 07:22:54.651 W/AnkiDroid(21266): AnkiDroidApp/ Boot Service did not execute - no permissions
04-30 07:22:54.677 I/AnkiDroid(21266): Setting theme to LIGHT
04-30 07:22:54.697 I/AnkiDroid(21266): CardViewerActivity::onCreate
04-30 07:22:54.707 I/AnkiDroid(21266): CardViewerActivity::PreviewerFragment::onAttach
04-30 07:22:54.708 I/AnkiDroid(21266): CardViewerActivity::PreviewerFragment::onCreate
04-30 07:22:54.725 I/AnkiDroid(21266): CardViewerActivity::onStart
04-30 07:22:54.902 I/AnkiDroid(21266): CardViewerActivity::PreviewerFragment::onViewCreated
04-30 07:22:54.913 I/AnkiDroid(21266): CardViewerActivity::PreviewerFragment::onStart
04-30 07:22:54.929 I/AnkiDroid(21266): (Re)opening Database: /storage/emulated/0/Android/data/com.ichi2.anki/files/AnkiDroid/collection.anki2
04-30 07:22:54.946 I/AnkiDroid(21266): CardViewerActivity::onResume
04-30 07:22:54.951 I/AnkiDroid(21266): CardViewerActivity::PreviewerFragment::onResume
04-30 07:22:55.013 I/AnkiDroid(21266): AnkiDroid Version = 2.18beta1 (c12b398c216dc2a2c2e2c98709c92132d19d105c)
04-30 07:22:55.013 I/AnkiDroid(21266): 
04-30 07:22:55.013 I/AnkiDroid(21266): Backend Version = 0.1.38-anki24.04.1 (24.04.1 ccd9ca1a8309b80bcb50ddc5d99c7ce63440bce9)
04-30 07:22:55.013 I/AnkiDroid(21266): 
04-30 07:22:55.013 I/AnkiDroid(21266): Android Version = 13 (SDK 33)
04-30 07:22:55.013 I/AnkiDroid(21266): 
04-30 07:22:55.013 I/AnkiDroid(21266): ProductFlavor = play
04-30 07:22:55.013 I/AnkiDroid(21266): 
04-30 07:22:55.013 I/AnkiDroid(21266): Manufacturer = Xiaomi
04-30 07:22:55.013 I/AnkiDroid(21266): 
04-30 07:22:55.013 I/AnkiDroid(21266): Model = 220333QL
04-30 07:22:55.013 I/AnkiDroid(21266): 
04-30 07:22:55.013 I/AnkiDroid(21266): Hardware = qcom
04-30 07:22:55.013 I/AnkiDroid(21266): 
04-30 07:22:55.013 I/AnkiDroid(21266): Webview User Agent = Mozilla/5.0 (Linux; Android 13; 220333QL Build/TKQ1.221114.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/123.0.6312.120 Mobile Safari/537.36
04-30 07:22:55.013 I/AnkiDroid(21266): 
04-30 07:22:55.013 I/AnkiDroid(21266): ACRA UUID = e3f88c80-e778-4b8f-99f0-cbc56d489cb1
04-30 07:22:55.013 I/AnkiDroid(21266): 
04-30 07:22:55.013 I/AnkiDroid(21266): FSRS Enabled = null
04-30 07:22:55.013 I/AnkiDroid(21266): 
04-30 07:22:55.013 I/AnkiDroid(21266): Crash Reports Enabled = true
04-30 07:22:57.635 I/AnkiDroid(21266): playing sounds for ANSWER

from anki-android.

david-allison avatar david-allison commented on June 11, 2024

So it appears to be an interaction with our Previewer

from anki-android.

david-allison avatar david-allison commented on June 11, 2024

@oyeraghib did you get a reproduction case?

from anki-android.

david-allison avatar david-allison commented on June 11, 2024

Slightly redacted stack trace:

--------- beginning of main
05-02 06:43:35.442 W/AnkiDroid(32112): Backend$checkMainThreadOp/ Op on UI thread: anki.i18n.GeneratedTranslations$DefaultImpls.exportingExport(SourceFile:9)
05-02 06:43:36.216 W/AnkiDroid(32112): Backend$checkMainThreadOp/ Op on UI thread: anki.i18n.GeneratedTranslations$DefaultImpls.exportingExport(SourceFile:9)
05-02 06:43:36.284 I/AnkiDroid(32112): Navigating to card browser
05-02 06:43:36.305 I/AnkiDroid(32112): DeckPicker::onPause
05-02 06:43:36.322 I/AnkiDroid(32112): Setting theme to LIGHT
05-02 06:43:36.323 I/AnkiDroid(32112): CardBrowser::onCreate
05-02 06:43:36.360 I/AnkiDroid(32112): CardBrowser::onStart
05-02 06:43:36.363 I/AnkiDroid(32112): CardBrowser::onResume
05-02 06:43:36.402 I/AnkiDroid(32112): setting deck: 1714311898325
05-02 06:43:36.452 I/AnkiDroid(32112): initCompleted
05-02 06:43:36.475 I/AnkiDroid(32112): CardBrowser:: Completed searchCards() Successfully
05-02 06:43:36.942 I/AnkiDroid(32112): DeckPicker::onStop
05-02 06:43:36.944 I/AnkiDroid(32112): DeckPicker::onSaveInstanceState
05-02 06:43:36.966 I/AnkiDroid(32112): NotificationService: OnStartCommand
05-02 06:43:37.105 I/AnkiDroid(32112): CardBrowser::DeckSelectionDialog::onAttach
05-02 06:43:37.105 I/AnkiDroid(32112): CardBrowser::DeckSelectionDialog::onCreate
05-02 06:43:37.147 I/AnkiDroid(32112): CardBrowser::DeckSelectionDialog::onStart
05-02 06:43:37.147 I/AnkiDroid(32112): CardBrowser::DeckSelectionDialog::onResume
05-02 06:43:37.997 I/AnkiDroid(32112): CardBrowser::DeckSelectionDialog::onPause
05-02 06:43:37.997 I/AnkiDroid(32112): CardBrowser::DeckSelectionDialog::onStop
05-02 06:43:37.998 I/AnkiDroid(32112): CardBrowser::DeckSelectionDialog::onViewDestroyed
05-02 06:43:37.999 I/AnkiDroid(32112): CardBrowser::DeckSelectionDialog::onDestroy
05-02 06:43:37.999 I/AnkiDroid(32112): CardBrowser::DeckSelectionDialog::onDetach
05-02 06:43:39.365 I/AnkiDroid(32112): isLegacyStorage(): false
05-02 06:43:41.744 I/AnkiDroid(32112): CardBrowser::onPause
05-02 06:43:41.761 I/AnkiDroid(32112): Setting theme to LIGHT
05-02 06:43:41.763 I/AnkiDroid(32112): CardViewerActivity::onCreate
05-02 06:43:41.770 I/AnkiDroid(32112): CardViewerActivity::onStart
05-02 06:43:41.770 I/AnkiDroid(32112): CardViewerActivity::PreviewerFragment::onAttach
05-02 06:43:41.770 I/AnkiDroid(32112): CardViewerActivity::PreviewerFragment::onCreate
05-02 06:43:41.838 I/AnkiDroid(32112): CardViewerActivity::PreviewerFragment::onViewCreated
05-02 06:43:41.841 I/AnkiDroid(32112): CardViewerActivity::PreviewerFragment::onStart
05-02 06:43:41.845 I/AnkiDroid(32112): CardViewerActivity::onResume
05-02 06:43:41.846 I/AnkiDroid(32112): CardViewerActivity::PreviewerFragment::onResume
05-02 06:43:42.347 I/AnkiDroid(32112): loading sounds for card 1698955074572
05-02 06:43:42.348 I/AnkiDroid(32112): playing sounds for QUESTION
05-02 06:43:42.457 I/AnkiDroid(32112): CardBrowser::onStop
05-02 06:43:42.459 I/AnkiDroid(32112): CardBrowser::onSaveInstanceState
05-02 06:43:42.483 I/AnkiDroid(32112): NotificationService: OnStartCommand
05-02 06:43:43.650 I/AnkiDroid(32112): CardViewerActivity::onPause
05-02 06:43:43.650 I/AnkiDroid(32112): CardViewerActivity::PreviewerFragment::onPause
05-02 06:43:44.073 I/AnkiDroid(32112): CardViewerActivity::onStop
05-02 06:43:44.081 I/AnkiDroid(32112): CardViewerActivity::PreviewerFragment::onStop
05-02 06:43:44.087 I/AnkiDroid(32112): CardViewerActivity::onSaveInstanceState
05-02 06:43:44.088 I/AnkiDroid(32112): CardViewerActivity::PreviewerFragment::onSaveInstanceState
05-02 06:43:56.211 I/AnkiDroid( 2066): Timber config: PRODUCTION
05-02 06:43:56.211 I/AnkiDroid( 2066): initialize()
05-02 06:43:56.368 I/AnkiDroid( 2066): Not participating in analytics sample (sample percentage vs random: 10 69)
05-02 06:43:56.369 I/AnkiDroid( 2066): setOptIn(): from false to true
05-02 06:43:56.369 I/AnkiDroid( 2066): Not participating in analytics sample (sample percentage vs random: 10 79)
05-02 06:43:56.457 I/AnkiDroid( 2066): Creating notification channel with id/name: General Notifications/AnkiDroid
05-02 06:43:56.458 I/AnkiDroid( 2066): Creating notification channel with id/name: Synchronization/Sincronização
05-02 06:43:56.458 I/AnkiDroid( 2066): Creating notification channel with id/name: Global Reminders/Cartões pendentes
05-02 06:43:56.459 I/AnkiDroid( 2066): Creating notification channel with id/name: Deck Reminders/Lembretes
05-02 06:43:56.459 I/AnkiDroid( 2066): Creating notification channel with id/name: Scoped Storage/Migração do armazenamento
05-02 06:43:56.462 I/AnkiDroid( 2066): AnkiDroidApp: Starting Services
05-02 06:43:56.462 W/AnkiDroid( 2066): AnkiDroidApp/ Boot Service did not execute - no permissions
05-02 06:43:56.486 I/AnkiDroid( 2066): Setting theme to LIGHT
05-02 06:43:56.502 I/AnkiDroid( 2066): CardViewerActivity::onCreate
05-02 06:43:56.512 I/AnkiDroid( 2066): CardViewerActivity::PreviewerFragment::onAttach
05-02 06:43:56.513 I/AnkiDroid( 2066): CardViewerActivity::PreviewerFragment::onCreate
05-02 06:43:56.523 I/AnkiDroid( 2066): CardViewerActivity::onStart
05-02 06:43:56.632 I/AnkiDroid( 2066): CardViewerActivity::PreviewerFragment::onViewCreated
05-02 06:43:56.637 I/AnkiDroid( 2066): CardViewerActivity::PreviewerFragment::onStart
05-02 06:43:56.693 I/AnkiDroid( 2066): CardViewerActivity::onResume
05-02 06:43:56.696 I/AnkiDroid( 2066): CardViewerActivity::PreviewerFragment::onResume
05-02 06:43:56.756 I/AnkiDroid( 2066): Crash Reports Enabled = true
05-02 06:43:59.310 I/AnkiDroid( 2066): playing sounds for ANSWER

from anki-android.

david-allison avatar david-allison commented on June 11, 2024

Reproduction:

  • Enable 'Don't keep activities'
  • Select a card with media
  • Open + close the app, either on the back, or on the front then flip to the back
  • Crash

from anki-android.

oyeraghib avatar oyeraghib commented on June 11, 2024

Thank you for reproduction steps.

from anki-android.

mikehardy avatar mikehardy commented on June 11, 2024

So for users this could be triggered normally via config change in activity like a time based dark mode switch or a device rotation if I understand correctly?

from anki-android.

david-allison avatar david-allison commented on June 11, 2024

I can't reproduce this via a night mode switch.

I've put in a PR to fix

from anki-android.

BrayanDSO avatar BrayanDSO commented on June 11, 2024

Does don't keep activies destroy the ViewModel? If so, is that possible from someone that doesn't have the setting enabled?

from anki-android.

david-allison avatar david-allison commented on June 11, 2024

Yes, typically in OOM situations.

In that case, savedInstanceState is non-null when the app is restored

from anki-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.