Fix : UninitializedPropertyAccessException#6248
Fix : UninitializedPropertyAccessException#6248nicolas-raoul merged 5 commits intocommons-app:mainfrom
Conversation
nicolas-raoul
left a comment
There was a problem hiding this comment.
Somehow I still get the same crash with this branch...
screen-20250315-211239.mp4 |
|
I tested the same branch on my end, but I’m not experiencing the crash.😓 |
|
If I read the code correctly, you've only swapped an |
|
@psh You're absolutely right—swapping exceptions doesn’t address the root cause. My initial approach was incomplete, and I appreciate you pointing that out. |
|
Hi @sonalyadav1 , are you still working on this? |
|
@misaochan Due to ongoing university practicals and exams, my availability is limited at the moment. However, I’ll do my best to resolve the issue shortly. |
|
Hey @sonalyadav1, do you need any help with this one? |
|
@rohit9625 Thanks for asking! I just pushed some fixes for the issue. If you get a chance, feel free to take a look and let me know if I missed anything! |
|
I couldn't reproduce this bug on this branch or main. Can you repro this @sonalyadav1, before your fix? |
|
I wasn’t able to reproduce the issue on main or this branch, but I tried to fix the root cause based on the code. |
No problem, the changes you made are quite reasonable but the issue won't be fixed until you repro this issue yourself and work on the actual root cause. That's why @nicolas-raoul still facing this issue on your branch. I think we should consider other factors or preferences that we should have while replicating this issue. When I try to upload some pictures, the Location Not Found dialog appears before the Duplicate File Name dialog. But, it won't happen on your device, right @nicolas-raoul?
I guess the images you were trying to upload had location in metadata. |
This comment was marked as outdated.
This comment was marked as outdated.
rohit9625
left a comment
There was a problem hiding this comment.
Any reason for adding this requireFactoryInitialized() function here? I think we don't need this.
rohit9625
left a comment
There was a problem hiding this comment.
Sorry, I missed this change. I'm sure after calling the setupBasicKvStoreFactory function in the onCreate function, the crash won't happen again.
|
Finally, I got the crash on the main. These are the prerequisites:
Screencast: Crash_Repro.mp4 |
|
I can confirm that the issue is fixed on @sonalyadav1's branch. We can merge this PR @nicolas-raoul :) After_Fix_Crash.mp4 |
nicolas-raoul
left a comment
There was a problem hiding this comment.
Thanks a lot @rohit9625 for the detailed reproduction steps and before/after screencasts, that's super helpful!
@sonalyadav1 Would you mind just adding kdoc to new functions, then I can merge. :-)
Done! |
|
✅ Generated APK variants! |
Description (required)
When a user uploads a file with a name that already exists, they get a warning about the duplicate file. Clicking "Upload" after this caused a crash.
Fixes #6247
What changes did you make and why?
(1) Fixed crash when uploading after a duplicate filename warning by adding proper checks and error handling.
(2) Ensured the warning message displays correctly and does not interfere with the upload process.
Tests performed (required)
Tested {build variant (BetaDebug)} on {VIVO V25} with API level {34}.
Screenshots (for UI changes only)
Screenrecording_20250314_201059.mp4