kittoku / Open-SSTP-Client

Open SSTP Client for Android
MIT License
402 stars 104 forks source link

BufferUnderflowException under heavy traffic #35

Closed tormentous closed 3 years ago

tormentous commented 3 years ago

An unexpected event occurred: BufferUnderflowException java.nio.Buffer.nextGetIndex(Buffer.java:493) java.nio.HeapByteBuffer.getShort(HeapByteBuffer.java:258) kittoku.opensstpclient.misc.IncomingBuffer.getShort$app_debug(IncomingBuffer.kt:19) kittoku.opensstpclient.layer.PppClient.proceedNetwork(PppClient.kt:245) kittoku.opensstpclient.layer.PppClient.proceed$app_debug(PppClient.kt:356) kittoku.opensstpclient.ControlClient$run$1.invokeSuspend(ControlClient.kt:293) kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678) kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)

kittoku commented 3 years ago

Do you encounter this error frequently?

tormentous commented 3 years ago

During streams and heavy traffic

kittoku commented 3 years ago

Still stuck for reproducing this error. Could you share a link of streaming which cause your error?

tormentous commented 3 years ago

Either youtube or p*rnhub would do. this happens occasionally when on heavy traffic, try to open chrome and open multiple tabs, then I use the youtube app, maybe this is because of my RAM since I only got 1GB?

Still stuck for reproducing this error. Could you share a link of streaming which cause your error?

kittoku commented 3 years ago

I'm afraid I decided to leave this issue open but won't try fixing immediately. If there is a person who meet the same error, please report here.

It may not help you, but reconnection setting could be a workaround.

kittoku commented 3 years ago

I don't think payloads of SSTP can be fragmented, but it could be a cause.

If you are interested in debugging, please try osc-fragment.apk and share a log.

kittoku commented 3 years ago

Reopen if anyone has additional information!