-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
fix:IndexOutOfBoundsException in NoteEditor.kt(addMediaFileToField) #17408
base: main
Are you sure you want to change the base?
Conversation
withCol { | ||
NoteService.importMediaToDirectory(this, field) | ||
} | ||
if (index >= 0 && index < editFields!!.size) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this now determines we have a problem, and avoids the problem, which does stop the crash
... but it doesn't seem to fix the problem
Were you able to reproduce this error? What is the actual problem leading us to have the incorrect index / field mapping here?
Because if we go out of bounds we crash but what if we are frequently incorrect in the index/field mappings and we are frequently not going out of bounds but we are scribbling into the wrong field via incorrect mappings that are still in bounds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not seem to address root cause
Hi @mikehardy, i tried different way to reproduce this issue. But not able to reproduce the issue . |
I think, it could be due to some underlying race condition |
Without a reproduction and a fix of the root cause this PR cannot be merged. Better to crash then continue silently corrupting data with mismatched field indices |
Hello 👋, this PR has had no activity for more than 2 weeks and needs a reply from the author. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically |
Purpose / Description
IndexOutOfBoundsException in addMediaFileToField(NoteEditor.kt)
Fixes
How Has This Been Tested?
tested note editor on physical device
Checklist