Re: KLinkStatus crash
Paulo Jorge Guedes <[email protected]>
| Newsgroups | gmane.comp.kde.devel.quanta |
|---|---|
| Message-ID | <F8784F641CC587479DC4FD0A08E9571DE3E7FF@SRVEXC02.corp.artelecom.pt> |
> ---------- Forwarded Message ---------- > > Subject: Re: [quanta-devel] KLinkStatus crash > Date: Wednesday 08 February 2006 09:54 > From: Andras Mantia <[email protected]> > To: Quanta developers list <[email protected]> > > On Wednesday 08 February 2006 03:16, Jens Herden wrote: > > Very strange. I tried Andras tip and I got the message that there are > > more than 30.000 errors and that I should go and fix my application > > from valgrind :-) > > I also run and found the crash as well.Regarding the errors, many came > from > X, ICE and some from Qt, you can ignore them. The interesting errors are > those coming from your code. There are a lot regarding painting the cells > in > TreeView/TreeViewItem. But the problem seem to be in other place > (non-formatted text, so use a wide window to see it): > [...] > All of those come to line 472 of linkchecker.cpp, which reads: > KURL url (url.url().left(i_ref)); > this is wrong, as it should be > KURL url = KURL::fromPathOrURL(url.url().left(i_ref)); > > but the bug is not this, but the "url.url()" call. So somehow url is > corrupted. Possible problems: > > 1) The linkStatus() is invalid or some of its members are uninitialized. > 2) linkStatus()->absoluteUrl() returns a reference to a KURL which was set > via a reference passing. If the original URL does not exists or something > similar, this results in the bug. > > You know your code better, so now it is up to you to fix. ;-) Thanks a lot Andras. I already had fix this but forgot to backport into 3.5 :( It seems a bug in g++, if you notice that a variable called "url" was already declared in the beginning of the method body, i.e. in conflicting scopes. I committed the minimal change now and when I arrive home I will investigate your fromPathOrURL suggestion :) Paulo