[Kdenlive-devel] Piave memory leak update

Jason Wood jasonwood at blueyonder.co.uk
Sun Oct 5 15:31:58 UTC 2003


On Friday 03 Oct 2003 6:23 pm, Jason Wood wrote:
> Hi,
>
> With the aid of valgrind, I have found the cause of the memory leak in
> piave, although I haven't yet figured out how to fix it yet ;-)

Hmm, actually the log could be misleading - I used the --show-reachable 
option, which can show memory that has been free'ed by the app, although 
adding a couple of informational strings in property.cc did show that the 
constructors were being called more often than the destructor - so I am still 
investigating.

I noticed another issue with piave which I am now fixing on my local copy - 
piave still makes use of <message></message> tags to wrap incoming messages.

This is fine until the message becomes longer than a single tcp packet - it 
then tries to wrap what may be (and with reasonably complex timelines, will 
be) a partial message, causing a lot of errors, in particular, with the 
timeline not being parsed correctly.

I think this is a throwback to the old days before we agreed to have \n\n at 
the end of every message (well, you agreed all along but it took me a while 
to come round to it ;-))

The fix I am applying is in server.cc - I am changing the receiveMessage() 
method to only return complete messages (i.e., it caches bytes until it 
discovers a \n\n, and then sends the complete message). Do you see anything 
wrong with this?

Cheers,
Jason

-- 
Jason Wood
Homepage : www.uchian.pwp.blueyonder.co.uk





More information about the Kdenlive mailing list