-
Notifications
You must be signed in to change notification settings - Fork 261
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
java.lang.IndexOutOfBoundsException when use withStringCompressed(true) #1984
Comments
@HuangXingBo Could you take a look at this issue? Seems we should check |
Hi @wzhongke , could you disable string compression? This will keep behaviour consistent with fury 0.8.0. The serialization will still work. Of course the serialized data will be larger. |
OK, thanks |
@wzhongke Would you like to create a PR to fix this? We can make a release in next two weeks |
…g during deserialization when string compression is enabled. (#1991) Fix the issue caused by not using readCompressedBytesString during deserialization when string compression is enabled. <!-- **Thanks for contributing to Fury.** **If this is your first time opening a PR on fury, you can refer to [CONTRIBUTING.md](https://github.com/apache/fury/blob/main/CONTRIBUTING.md).** Contribution Checklist - The **Apache Fury (incubating)** community has restrictions on the naming of pr titles. You can also find instructions in [CONTRIBUTING.md](https://github.com/apache/fury/blob/main/CONTRIBUTING.md). - Fury has a strong focus on performance. If the PR you submit will have an impact on performance, please benchmark it first and provide the benchmark result here. --> ## What does this PR do? fix issue [#1984 ](#1984) <!-- Describe the purpose of this PR. --> ## Related issues <!-- Is there any related issue? Please attach here. - #xxxx0 - #xxxx1 - #xxxx2 --> ## Does this PR introduce any user-facing change? <!-- If any user-facing interface changes, please [open an issue](https://github.com/apache/fury/issues/new/choose) describing the need to do so and update the document if necessary. --> - [ ] Does this PR introduce any public API change? - [ ] Does this PR introduce any binary protocol compatibility change? ## Benchmark <!-- When the PR has an impact on performance (if you don't know whether the PR will have an impact on performance, you can submit the PR first, and if it will have impact on performance, the code reviewer will explain it), be sure to attach a benchmark data here. -->
Search before asking
Version
0.9.0
Component(s)
Java
Minimal reproduce step
What did you expect to see?
No error
What did you see instead?
Exception in thread "main" org.apache.fury.exception.DeserializationException: Deserialize failed, read objects are: [Main.Simple(str=null)]
at org.apache.fury.util.ExceptionUtils.handleReadFailed(ExceptionUtils.java:63)
at org.apache.fury.Fury.deserialize(Fury.java:797)
at org.apache.fury.Fury.deserialize(Fury.java:714)
at org.apache.fury.ThreadLocalFury.deserialize(ThreadLocalFury.java:137)
at com.lenovo.awakens.Main.main(Main.java:33)
Caused by: java.lang.IndexOutOfBoundsException: readerIndex(30) + length(81) exceeds size(123): org.apache.fury.memory.MemoryBuffer$BoundChecker@2584b82d
at org.apache.fury.memory.MemoryBuffer$BoundChecker.fillBuffer(MemoryBuffer.java:186)
at org.apache.fury.memory.MemoryBuffer.checkReadableBytes(MemoryBuffer.java:2412)
at org.apache.fury.serializer.StringSerializer.readBytesUnCompressedUTF16(StringSerializer.java:434)
at org.apache.fury.serializer.StringSerializer.readBytesString(StringSerializer.java:206)
at com.lenovo.awakens.Main_SimpleFuryRefCodec_0.read(Main_SimpleFuryRefCodec_0.java:56)
at org.apache.fury.Fury.readDataInternal(Fury.java:959)
at org.apache.fury.Fury.readRef(Fury.java:861)
at org.apache.fury.Fury.deserialize(Fury.java:793)
... 3 more
Anything Else?
I think it might be a problem here, but I am not sure about it
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: