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

InputStream mark问题 #32

Open
gaowch opened this issue Sep 26, 2023 · 4 comments
Open

InputStream mark问题 #32

gaowch opened this issue Sep 26, 2023 · 4 comments

Comments

@gaowch
Copy link

gaowch commented Sep 26, 2023

Mark has been invalidated, pos: 1300464 markLimit: 5242880

@xiaoyvyv
Copy link

+1

@xiaoyvyv
Copy link

xiaoyvyv commented Nov 21, 2023

选取大图 2250x4000 9MB 时报错: Mark has been invalidated, pos: xxx markLimit: xxx

com.forjrking.lubankt.io.BufferedInputStreamWrap$InvalidMarkException: Mark has been invalidated, pos: 1701080 markLimit: 5242880
	at com.forjrking.lubankt.io.BufferedInputStreamWrap.reset(BufferedInputStreamWrap.java:318)
	at com.forjrking.lubankt.Checker$getOrientation$reader$1.getOrientation(Checker.kt:137)
	at com.forjrking.lubankt.Checker.getOrientationInternal(Checker.kt:147)
	at com.forjrking.lubankt.Checker.getOrientation(Checker.kt:141)
	at com.forjrking.lubankt.Checker.getRotateDegree(Checker.kt:167)
	at com.forjrking.lubankt.CompressEngine.compress(CompressEngine.kt:48)
	at com.forjrking.lubankt.AbstractFileBuilder$compress$2.invokeSuspend(Luban.kt:294)
	at com.forjrking.lubankt.AbstractFileBuilder$compress$2.invoke(Unknown Source:10)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
	at com.forjrking.lubankt.AbstractFileBuilder.compress(Luban.kt:272)
	at com.forjrking.lubankt.SingleRequestBuild$asyncRun$1$1.invokeSuspend(Luban.kt:320)
	at com.forjrking.lubankt.SingleRequestBuild$asyncRun$1$1.invoke(Unknown Source:10)
	at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
	at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:230)
	at kotlinx.coroutines.flow.internal.ChannelFlowOperatorImpl.flowCollect(ChannelFlow.kt:195)
	at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo$suspendImpl(ChannelFlow.kt:157)
	at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo(Unknown Source:0)
	at kotlinx.coroutines.flow.internal.ChannelFlow$collectToFun$1.invokeSuspend(ChannelFlow.kt:60)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
	at java.lang.Thread.run(Thread.java:1012)
	at com.forjrking.lubankt.CompressThreadFactory$newThread$thread$1.run(Luban.kt:403)

@forJrking
Copy link
Owner

选取大图 2250x4000 9MB 时报错: Mark has been invalidated, pos: xxx markLimit: xxx

com.forjrking.lubankt.io.BufferedInputStreamWrap$InvalidMarkException: Mark has been invalidated, pos: 1701080 markLimit: 5242880
	at com.forjrking.lubankt.io.BufferedInputStreamWrap.reset(BufferedInputStreamWrap.java:318)
	at com.forjrking.lubankt.Checker$getOrientation$reader$1.getOrientation(Checker.kt:137)
	at com.forjrking.lubankt.Checker.getOrientationInternal(Checker.kt:147)
	at com.forjrking.lubankt.Checker.getOrientation(Checker.kt:141)
	at com.forjrking.lubankt.Checker.getRotateDegree(Checker.kt:167)
	at com.forjrking.lubankt.CompressEngine.compress(CompressEngine.kt:48)
	at com.forjrking.lubankt.AbstractFileBuilder$compress$2.invokeSuspend(Luban.kt:294)
	at com.forjrking.lubankt.AbstractFileBuilder$compress$2.invoke(Unknown Source:10)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
	at com.forjrking.lubankt.AbstractFileBuilder.compress(Luban.kt:272)
	at com.forjrking.lubankt.SingleRequestBuild$asyncRun$1$1.invokeSuspend(Luban.kt:320)
	at com.forjrking.lubankt.SingleRequestBuild$asyncRun$1$1.invoke(Unknown Source:10)
	at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
	at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:230)
	at kotlinx.coroutines.flow.internal.ChannelFlowOperatorImpl.flowCollect(ChannelFlow.kt:195)
	at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo$suspendImpl(ChannelFlow.kt:157)
	at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo(Unknown Source:0)
	at kotlinx.coroutines.flow.internal.ChannelFlow$collectToFun$1.invokeSuspend(ChannelFlow.kt:60)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
	at java.lang.Thread.run(Thread.java:1012)
	at com.forjrking.lubankt.CompressThreadFactory$newThread$thread$1.run(Luban.kt:403)

你好可以提供下原图么?

@xiaoyvyv
Copy link

xiaoyvyv commented Dec 6, 2023

选取大图 2250x4000 9MB 时报错: Mark has been invalidated, pos: xxx markLimit: xxx

com.forjrking.lubankt.io.BufferedInputStreamWrap$InvalidMarkException: Mark has been invalidated, pos: 1701080 markLimit: 5242880
	at com.forjrking.lubankt.io.BufferedInputStreamWrap.reset(BufferedInputStreamWrap.java:318)
	at com.forjrking.lubankt.Checker$getOrientation$reader$1.getOrientation(Checker.kt:137)
	at com.forjrking.lubankt.Checker.getOrientationInternal(Checker.kt:147)
	at com.forjrking.lubankt.Checker.getOrientation(Checker.kt:141)
	at com.forjrking.lubankt.Checker.getRotateDegree(Checker.kt:167)
	at com.forjrking.lubankt.CompressEngine.compress(CompressEngine.kt:48)
	at com.forjrking.lubankt.AbstractFileBuilder$compress$2.invokeSuspend(Luban.kt:294)
	at com.forjrking.lubankt.AbstractFileBuilder$compress$2.invoke(Unknown Source:10)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:78)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:167)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source:1)
	at com.forjrking.lubankt.AbstractFileBuilder.compress(Luban.kt:272)
	at com.forjrking.lubankt.SingleRequestBuild$asyncRun$1$1.invokeSuspend(Luban.kt:320)
	at com.forjrking.lubankt.SingleRequestBuild$asyncRun$1$1.invoke(Unknown Source:10)
	at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
	at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:230)
	at kotlinx.coroutines.flow.internal.ChannelFlowOperatorImpl.flowCollect(ChannelFlow.kt:195)
	at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo$suspendImpl(ChannelFlow.kt:157)
	at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo(Unknown Source:0)
	at kotlinx.coroutines.flow.internal.ChannelFlow$collectToFun$1.invokeSuspend(ChannelFlow.kt:60)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
	at java.lang.Thread.run(Thread.java:1012)
	at com.forjrking.lubankt.CompressThreadFactory$newThread$thread$1.run(Luban.kt:403)

你好可以提供下原图么?

1700394551507

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

3 participants