llCrop crashes in "save crop picture as" when filename contains illegal character
Project Information
- Repository: https://github.com/k3b/LosslessJpgCrop
- Project Name: llCrop (Loss Less)
- My Issue : https://github.com/k3b/LosslessJpgCrop/issues/7
Expected behavior
When I try to save the picture after crop, the picture should be saved and the saved picture should appear in the mobile phone gallery.
Actual behavior
The application crashes when I try to save the picture to the cell phone storage
How to reproduce
1-Download the app and open it
2-Select any picture from mobile storage
3-Crop the image
4- Try saving the image in the phone by clicking Save button
5- see the bug
- Browser/App version: Version 1.0.1.190507
- Operating system: 6.0.1
- Smartphone: Galaxy j7
Recording Of The Bug
My Github Account
https://github.com/facebook-786
Logcat
D/AndroidRuntime( 4900): Shutting down VM
E/AndroidRuntime( 4900): FATAL EXCEPTION: main
E/AndroidRuntime( 4900): Process: de.k3b.android.lossless_jpg_crop, PID: 4900
E/AndroidRuntime( 4900): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2, result=-1, data=Intent { dat=content://com.android.externalstorage.documents/document/primary:image_1609_llcrop (1).jpg flg=0x43 }} to activity {de.k3b.android.lossless_jpg_crop/de.k3b.android.lossless_jpg_crop.CropAreasChooseActivity}: java.nio.charset.IllegalCharsetNameException: java.nio.charset.CharsetICU[UTF-8]
E/AndroidRuntime( 4900): at android.app.ActivityThread.deliverResults(ActivityThread.java:4005)
E/AndroidRuntime( 4900): at android.app.ActivityThread.handleSendResult(ActivityThread.java:4048)
E/AndroidRuntime( 4900): at android.app.ActivityThread.access$1400(ActivityThread.java:177)
E/AndroidRuntime( 4900): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1479)
E/AndroidRuntime( 4900): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 4900): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 4900): at android.app.ActivityThread.main(ActivityThread.java:5910)
E/AndroidRuntime( 4900): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 4900): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 4900): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1405)
E/AndroidRuntime( 4900): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1200)
E/AndroidRuntime( 4900): Caused by: java.nio.charset.IllegalCharsetNameException: java.nio.charset.CharsetICU[UTF-8]
E/AndroidRuntime( 4900): at java.nio.charset.Charset.checkCharsetName(Charset.java:201)
E/AndroidRuntime( 4900): at java.nio.charset.Charset.forName(Charset.java:295)
E/AndroidRuntime( 4900): at java.net.URLDecoder.decode(URLDecoder.java:60)
E/AndroidRuntime( 4900): at de.k3b.android.lossless_jpg_crop.CropAreasChooseActivity.toString(CropAreasChooseActivity.java:263)
E/AndroidRuntime( 4900): at de.k3b.android.lossless_jpg_crop.CropAreasChooseActivity.onOpenPublicOutputUriPickerResult(CropAreasChooseActivity.java:234)
E/AndroidRuntime( 4900): at de.k3b.android.lossless_jpg_crop.CropAreasChooseActivity.onActivityResult(CropAreasChooseActivity.java:321)
E/AndroidRuntime( 4900): at android.app.Activity.dispatchActivityResult(Activity.java:6441)
E/AndroidRuntime( 4900): at android.app.ActivityThread.deliverResults(ActivityThread.java:4001)
E/AndroidRuntime( 4900): ... 10 more
Hi @facebok, thanks for making this report.
Firstly, I am very impressed by your use of language in this particular post. I am glad you worked it out. This is very much better than your previous reports. I am able to make out the behaviors without stress. Good job
This appears to have been fixed in this commit - https://github.com/k3b/LosslessJpgCrop/commit/3883d1cf85c2d987d9c94f000580974ef06536e0 and therefore the behavior cannot be reproduced in the latest release version v1.0.2.190515. I love that you included in your report a crash log, this must have been of great help to the PO.
Thanks again for the report. I look forward to more of your contributions.
Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.
To view those questions and the relevant answers related to your post, click here.
Need help? Chat with us on Discord.
[utopian-moderator]
thanks u sir
Thank you for your review, @fego! Keep up the good work!
Hey, @facebok!
Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!
Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).
Want to chat? Join us on Discord https://discord.gg/h52nFrV.
Vote for Utopian Witness!