Skip to content

FileUtils NumberFormatException #318

@christianlacerda

Description

@christianlacerda

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
Throwing exception when selected an image from Downloads folder

What is the expected behavior?
Process the image properly

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
Just copy some image to /sdcard/Download folder and try to open with through the app

Please attach any image files, URL and stack trace that can be used to reproduce the bug.

E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #6 Process: br.com.saibala.novelo, PID: 7256 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:325) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383) at java.util.concurrent.FutureTask.setException(FutureTask.java:252) at java.util.concurrent.FutureTask.run(FutureTask.java:271) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636) at java.lang.Thread.run(Thread.java:764) Caused by: java.lang.NumberFormatException: For input string: "raw:/storage/emulated/0/Download/vm.png" at java.lang.Long.parseLong(Long.java:590) at java.lang.Long.valueOf(Long.java:804) at com.yalantis.ucrop.util.FileUtils.getPath(FileUtils.java:159) at com.yalantis.ucrop.task.BitmapLoadTask.processInputUri(BitmapLoadTask.java:171) at com.yalantis.ucrop.task.BitmapLoadTask.doInBackground(BitmapLoadTask.java:90) at com.yalantis.ucrop.task.BitmapLoadTask.doInBackground(BitmapLoadTask.java:41) at android.os.AsyncTask$2.call(AsyncTask.java:305) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:243)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)  at java.lang.Thread.run(Thread.java:764) 

Which versions of uCrop, and which Android API versions are affected by this issue? Did this work in previous versions of uCrop?

2.2.0. I've never tried that in previous versions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions