-
Notifications
You must be signed in to change notification settings - Fork 71
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
Run the demo, it has a NPE, msg is "Inflater has been closed" #138
Comments
could you share some details on how you run the demo? |
I have established a application module, then copy the code in the SamplePatchApplier class into MainActivity, after launch it show "Inflater has been closed". |
Hi, multiple things could have gone wrong here. One thing to try is to remove the part of the code that compresses the patch and decompress it. (e.g., generate the patch using just FileByFileDeltaGenerator without DeflaterOutputStream, apply the patch using FileByFileDeltaApplier). If that works, we know the problem is within the compression bit. If that doesn't, then something is probably wrong within the patching part. |
Thank you for you reply. I have remove the DeflaterOutputStream, it still have the same NPE. It is DefaultDeflateCompressionDiviner's method--divineDeflateParameters go wrong. And i directly use BsDiffDeltaGenerator to generate the delta, the output file is aways about 20B. |
1. Does the NPE occur in the applier or the generator? (AFAIK,
DefaultDeflateCompressionDiviner is in the generator but you previously
said you copied the code from the sample applier).
2. If you used "BsDiffDeltaGenerator" to generate the delta, you need to
use BsDiffDeltaApplier to apply the delta.
(Also, 20 bytes for a patch seem really small, do you mind sending me your
old and new archive to test?)
…On Sat, 6 Jul 2019 at 17:57, yhcommute ***@***.***> wrote:
Thank you for you reply. I have remove the DeflaterOutputStream, it still
have the same NPE. It is DefaultDeflateCompressionDiviner's
method--divineDeflateParameters go wrong. And i directly use
BsDiffDeltaGenerator to generate the delta, the output file is aways about
20B.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#138?email_source=notifications&email_token=AAYQENYS6Z3R5PFMTRAZYELP6DFHBA5CNFSM4H6LQZDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZK46EI#issuecomment-508940049>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAYQEN2VUZNJV45KRZXJWJTP6DFHBANCNFSM4H6LQZDA>
.
|
|
1. You can send them to pan.song@dhs.sg
2. If possible, can you send me your code in MainActivity too? It would be
easier to debug what happened with actual code.
Thanks!
…On Sun, 7 Jul 2019, 04:09 yhcommute, ***@***.***> wrote:
1. NPE occur in the generator, i do not have test applier.
2. I test the generator with wexin, qq. And what's your email address,
it's my honor to send old and new archive to you.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#138?email_source=notifications&email_token=ALQLHIEJ4R7S66BLRDELHB3P6FM5PA5CNFSM4H6LQZDKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZLDYNY#issuecomment-508967991>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ALQLHICLZ4RFKNRH52NBG53P6FM5PANCNFSM4H6LQZDA>
.
--
You received this message because you are subscribed to the Google Groups
"Archive Patcher Sync Robot" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ***@***.***
To view this discussion on the web visit
https://groups.google.com/a/google.com/d/msgid/archive-patcher-sync-robot/google/archive-patcher/issues/138/508967991%40github.com
<https://groups.google.com/a/google.com/d/msgid/archive-patcher-sync-robot/google/archive-patcher/issues/138/508967991%40github.com?utm_medium=email&utm_source=footer>
.
|
Old version and new version apk is posted to your email, MainActivity is also in the zip. Thank you for your patience! |
Found the cause. It is due to different implementation of InflaterInputStream in android JDK. In Android, close() ends the inflater all the time. https://chromium.googlesource.com/android_tools/+/refs/heads/master/sdk/sources/android-25/java/util/zip/InflaterInputStream.java#229 In non-Android it only closes if it is created within the InflaterInputStream. https://github.com/openjdk-mirror/jdk7u-jdk/blob/master/src/share/classes/java/util/zip/InflaterInputStream.java#L226 Since we reuse the Inflater here and closes the InflaterInputStream here, it behaves differently on Android. I will have to think about how to fix this. |
Ok, thx! |
PiperOrigin-RevId: 258136655
PiperOrigin-RevId: 258137682
Should be fixed by the commit. |
It still cannot word well in the demo i post you |
BsDiffDeltaGenerator can not generate delta well, the delta size is always 20B. |
|
For the BSDIFF thing, it seems that the task never finish. Probably it times out? Since you are generating patches on Android, it could be very slow. |
ok, thx |
hi, what's the difference between the master and v2, v2 is stable? Thank you very mach! |
Technically speaking, master is stable. I am adding new features to v2. One of them is diffing embedded archives inside archives. |
ok,thank you for your patient! |
it can not work well
The text was updated successfully, but these errors were encountered: