* * *

Author Topic: paszlib deflate problem  (Read 442 times)

Ross

  • New member
  • *
  • Posts: 11
paszlib deflate problem
« on: December 05, 2017, 01:27:45 am »
I wrote a utility using the paszlib (TZipper) to zip files and I have just recently noticed that when unzipping, the file javafx_font_t2k.dll in the Java JRE I get a CRC error.
This only happens when compression level is set to normal, it extracts fine when compressed with fastest or max level.  I am using FPC 3.0 on 64 bit windows.
I have no clue as to why this is happening now as I never saw this with previous versions of FPC.
I use paszlib to create the zip and to extract it.

molly

  • Hero Member
  • *****
  • Posts: 2019
Re: paszlib deflate problem
« Reply #1 on: December 05, 2017, 09:54:41 pm »
As was suggested in the bugtracker: try to compile with a newer version of fpc.

The zipper class had some updates/fixes after the release of fpc 3.0.0 and some of those fixes where related to 64 bit. Have you tried to compile for 32 bit, an did that work as expected ?

Since you seem to be stuck on the one file that fails, please supply the file so others are able to reproduce. You can't expect others to a wild goose-chase for all those  different versions of JRE that are available, to perhaps be able to end up with the file you're talking about. For instance are you talking about the 32 or 64 bit version of JRE ?

Other than that i don't agree with their binary code agreement (or whatever the thing is named) so that prevents me from downloading.

Ross

  • New member
  • *
  • Posts: 11
Re: paszlib deflate problem
« Reply #2 on: December 06, 2017, 04:01:02 am »
I am using Lazarus 1.6 with
FPC 3.0.0
SVN Revision 51630
i386-win32-win32/win64

I have uploaded a minimal project zip and the problem file javafx_font_t2k.dll which is from JRE jre1.8.0_102 64 bit version of JRE.

molly

  • Hero Member
  • *****
  • Posts: 2019
Re: paszlib deflate problem
« Reply #3 on: December 06, 2017, 06:21:28 am »
Thank you Ross,

I am able to confirm the issue with newer fpc/32 bit, even though none of the zip-tools i've used to test the generated zip-file seems to report any particularities. It is therefor likely that there is something amiss in the unzip functionality. That is probably also why the bug-report was assigned  :)
« Last Edit: December 06, 2017, 06:38:03 am by molly »

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5875
Re: paszlib deflate problem
« Reply #4 on: December 06, 2017, 10:31:54 am »
The related bugreport points to an underflow in infcodes. But IIRC I already checked that once, and should C work the same.

Ross

  • New member
  • *
  • Posts: 11
Re: paszlib deflate problem
« Reply #5 on: December 06, 2017, 03:19:54 pm »
I have overflow checking off in my project.
When zipped with cldefault compression level I see that the packed size is smaller than it should be.  This is compared with zip created with 7zip at same compression level.
Very odd that I have only seen this issue with the javafx_font_t2k.dll file and only when compression level is cldefault.
I have zipped hundreds of thousands of files and only this particular one fails!

DonAlfredo

  • Hero Member
  • *****
  • Posts: 811
Re: paszlib deflate problem
« Reply #6 on: December 06, 2017, 03:27:32 pm »
This will not help much, but:
TZipper has been in use by fpcupdeluxe for a long time now. Only last month, the CRC error happened with a single zip containing library files that was zipped with winrar, at a single, non-changing file in a zip with changing files.

molly

  • Hero Member
  • *****
  • Posts: 2019
Re: paszlib deflate problem
« Reply #7 on: December 06, 2017, 04:23:45 pm »
In addition to that:
- every other zip tool is able to extract the file without problems
- fpc 3.0.2 shows the same problem, it does show the correct CRC and (uncompressed) filesize  in the zipfileentries collection.
- fpc 2.6.4 is able to create and extract this file.

Unfortunately i don't have my other FPC's with me atm...
« Last Edit: December 06, 2017, 04:32:52 pm by molly »

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus