burhanrashid52 / PhotoEditor

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
MIT License
4.14k stars 991 forks source link

Crash after resizing sticker #452

Closed sajjadroudi closed 2 years ago

sajjadroudi commented 2 years ago

When I resize emoji and sticker and then click on apply button to save the image using saveAsFile method, an exception is thrown and the app crashes. here is the stacktrace:

E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #8 Process: com.example.photoeditor, PID: 27338 java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$4.done(AsyncTask.java:415) 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:305) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923) Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 0 at java.util.ArrayList.get(ArrayList.java:437) at android.view.ViewGroup.getAndVerifyPreorderedView(ViewGroup.java:3795) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4308) at android.view.View.draw(View.java:22369) at android.view.ViewGroup.drawChild(ViewGroup.java:4551) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4310) at android.view.View.draw(View.java:22509) at ja.burhanrashid52.photoeditor.PhotoSaverTask.captureView(PhotoSaverTask.java:161) at ja.burhanrashid52.photoeditor.PhotoSaverTask.buildBitmap(PhotoSaverTask.java:104) at ja.burhanrashid52.photoeditor.PhotoSaverTask.saveImageInFile(PhotoSaverTask.java:88) at ja.burhanrashid52.photoeditor.PhotoSaverTask.doInBackground(PhotoSaverTask.java:70) at ja.burhanrashid52.photoeditor.PhotoSaverTask.doInBackground(PhotoSaverTask.java:23) at android.os.AsyncTask$3.call(AsyncTask.java:394) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)  at java.lang.Thread.run(Thread.java:923) 

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 20 days with no activity. Remove stale label or comment or this will be closed in 4 days.

github-actions[bot] commented 2 years ago

This issue was closed because it has been stalled for 5 days with no activity.