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

NoteEditor: addMediaFileToField - IndexOutOfBoundsException #17383

Open
Tracked by #17370
david-allison opened this issue Nov 7, 2024 · 2 comments
Open
Tracked by #17370

NoteEditor: addMediaFileToField - IndexOutOfBoundsException #17383

david-allison opened this issue Nov 7, 2024 · 2 comments
Labels
Milestone

Comments

@david-allison
Copy link
Member

david-allison commented Nov 7, 2024

https://ankidroid.org/acra/app/1/bug/253855/report/5f681a72-226f-41b1-925b-6090aab4171f

java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
	at java.util.LinkedList.checkElementIndex(LinkedList.java:566)
	at java.util.LinkedList.get(LinkedList.java:487)
	at com.ichi2.anki.NoteEditor$addMediaFileToField$1.invokeSuspend(NoteEditor.kt:1872)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
	at android.os.Handler.handleCallback(Handler.java:958)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loopOnce(Looper.java:230)
	at android.os.Looper.loop(Looper.java:319)
	at android.app.ActivityThread.main(ActivityThread.java:9063)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:588)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [p0{Cancelling}@66e96eb, Dispatchers.Main.immediate]

@david-allison david-allison changed the title https://ankidroid.org/acra/app/1/bug/253855/report/5f681a72-226f-41b1-925b-6090aab4171f NoteEditor: addMediaFileToField - IndexOutOfBoundsException Nov 7, 2024
@david-allison david-allison added this to the 2.19.2 release milestone Nov 7, 2024
@Prince-kushwaha
Copy link
Contributor

looking into it

@david-allison
Copy link
Member Author

Logcat

--------- beginning of main
11-06 10:47:30.087 I/AnkiDroid(24652): MultimediaActivity::onPause
11-06 10:47:30.087 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onPause
11-06 10:47:30.098 I/AnkiDroid(24652): Setting theme to LIGHT
11-06 10:47:30.099 I/AnkiDroid(24652): MultimediaActivity::onCreate
11-06 10:47:30.104 I/AnkiDroid(24652): MultimediaActivity::onStart
11-06 10:47:30.104 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onAttach
11-06 10:47:30.104 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onCreate
11-06 10:47:30.138 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onViewCreated
11-06 10:47:30.139 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onStart
11-06 10:47:30.140 I/AnkiDroid(24652): MultimediaActivity::onResume
11-06 10:47:30.141 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onResume
11-06 10:47:30.160 I/AnkiDroid(24652): MultimediaActivity::onPause
11-06 10:47:30.160 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onPause
11-06 10:47:30.824 I/AnkiDroid(24652): MultimediaActivity::onStop
11-06 10:47:30.824 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onStop
11-06 10:47:30.825 I/AnkiDroid(24652): MultimediaActivity::onDestroy
11-06 10:47:30.826 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onViewDestroyed
11-06 10:47:30.826 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onDestroy
11-06 10:47:30.826 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onDetach
11-06 10:47:33.793 I/AnkiDroid(24652): finishWithAnimation DEFAULT
11-06 10:47:33.818 I/AnkiDroid(24652): Setting theme to LIGHT
11-06 10:47:33.819 I/AnkiDroid(24652): MultimediaActivity::onCreate
11-06 10:47:33.824 I/AnkiDroid(24652): MultimediaActivity::onStart
11-06 10:47:33.824 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onAttach
11-06 10:47:33.824 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onCreate
11-06 10:47:33.840 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onViewCreated
11-06 10:47:33.840 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onStart
11-06 10:47:33.842 I/AnkiDroid(24652): MultimediaActivity::onResume
11-06 10:47:33.842 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onResume
11-06 10:47:33.866 I/AnkiDroid(24652): MultimediaActivity::onPause
11-06 10:47:33.866 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onPause
11-06 10:47:34.549 I/AnkiDroid(24652): MultimediaActivity::onStop
11-06 10:47:34.550 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onStop
11-06 10:47:34.551 I/AnkiDroid(24652): MultimediaActivity::onDestroy
11-06 10:47:34.551 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onViewDestroyed
11-06 10:47:34.552 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onDestroy
11-06 10:47:34.552 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onDetach
11-06 10:47:36.418 I/AnkiDroid(24652): MultimediaActivity::onStop
11-06 10:47:36.419 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onStop
11-06 10:47:36.423 I/AnkiDroid(24652): MultimediaActivity::onSaveInstanceState
11-06 10:47:36.423 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onSaveInstanceState
11-06 10:47:44.695 I/AnkiDroid(24652): MultimediaActivity::onStart
11-06 10:47:44.695 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onStart
11-06 10:47:44.889 I/AnkiDroid(24652): MultimediaActivity::onResume
11-06 10:47:44.889 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onResume
11-06 10:47:46.402 I/AnkiDroid(24652): MultimediaActivity::onPause
11-06 10:47:46.402 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onPause
11-06 10:47:51.088 I/AnkiDroid(24652): MultimediaActivity::onStop
11-06 10:47:51.089 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onStop
11-06 10:47:51.092 I/AnkiDroid(24652): MultimediaActivity::onSaveInstanceState
11-06 10:47:51.092 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onSaveInstanceState
11-06 10:48:03.999 I/AnkiDroid(24652): MultimediaActivity::onStart
11-06 10:48:04.001 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onStart
11-06 10:48:07.442 I/AnkiDroid(24652): MultimediaActivity::onResume
11-06 10:48:07.442 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onResume
11-06 10:48:08.964 I/AnkiDroid(24652): MultimediaActivity::onPause
11-06 10:48:08.964 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onPause
11-06 10:48:11.473 I/AnkiDroid(24652): MultimediaActivity::onResume
11-06 10:48:11.474 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onResume
11-06 10:48:12.683 I/AnkiDroid(24652): MultimediaActivity::onPause
11-06 10:48:12.683 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onPause
11-06 10:48:12.694 I/AnkiDroid(24652): Setting theme to LIGHT
11-06 10:48:12.695 I/AnkiDroid(24652): SingleFragmentActivity::onCreate
11-06 10:48:12.697 I/AnkiDroid(24652): isLegacyStorage(): current dir: /storage/emulated/0/Android/data/com.ichi2.anki/files/AnkiDroid
11-06 10:48:12.697 I/AnkiDroid(24652): scoped external dirs: /storage/emulated/0/Android/data/com.ichi2.anki/files
11-06 10:48:12.697 I/AnkiDroid(24652): scoped internal dir: /data/user/0/com.ichi2.anki/files
11-06 10:48:12.697 I/AnkiDroid(24652): isLegacyStorage(): false
11-06 10:48:12.701 I/AnkiDroid(24652): SingleFragmentActivity::onStart
11-06 10:48:12.701 I/AnkiDroid(24652): SingleFragmentActivity::c::onAttach
11-06 10:48:12.702 I/AnkiDroid(24652): SingleFragmentActivity::c::onCreate
11-06 10:48:12.707 I/AnkiDroid(24652): SingleFragmentActivity::c::onViewCreated
11-06 10:48:12.707 I/AnkiDroid(24652): SingleFragmentActivity::c::onStart
11-06 10:48:12.709 I/AnkiDroid(24652): SingleFragmentActivity::onResume
11-06 10:48:12.709 I/AnkiDroid(24652): SingleFragmentActivity::c::onResume
11-06 10:48:13.204 I/AnkiDroid(24652): MultimediaActivity::onStop
11-06 10:48:13.204 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onStop
11-06 10:48:13.206 I/AnkiDroid(24652): MultimediaActivity::onSaveInstanceState
11-06 10:48:13.207 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onSaveInstanceState
11-06 10:48:26.335 I/AnkiDroid(24652): finishWithAnimation DEFAULT
11-06 10:48:26.346 I/AnkiDroid(24652): SingleFragmentActivity::onPause
11-06 10:48:26.347 I/AnkiDroid(24652): SingleFragmentActivity::c::onPause
11-06 10:48:26.354 I/AnkiDroid(24652): MultimediaActivity::onStart
11-06 10:48:26.354 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onStart
11-06 10:48:26.393 I/AnkiDroid(24652): MultimediaActivity::onResume
11-06 10:48:26.395 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onResume
11-06 10:48:26.803 I/AnkiDroid(24652): SingleFragmentActivity::onStop
11-06 10:48:26.803 I/AnkiDroid(24652): SingleFragmentActivity::c::onStop
11-06 10:48:26.805 I/AnkiDroid(24652): SingleFragmentActivity::onDestroy
11-06 10:48:26.805 I/AnkiDroid(24652): SingleFragmentActivity::c::onViewDestroyed
11-06 10:48:26.805 I/AnkiDroid(24652): SingleFragmentActivity::c::onDestroy
11-06 10:48:26.806 I/AnkiDroid(24652): SingleFragmentActivity::c::onDetach
11-06 10:48:28.403 I/AnkiDroid(24652): finishWithAnimation DEFAULT
11-06 10:48:28.412 I/AnkiDroid(24652): MultimediaActivity::onPause
11-06 10:48:28.412 I/AnkiDroid(24652): MultimediaActivity::MultimediaImageFragment::onPause
11-06 10:48:28.420 I/AnkiDroid(24652): SingleFragmentActivity::onStart
11-06 10:48:28.420 I/AnkiDroid(24652): SingleFragmentActivity::a7::onStart
11-06 10:48:28.423 I/AnkiDroid(24652): SingleFragmentActivity::onResume
11-06 10:48:28.423 I/AnkiDroid(24652): SingleFragmentActivity::i::onAttach
11-06 10:48:28.423 I/AnkiDroid(24652): SingleFragmentActivity::i::onCreate
11-06 10:48:28.431 I/AnkiDroid(24652): SingleFragmentActivity::i::onViewCreated
11-06 10:48:28.437 I/AnkiDroid(24652): SingleFragmentActivity::i::onStart
11-06 10:48:28.438 I/AnkiDroid(24652): SingleFragmentActivity::a7::onResume
11-06 10:48:28.438 I/AnkiDroid(24652): SingleFragmentActivity::i::onResume

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants