>
> $4048B4C0  LAZARUSPACKAGEINTF_finalize,  line 49 of gtkglobals.ppiphtml.pas
>
> When you see the nonsense filename in the backtrace, you can be almost
> certain, that the backtrace is garbish.
> Probably an error occured earlier, which was not handled correct.
Okay, that is a start
>

> > Begin
> > infile := gzopen(inputfile,'r');
>
> Test if infile<>nil.
>
Did that, no luck, but it would be good practise anyway so thanks for the 
heads up.
I did some old-fashioned writeln('test') style debugging, and found that it 
fails even BEFORE the first line of the function.
In other words,  infile := gzopen(inputfile,'r'); never gets executed.
This means either the access violation is triggered somewhere in the unit 
header, or it is triggered by the units in my uses clause. For starters I 
renamed  the unit global variables to known unique names in case one was 
clashing with something in the gtk units, no luck there. 

Anyway here is my unit header, if the problem is there, then I don't know 
where :)
I can say that the unit now contains ONLY the gz_uncompress function and these 
header lines.

-----------------
unit gztools;
{Some tools for working with gzip compressed files}
Interface

Uses gzio,zutil;


Const
     BufLen = 16384;
     GZ_SUFFIC= '.gz';
     WriteError = -1;
     GzCloseError = -2;
     GzReadError = -3;

Var
     buf: Packed Array [0..BUFLEN-1] of byte;



function gz_uncompress(inputfile,outputfile :string):Integer;
{This was blatantly ripped off from the paszlib examples
Returns 0 on success, else returns an error code
}


Implementation

-----------------

-- 
A.J. Venter
Chief Software Architext
OpenLab International
www.getopenlab.com
www.silentcoder.co.za
+27 82 726 5103

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to