Re: [Harbour] hbzlib error
Hi Przemek, - Original Message - From: "Przemyslaw Czerpak" <[EMAIL PROTECTED]> To: "Harbour Project Main Developer List." Sent: Friday, March 14, 2008 2:44 AM Subject: Re: [Harbour] hbzlib error I haven't but I know what sth what can be source of such problems. Inside XHB lib we have very old ZLIB code and if you are linking your application also with this library then mixed functions from original ZLIB and this library may cause problems. Please try to build myzip but eliminate from link script any references to XHB.LIB and check if it's still wrong. For me it works well without any problems. Already done, there is no reference to xhb. Compiled and linked with minimal list of libs and using sample myzip.prg But result is the same. I have built hbzlib it using zlib123-dll.zip as downloaded from zlib.net and I got the error of wrong zip as explained before. I have also built the library using http://www.winimage.com/zLibDll/zlib123dll.zip But after a successfull built the program GPFs and I got ther error: ModLoad: 0040 0048e000 C:\cvs\HARBOU~1\contrib\hbzlib\tests\myzip.exe ModLoad: 7c91 7c9c6000 C:\WINDOWS\system32\ntdll.dll ModLoad: 7c80 7c90 C:\WINDOWS\system32\kernel32.dll ModLoad: 1000 10016000 C:\cvs\HARBOU~1\contrib\hbzlib\tests\ZLIBWAPI.DLL ModLoad: 73d0 73d27000 C:\WINDOWS\system32\CRTDLL.dll ModLoad: 7e39 7e42 C:\WINDOWS\system32\USER32.DLL ModLoad: 77e4 77e87000 C:\WINDOWS\system32\GDI32.dll ModLoad: 7634 7635d000 C:\WINDOWS\system32\IMM32.DLL ModLoad: 77f4 77feb000 C:\WINDOWS\system32\ADVAPI32.dll ModLoad: 77da 77e31000 C:\WINDOWS\system32\RPCRT4.dll ModLoad: 008c 00915000 C:\Programmi\Agnitum\Outpost Firewall\wl_hook.dll (184.bc): Access violation - code c005 (first chance) First chance exceptions are reported before any exception handling. This exception may be expected and handled. eax= ebx=4000 ecx= edx=8000 esi=0097f0b0 edi=0097ad7c eip=0097ad7c esp=0012fd8c ebp=00955a28 iopl=0 nv up ei pl zr na pe nc cs=001b ss=0023 ds=0023 es=0023 fs=003b gs= efl=00010246 0097ad7c 8411testbyte ptr [ecx],dl ds:0023:=?? After some days of troubling I have also tryed to build a my own version of zlib directly from sources and it *seems* to work using last zlib 1.23 version and without needs of external dll. Now I have to solve only a problem with one file handle not closed after call of zip function, but zip files (with also big files) are ok. Surely it is not correct because I have left original calls (just some changes to pacify some warnings), but for now seems to be running. I have to test it in a bigger application, but for now it is sufficient. Thank you for help Best regards Francesco ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] hbzlib error
I need to zip / unzip some files and I'm testing hbzlib but I have found a problem under BCC / WinXP (not tested yet in other environments). If I compress simple files it creates a valid zip file, but if I compress even one only exe file (about 600kb of size) the zip is corrupted. Tested either with my prgs than with myzip.prg in harbour/contrib/hbzlib/tests. (running: myzip test.zip myfile.exe ) Anyone experiences this ? Hi, I haven't noticed it before, but I can reproduce the problem now. File zipped with myzip.exe and unzipped with myunzip.exe becomes corrupted (shorter, in my case 606208 bytes instead of original 623616). The problem is with zip, but not unzip (3rd party software gives error, trying to unzip files made by myzip.exe). I've traced main loop of hb_zipStoreFile(): while ( ( ulLen = hb_fsReadLarge( hFile, pString, 1024 * 16 ) ) > 0 ) { zipWriteInFileInZip( hZip, pString, ulLen ); } zipCloseFileInZip( hZip ); I found no problem, i.e., all file is buffered into zip, and zipWriteInFileInZip() and zipCloseFileInZip() return no error. Looks like bug in minizip code. I'll try to find a problem in spare time. Best regards, Mindaugas ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] hbzlib error
Looks like bug in minizip code. I'll try to find a problem in spare time. Hi, my bug in minizip code. Just add symbol ";" in the end of contrib/hbzlib/zip.c line 1054. I have no time to commit the fix now. Best regards, Mindaugas ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour
Re: [Harbour] hbzlib error
Hi Mindaugas, - Original Message - From: "Mindaugas Kavaliauskas" <[EMAIL PROTECTED]> To: "Harbour Project Main Developer List." Sent: Friday, March 14, 2008 3:55 PM Subject: Re: [Harbour] hbzlib error I haven't noticed it before, but I can reproduce the problem now. File zipped with myzip.exe and unzipped with myunzip.exe becomes corrupted (shorter, in my case 606208 bytes instead of original 623616). The problem is with zip, but not unzip (3rd party software gives error, trying to unzip files made by myzip.exe). I've traced main loop of hb_zipStoreFile(): while ( ( ulLen = hb_fsReadLarge( hFile, pString, 1024 * 16 ) ) > 0 ) { zipWriteInFileInZip( hZip, pString, ulLen ); } zipCloseFileInZip( hZip ); I found no problem, i.e., all file is buffered into zip, and zipWriteInFileInZip() and zipCloseFileInZip() return no error. Looks like bug in minizip code. I'll try to find a problem in spare time. Yes, exactly. Thank you, I hope you will find the time. Could you find time also to see if it is possible to build a static lib without needs of external dll ? Best regards Francesco ___ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour