KFilterDev bug?

David Faure faure at kde.org
Wed Dec 3 09:58:21 GMT 2003


On Wednesday 03 December 2003 00:46, Craig Drummond wrote:
> On Tuesday 02 December 2003 18:02, David Faure wrote:
> > > If I change the code to use zlib directly, the problem no longer occurs.
> >
> > Very surprising since KFilterDev, well, uses zlib directly, and passes it
> > data in chunks, so it shouldn't consume that much memory.
> >
> > Anyway the "couldn't open underlying device" is the real problem. Are you
> > sure you're giving it a filename pointing to a file that exists?
> 
> Giving it a quick look, the KFilerDev errors are because when looking for a 
> font I look into 3 directories: /usr/local/share/fonts/<font> 
> /usr/share/fonts/<font> and /usr/X11R6/lib/X11/fonts/<font>  And it is in the 
> third one where the font is located. Stepping through the code each time, the 
> third call works - and no KFilterDev error is produced.

So you're opening KFilterDev on non-existing files? That's obviously the cause
for the warnings (but not for the mem consumption).

> > If yes, the open call that fails is in kfilterdev.cpp line 131 - can you
> > step into it to see why it fails? This is all with kdelibs CVS head, right?
> 
> Well my CVS is about a month old - but the original reporter's is from Nov 
> 28th. But as the third call works (as it should), then KFilterDev isn't 
> failing. So, I pressume the error is in my use of KFitlerDev - can you have a 
> quick look at kdebase/kcontrol/kfontinst/lib/CompressedFile.cpp and see if 
> I'm doing something stupid.
The code looks fine at first sight, but see below.

> Would there be a problem with me just changing the code back to using zlib 
> directly (it used to originally - about 2 years ago)? Seems a lot more 
> efficient - especially seeing as I have 1892 bitmap fonts in one directory.
In the case that works, above, did you see any high mem consumption?
How big is the "len" parameter in read()?

Yes, there would be a problem with going back to zlib: leaving a possibly
serious bug in KFilterDev undebugged, possibly affecting other apps :)

-- 
David FAURE, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list