zetbaitsu / Compressor

An android image compression library.
7.08k stars 963 forks source link

Fatal Exception: IllegalStateException #177

Open utsavDave97 opened 3 years ago

utsavDave97 commented 3 years ago

Fatal Exception: java.lang.IllegalStateException: this must not be null at id.zelory.compressor.UtilKt.loadBitmap(Util.kt:34) at id.zelory.compressor.constraint.QualityConstraint.satisfy(QualityConstraint.kt:21) at id.zelory.compressor.Compressor$compress$3.invokeSuspend(Compressor.kt:28) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:738) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

any idea why?

prudhvir3ddy commented 3 years ago

@utsavDave97 got any update for this ?

utsavDave97 commented 3 years ago

@prudhvir3ddy no update yet. Sorry. You getting the same exception?

prudhvir3ddy commented 3 years ago

Yes

nareshkatta99 commented 3 years ago

Are you getting this error on all devices or specific to single device?

SilvestreRamirez commented 3 years ago

i have the same exception, got any update for this ?

utsavDave97 commented 3 years ago

No update. But most likely will change the library. @nareshkatta99 @prudhvir3ddy @SilvestreRamirez

nareshkatta99 commented 3 years ago

It wold be very helpful for us if you provide minimal code to reproduce this error. Will try to resolve ASAP. @utsavDave97 @prudhvir3ddy @SilvestreRamirez

utsavDave97 commented 3 years ago

Devices in which this is seen most are Galaxy A50,A51 , moto g-fast, Galaxy S20 5G

Sabboo commented 3 years ago

I am facing the same issue with Samsung Galaxy S8 running OS 9

paragRaneWork commented 3 years ago

I am facing the same issue with Samsung Galaxy M31s

ly469097645 commented 2 years ago

Same issue on Redmi 9A devices

Is there anything we can do to prevent this crash ?

krunalpatel3 commented 1 year ago

if you trying to compress .tiff image or any unsupported format that Compressor Library do not support that this occurs. put validation before you start to Compress image.