Problem, kcmshell printmgr crashing in malloc()

Matthias Welwarsky matze at stud.fbi.fh-darmstadt.de
Tue Jun 11 19:37:38 BST 2002


Hi, 

"kcmshell printmgr" crashes for me since I updated from cvs today. This is the 
backtrace:

malloc (bytes=12) at malloc.c:3746
3746              set_foot(remainder, remainder_size);
(gdb) bt
#0  malloc (bytes=12) at malloc.c:3746
#1  0x40f72609 in __builtin_new () at kmcupsmanager.cpp:224
#2  0x404c9d0e in KXMLGUIClient::KXMLGUIClient (this=0x80f80c4)
    at /usr/lib/qt3/include/qmap.h:583
#3  0x4124d8f6 in KMJobViewer::KMJobViewer (this=0x80f7f90, __in_chrg=1,
    parent=0x80f9688, name=0x4129ce44 "JobViewer") at kmjobviewer.cpp:58
#4  0x4124cd8b in KMPages::initialize (this=0x80f9688) at kmpages.cpp:60
#5  0x4124cb15 in KMPages::KMPages (this=0x80f9688, parent=0x80c7640,
    name=0x4129bd10 "PrinterPages") at kmpages.cpp:36
#6  0x41245430 in KMMainView::KMMainView (this=0x80c7640, parent=0x80c5a90,
    name=0x411fab91 "MainView", coll=0x0) at kmmainview.cpp:94
#7  0x411fa278 in KCMPrintMgr::KCMPrintMgr (this=0x80c5a90, parent=0x0,
    name=0x411faa9a "kcmprintmgr") at kcmprintmgr.cpp:48
#8  0x411fa14a in create_printmgr (parent=0x0) at kcmprintmgr.cpp:33
#9  0x40029d70 in load (mod=@0xbffff3c0, libname=@0xbffff2b4, 
loader=0x80aeb68)
    at modloader.cpp:71
#10 0x40029f1f in ModuleLoader::loadModule (mod=@0xbffff3c0,
    withfallback=false) at modloader.cpp:102
#11 0x4002781a in main (_argc=2, _argv=0xbffff5f4) at kcmshell.cpp:223
#12 0x40fd2c5f in __libc_start_main () at kmcupsmanager.cpp:224

 I also have a report from valgrind that might reveal something. 
Interestingly, only calling "kcmshell --list" in valgrind gives the following 
result:

==27802== Invalid free() / delete / delete[]
==27802==    at 0x4003D0BF: __builtin_vec_delete (vg_clientmalloc.c:726)
==27802==    by 0x40EDE166: QString::deref(void) (in 
/usr/lib/qt3/lib/libqt-mt.so.3.0.4)
==27802==    by 0x40EDE228: QString::operator=(QString const &) (in 
/usr/lib/qt3/lib/libqt-mt.so.3.0.4)
==27802==    by 0x402E6F55: KCGlobal::baseGroup(void) 
(/usr/lib/qt3/include/qstring.h:50)
==27802==    Address 0x413F14FC is not stack'd, malloc'd or free'd
==27802==
==27802== Invalid free() / delete / delete[]
==27802==    at 0x4003D04F: __builtin_delete (vg_clientmalloc.c:709)
==27802==    by 0x40EDE185: QString::deref(void) (in 
/usr/lib/qt3/lib/libqt-mt.so.3.0.4)
==27802==    by 0x40EDE228: QString::operator=(QString const &) (in 
/usr/lib/qt3/lib/libqt-mt.so.3.0.4)
==27802==    by 0x402E6F55: KCGlobal::baseGroup(void) 
(/usr/lib/qt3/include/qstring.h:50)
==27802==    Address 0x413F152C is not stack'd, malloc'd or free'd

Running "kcmshell printmgr" in valgrind reveals the following, additional 
information:

==27833== Invalid write of size 4
==27833==    at 0x40782CFE: KXMLGUIClient::KXMLGUIClient(void) 
(/usr/lib/qt3/include/qmap.h:66)
==27833==    by 0x44AEC8F6: KMJobViewer::KMJobViewer(int, QWidget *, char 
const *) (kmprinterpage.h:58)
==27833==    by 0x44AEBD8B: KMPages::initialize(void) (kmpages.cpp:60)
==27833==    by 0x44AEBB15: KMPages::KMPages(QWidget *, char const *) 
(kmpages.cpp:36)
==27833==    Address 0x431FDB60 is 0 bytes after a block of size 316 alloc'd
==27833==    at 0x4003CE9B: __builtin_new (vg_clientmalloc.c:643)
==27833==    by 0x44AEBD82: KMPages::initialize(void) (kmpages.cpp:60)
==27833==    by 0x44AEBB15: KMPages::KMPages(QWidget *, char const *) 
(kmpages.cpp:36)
==27833==    by 0x44AE4430: KMMainView::KMMainView(QWidget *, char const *, 
KActionCollection *) (kmmainview.cpp:94)

These continue, one for each KMPages object being initialized. Maybe the heap 
is corrupted there already? 

regards,
	matze
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: signature
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20020611/912340d2/attachment.sig>


More information about the kde-core-devel mailing list