Crash in KRecentFilesAction related to KURL handling

Andras Mantia amantia at
Tue Dec 20 19:07:34 GMT 2005


 I may regret the day when I implemented the shortname feature in 
In KRecentFilesAction::addURL there is a workaround to avoid a crash, 
wheree the manipulation is done on a copy of a KURL. David (Faure) 
corrected my comment to look like this:

     const KURL u = url; // make a copy since d->m_urls.erase( title ) 
could destroy the KURL that "url" references

Unfortunately it doesn't seem to help and now I'm clueless. The code in 
this method looks correct, still it corrupts KURL. Later down in the 
same method there is a line:
    d->m_urls.insert( title, u );

After this line the "url" is corrupted. "url" is passed as "const KURL& 
url", those it is corrupted also in the method where it might be used, 
so the crash can happen anytime after a KRecentFilesAction::addURL call 
where the url argument is used.

Does anyone have a clue what can happen here? I may try valgrind if it 
works on x86_64, but only with addrcheck.


Quanta Plus developer -
K Desktop Environment -
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <>

More information about the kde-core-devel mailing list