From kde-devel Fri Dec 13 14:24:33 2002 From: Nicolas Goutte Date: Fri, 13 Dec 2002 14:24:33 +0000 To: kde-devel Subject: Re: Crash in KTar X-MARC-Message: https://marc.info/?l=kde-devel&m=103978969308936 Are you using gcc 3.2 (perhaps even with a -march=3Dpentium2 or higher?) If yes, try to find the memcpy that makes the crash and replace it with a= =20 qmemmove (same parameters.) It seems that gcc has a bug with some memcpy=20 calls. Have a nice day/evening/night! On Friday 13 December 2002 13:33, Andras Mantia wrote: > Hi, > > There is something wrong with KTar class in HEAD. The following code > worked OK some weeks ago, but now it crashes: > > KTempFile* tempFile =3D new KTempFile(tmpDir, ".tgz"); > tempFile->setAutoDelete(true); > //pack the .tag files and the description.rc into a .tgz file > KTar tar(tempFile->name(), "application/x-gzip"); > tar.open(IO_WriteOnly); > ... > KURL::List files =3D QExtFileInfo::allFilesRelative(dirURL, "*"); > for ( KURL::List::Iterator it_f =3D files.begin(); it_f !=3D files.en= d(); > ++it_f ) > { > QString name =3D (*it_f).fileName(); > > QFile file(dirURL.path()+name); > file.open(IO_ReadOnly); > QByteArray bArray =3D file.readAll(); > tar.writeFile(dirURL.fileName()+"/"+name, "user", "group", > bArray.size(), bArray.data()); > file.close(); > } > tar.close(); > > The crash is at tar.writeFile() and the backtrace is: > [New Thread 1024 (LWP 21085)] > 0x4140a079 in wait4 () from /lib/libc.so.6 > #0 0x4140a079 in wait4 () from /lib/libc.so.6 > #1 0x41484b98 in __DTOR_END__ () from /lib/libc.so.6 > #2 0x41266072 in waitpid () from /lib/libpthread.so.0 > #3 0x40a44fcb in KCrash::defaultCrashHandler () > from /opt/kde-cvs/lib/libkdecore.so.4 > #4 0x41263a74 in pthread_sighandler () from /lib/libpthread.so.0 > #5 > #6 0x413dd7f7 in memcpy () from /lib/libc.so.6 > #7 0x41c03f46 in KGzipFilter::uncompress () > from /opt/kde-cvs/lib/kde3/kgzipfilter.so > #8 0x405d2ea7 in KFilterDev::readBlock () from > /opt/kde-cvs/lib/libkio.so.4 #9 0x405d2ce8 in KFilterDev::at () from > /opt/kde-cvs/lib/libkio.so.4 #10 0x40609213 in KTar::prepareWriting () = from > /opt/kde-cvs/lib/libkio.so.4 #11 0x40616114 in KArchive::writeFile () f= rom > /opt/kde-cvs/lib/libkio.so.4 #12 0x080a2be9 in QuantaApp::slotEmailDTD > (this=3D0x8207d50) at quanta.cpp:2477 > > Sometimes it crashes at first run, sometimes on the second. And what is > even more strange that for some seconds after the crash, the keyboard s= lows > down, even if top shows that the CPU is 99% idle. > > The main question is: does anybody know why that crash happens now? I w= ould > be also thank if somebody would test if Quanta 3.1 (from KDE 3.1 RC5) > crashes or not with KDE 3.1 BRANCH when you select eg. "Tools->Send DTD= in > E-Mail". I'm worried as I use the KTar in lot of places in Quanta, and = this > means crash in lot of places. :-( > > Andras > > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to > >> unsubscribe << >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<