-
Notifications
You must be signed in to change notification settings - Fork 914
Description
Describe the bug
When an image which is already compressed by size or dimension is edited or gain compressed, sometimes the app crashes.
To Reproduce
Compress an image by size or dimension. Then try to edit or compress the new image. The app might crash. This might not happen frequently but it does happen. Sometimes the new image might also get compressed successfully and then the new image formed after that might cause the app to crash. The app might also crash if the image is just being edited.
Expected behavior
The app should not crash.
Logs
-
2019-02-24 13:49:44.687 16051-16051/org.fossasia.phimpme E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.fossasia.phimpme, PID: 16051
java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.Bitmap$Config android.graphics.Bitmap.getConfig()' on a null object reference
at org.fossasia.phimpme.editor.EditImageActivity$LoadImageTask.onPostExecute(EditImageActivity.java:613)
at org.fossasia.phimpme.editor.EditImageActivity$LoadImageTask.onPostExecute(EditImageActivity.java:594)
at android.os.AsyncTask.finish(AsyncTask.java:695)
at android.os.AsyncTask.access$600(AsyncTask.java:180)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:712)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:198)
at android.app.ActivityThread.main(ActivityThread.java:6729)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858) -
2019-02-24 13:55:44.160 17386-17386/org.fossasia.phimpme E/WindowManager: android.view.WindowLeaked: Activity org.fossasia.phimpme.editor.CompressImageActivity has leaked window DecorView@801a965[CompressImageActivity] that was originally added here
at android.view.ViewRootImpl.(ViewRootImpl.java:518)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:346)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:94)
at android.app.Dialog.show(Dialog.java:329)
at org.fossasia.phimpme.editor.CompressImageActivity.compressDim(CompressImageActivity.java:343)
at org.fossasia.phimpme.editor.CompressImageActivity.access$100(CompressImageActivity.java:47)
at org.fossasia.phimpme.editor.CompressImageActivity$2.onClick(CompressImageActivity.java:73)
at android.view.View.performClick(View.java:6608)
at android.view.View.performClickInternal(View.java:6585)
at android.view.View.access$3100(View.java:782)
at android.view.View$PerformClick.run(View.java:25945)
at android.os.Handler.handleCallback(Handler.java:874)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:198)
at android.app.ActivityThread.main(ActivityThread.java:6729)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Smartphone Info:
| Device | Nokia 7 Plus |
| Android Version | Android 0 |
Would you like to work on the issue?
- Yes
- No