[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Strange crash in kmimemagic.h
From:       David Faure <david () mandrakesoft ! com>
Date:       2001-04-06 23:55:04
[Download RAW message or body]

On Saturday 07 April 2001 00:44, Wynn Wilkes wrote:
> Hello,
> 
> I've been using the HEAD Branch of kde, and the KDEVELOP_1_4 branch of 
> kdevelop.  This week a strange crash started happening whenever I attempted 
> to open a file or new project.  The pertinent part of the backtrace looks 
> like:
> #2  0x40a2e110 in KCrash::defaultCrashHandler (signal=11) at kcrash.cpp:194
> #3  <signal handler called>
> #4  0x40cc483d in QString::QString () from /usr/lib/qt2/lib/libqt.so.2
> #5  0x400c0a30 in KMimeMagicResult::mimeType (this=0x83426a0)
>     at /opt/kde-cvs/include/kmimemagic.h:52

Huh, I did quite some changes to KMimeMagic recently....

> #6  0x4064cbf8 in KMimeType::findByURL (_url=@0x8342274, _mode=32768,
>     _is_local_file=true, _fast_mode=false) at kmimetype.cpp:245

Can you print out the URL it's looking at ?
If you open Konqueror on that directory, does it crash looking at the same file ?

> There were a couple of other situations where KMimeMagicResult::mimeType() 
> also crashed.  In trying to debug it, it looked like the m_strMimeType ( a 
> QString ) in the KMimeMagicResult class was being corrupted, leading to the 
> segfault.  This happens in the static void refineResult method in 
> kmimemagic.cpp:1958 right after line 1961.  I can't see where this is 
> happening.

Any interesting debug output if you s,//kdDebug,kdDebug, in kmimemagic.cpp ?
(it's what I do to debug kmimemagic - we don't want the calls to remain there
because this code is quite performance-critical).

I doubt KFile is to blame here - it's KMimeType that calls KMimeMagic, so
there are too many layers in between. And I know I changed KMimeMagic
quite much recently :} Can't see what caused this though.

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic