Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting ArithmeticException: divide by zero #10

Open
sudheeshmohan47 opened this issue May 28, 2017 · 11 comments
Open

Getting ArithmeticException: divide by zero #10

sudheeshmohan47 opened this issue May 28, 2017 · 11 comments

Comments

@sudheeshmohan47
Copy link

Hi I'm getting java.lang.ArithmeticException: divide by zero while compressing image on Android 4.4.2, but works on other Android versions.

Unable to decode stream: java.io.FileNotFoundException: /storage/sdcard0/Pictures/Screenshots/Screenshot_2017-05-28-13-01-55.png: open failed: ENOENT (No such file or directory)
java.lang.ArithmeticException: divide by zero
at com.iceteck.silicompressorr.SiliCompressor.compressImage(SiliCompressor.java:191)
at com.iceteck.silicompressorr.SiliCompressor.getCompressBitmap(SiliCompressor.java:151)
at com.xxxxx.Activities.EditImageActivity.setupImage(EditImageActivity.java:150)
at com.xxxxx.Activities.EditImageActivity.onCreate(EditImageActivity.java:88)
at android.app.Activity.performCreate(Activity.java:5238)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)

@Tourenathan-G5organisation
Copy link
Owner

Hello @sudheeshmohan47, i will check it

@sudheeshmohan47
Copy link
Author

Thanks.

@brijhub
Copy link

brijhub commented May 18, 2018

I'm also facing the same issue.
Please have a look on this issue.
Waiting for your response @Tourenathan-G5organisation

@cognesoltech
Copy link

Getting same issue.

@kumarbhubnesh
Copy link

Getting same issue. Please check.

@Tourenathan-G5organisation
Copy link
Owner

@brijhub @cognesoltech @kumarbhubnesh sorry for my very late response.
Please what version of android were you using for that problem to occur.

@Tourenathan-G5organisation
Copy link
Owner

A new version of the library has just been release, please check it out.
Please take note of the readME file

@helpdesskApplication
Copy link

helpdesskApplication commented Jan 17, 2019

Newer version has same issue, this is happening on Android 4.4.4 and on some android devices when random image is uploaded.

Caused by java.lang.ArithmeticException: divide by zero
at com.iceteck.silicompressorr.SiliCompressor.compressImage(SiliCompressor.java:205)
at com.iceteck.silicompressorr.SiliCompressor.compress(SiliCompressor.java:83)
at com.android.helpdessk.helpdesk.activities.HomeScreenActivity$ImageCompressionAsyncTask.doInBackground(HomeScreenActivity.java:551)
at com.android.helpdessk.helpdesk.activities.HomeScreenActivity$ImageCompressionAsyncTask.doInBackground(HomeScreenActivity.java:541)
at android.os.AsyncTask$2.call(AsyncTask.java:333)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:245)
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)

@haroon47
Copy link

Same problem. I am testing it on oreo 8.0 device

@haroon47
Copy link

Still same problem after 2 months. i mistakenly came to this library again

@ahmetet
Copy link

ahmetet commented Aug 21, 2020

Try running compression code using AsyncTask dude

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants