[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: dynamic_cast failure
From: Josef Spillner <dr_maux () maux ! de>
Date: 2001-07-27 7:31:42
[Download RAW message or body]
When using KMainWindow's createGUI() method without having an XML file
present, it is possible that this leads to a crash.
The critical point is in KAction::plugMainWindowAccel, line 565:
KMainWindow * mw = dynamic_cast<KMainWindow *>(tl);
// try to see if it's a kmainwindow
I'm not sure why this segfaults, because when I tested it with
if(tl->inherits("KMainWindow"))
it returns true.
So I replaced the remaining lines with:
if(tl->inherits("KMainWindow"))
{
plugAccel(((KMainWindow*)tl)->accel());
}
This works for me and doesn't seem to affect other apps in a negative way.
Josef
The original backtrace was:
(no debugging symbols found)...0x40b75d29 in wait4 () from /lib/libc.so.6
#0 0x40b75d29 in wait4 () from /lib/libc.so.6
#1 0x40bd0cd8 in __check_rhosts_file () from /lib/libc.so.6
#2 0x40e7a65b in waitpid () from /lib/libpthread.so.0
#3 0x409f9975 in KCrash::defaultCrashHandler ()
from /usr/local/kde2.2/lib/libkdecore.so.3
#4 0x40b17868 in sigaction () from /lib/libc.so.6
#5 0x40850ab1 in KAction::plugMainWindowAccel ()
from /usr/local/kde2.2/lib/libkdeui.so.3
#6 0x4084fb9e in KAction::plug () from /usr/local/kde2.2/lib/libkdeui.so.3
#7 0x40889a46 in KXMLGUIFactory::buildRecursive ()
from /usr/local/kde2.2/lib/libkdeui.so.3
#8 0x4088b1fd in KXMLGUIFactory::buildRecursive ()
from /usr/local/kde2.2/lib/libkdeui.so.3
#9 0x4088b1fd in KXMLGUIFactory::buildRecursive ()
from /usr/local/kde2.2/lib/libkdeui.so.3
#10 0x4088891b in KXMLGUIFactory::addClient ()
from /usr/local/kde2.2/lib/libkdeui.so.3
#11 0x407f5449 in KMainWindow::createGUI ()
from /usr/local/kde2.2/lib/libkdeui.so.3
#12 0x80501e7 in QWidget::closeEvent ()
#13 0x804cdc1 in QWidget::closeEvent ()
#14 0x40b11a52 in __libc_start_main () from /lib/libc.so.6
--
The MindX Open Source Project: Fighting proprietary games
GGZ now! - The GGZ Gaming Zone: http://ggz.sourceforge.net
ggz.morat.net | ggz.snafu.de | jzaun.com | mindx.sourceforge.net/europeone
>> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic