synaptic-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Synaptic-devel] Strange segfault


From: Andrey Tarassov
Subject: Re: [Synaptic-devel] Strange segfault
Date: Fri, 16 Apr 2004 14:42:05 +0100
User-agent: Mozilla Thunderbird 0.5 (X11/20040208)

Yeah! That really helped! But how does the pkgSourceList destructor gets called before the lists are refreshed? Is there any way to eliminate the memory leak as well?

Thanks,

Andrey

Panu Matilainen wrote:
On Fri, 16 Apr 2004, Andrey Tarassov wrote:

Well, actually message seems to be ok, but it may get garbled exactly in that block that checks for autentication. I added some returns and test outputs from that place and found that segfault was caused when trying to access Repository->Vendor->FingerPrint, just like you described.


Ok so it's indeed the same problem. And from that came the realization of the fundamental difference between apt-get vs apt-shell and synaptic: in apt-get the update step is a separate program launch, whereas apt-shell and synaptic continue the session .. this makes the problem go away:

--- apt-0.5.15cnc6/apt-pkg/sourcelist.cc.vndr
+++ apt-0.5.15cnc6/apt-pkg/sourcelist.cc @@ -145,9 +145,11 @@
 {
    for (const_iterator I = SrcList.begin(); I != SrcList.end(); I++)
       delete *I;
+#if 0
    for (vector<Vendor const *>::const_iterator I = VendorList.begin();
        I != VendorList.end(); I++)
       delete *I;
+#endif
 }
/*}}}*/ // SourceList::ReadVendors - Read list of known package vendors /*{{{*/

That probably leaves us with a slight memory leak, but even that is better
than segfaulting :)


        - Panu -


_______________________________________________
Synaptic-devel mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/synaptic-devel

--
Andrey Tarasov
Software Engineer

OÜ SOT Finnish Software Engineering
Kreutzwaldi 7-4, 10124 TALLINN, ESTONIA

Phone: +372 641 9975
Fax:   +372 641 9876
address@hidden
http://www.sot.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]