Comments (11)
设备信息:小米 MIX 2S MIUI12开发版 20.9.4
Android 10报错信息:
com.forjrking.lubankt.io.BufferedInputStreamWrap$InvalidMarkException: Mark has been invalidated, pos: 2497492 markLimit: 5242880
at com.forjrking.lubankt.io.BufferedInputStreamWrap.reset(BufferedInputStreamWrap.java:318)
at com.forjrking.lubankt.Checker$getOrientation$reader$1.getOrientation(Checker.kt:117)
at com.forjrking.lubankt.Checker.getOrientationInternal(Checker.kt:138)
at com.forjrking.lubankt.Checker.getOrientation(Checker.kt:121)
at com.forjrking.lubankt.CompressEngine.compress(CompressEngine.kt:48)
at com.forjrking.lubankt.Builder$compress$2.invokeSuspend(Luban.kt:270)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)
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:919)
at com.forjrking.lubankt.CompressThreadFactory$newThread$thread$1.run(Luban.kt:385)
目前手头没有10的机器,模拟器测试没复现,发现一些问题,尽快新版本尝试修复。
from kluban.
感觉是参考glide造成的
Glide 同样的 issue
from kluban.
com.forjrking.lubankt.io.BufferedInputStreamWrap$InvalidMarkException: Mark has been invalidated, pos: 116284 markLimit: 5242880
2021-01-08 18:13:20.721 16129-16129/com.yizhong.interior W/System.err: at com.forjrking.lubankt.io.BufferedInputStreamWrap.reset(BufferedInputStreamWrap.java:318)
2021-01-08 18:13:20.722 16129-16129/com.yizhong.interior W/System.err: at com.forjrking.lubankt.Checker$getOrientation$reader$1.getOrientation(Checker.kt:117)
2021-01-08 18:13:20.722 16129-16129/com.yizhong.interior W/System.err: at com.forjrking.lubankt.Checker.getOrientationInternal(Checker.kt:138)
2021-01-08 18:13:20.722 16129-16129/com.yizhong.interior W/System.err: at com.forjrking.lubankt.Checker.getOrientation(Checker.kt:121)
2021-01-08 18:13:20.722 16129-16129/com.yizhong.interior W/System.err: at com.forjrking.lubankt.CompressEngine.compress(CompressEngine.kt:51)
2021-01-08 18:13:20.722 16129-16129/com.yizhong.interior W/System.err: at com.forjrking.lubankt.Builder$compress$2.invokeSuspend(Luban.kt:270)
2021-01-08 18:13:20.722 16129-16129/com.yizhong.interior W/System.err: at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
2021-01-08 18:13:20.722 16129-16129/com.yizhong.interior W/System.err: at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
2021-01-08 18:13:20.722 16129-16129/com.yizhong.interior W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2021-01-08 18:13:20.722 16129-16129/com.yizhong.interior W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2021-01-08 18:13:20.722 16129-16129/com.yizhong.interior W/System.err: at java.lang.Thread.run(Thread.java:919)
2021-01-08 18:13:20.723 16129-16129/com.yizhong.interior W/System.err: at com.forjrking.lubankt.CompressThreadFactory$newThread$thread$1.run(Luban.kt:385)
我这是同一张图片换了两个手机了 都是报错
from kluban.
提供下机型和图片,目前这个问题我还没复现。会尝试修复
from kluban.
1加 7Pro Android 10
from kluban.
图片我私聊你
from kluban.
要不你家我QQ1322202454 或者 你把QQ给我我加你
from kluban.
1.0.5 版本修复此问题,此问题在此关闭。。后续出现请提 issues
from kluban.
@forJrking 我这边又出现此类问题。麻烦是否可以提供一下commit。看下修改
from kluban.
看了一下,是因为图片过大。超过了markLimit后,在进行inputStream进行reset就会有这个问题。这个markLimit是不是应该和文件同大小呢?
from kluban.
看了一下,是因为图片过大。超过了markLimit后,在进行inputStream进行reset就会有这个问题。这个markLimit是不是应该和文件同大小呢?
请问这个有解决吗?
from kluban.
Related Issues (20)
- 你好,压缩的话,怎么直接传list集合, HOT 10
- rename 返回的是整个路径不是文件名 HOT 2
- 会出现压缩后反而更大的情况,文件有后缀的时候输出文件还会再加一次后缀。 HOT 6
- load()传入List<Uri> 返回为空 HOT 1
- heic图片压缩后旋转 HOT 4
- 如何避免重复压缩同一张图片 HOT 1
- 大神 java版本调用 如何在compressObserver中获取压缩后的File? 对kotlin不太熟悉 可以出个java版本的demo吗
- 压缩图片抛InvalidMarkException HOT 3
- 选择不并行(useConcurrent为false)时,onSuccess list为空 HOT 1
- 上传部分图片时会抛出异常:InvalidMarkException: Mark has been invalidated, pos: 1423393 markLimit: 5242880 HOT 2
- 有一些jpg图片会有格式识别不出来的情况
- 编译失败, 2 files found with path 'META-INF/library_release.kotlin_module'. HOT 1
- 能解答一下,这不部分的计算是根据啥么?
- asyncRun这段代码的协程handler里面应该回调error吧,不然报错了,也没有回调,就卡在那了 HOT 1
- load(bitmap) 输出只有Bitmap.CompressFormat.JPEG格式,后面checker 头的时候也会把png图片也当成JPEG
- 既然都使用协程了为什么不能提供suspend方法?
- 压缩超长图片,特别耗时的问题
- 16K图片压缩问题 HOT 4
- 建议加一下宽高限制
- InputStream mark问题 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kluban.