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

List:       kde-devel
Subject:    Re: Crash in KTar
From:       Nicolas Goutte <nicog () snafu ! de>
Date:       2002-12-13 14:24:33
[Download RAW message or body]

Are you using gcc 3.2 (perhaps even with a -march=pentium2 or higher?)

If yes, try to find the memcpy that makes the crash and replace it with a 
qmemmove (same parameters.) It seems that gcc has a bug with some memcpy 
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 = 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 = QExtFileInfo::allFilesRelative(dirURL, "*");
>   for ( KURL::List::Iterator it_f = files.begin(); it_f != files.end();
> ++it_f )
>   {
>     QString name = (*it_f).fileName();
>
>     QFile file(dirURL.path()+name);
>     file.open(IO_ReadOnly);
>     QByteArray bArray = 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  <signal handler called>
> #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 () from
> /opt/kde-cvs/lib/libkio.so.4 #12 0x080a2be9 in QuantaApp::slotEmailDTD
> (this=0x8207d50) 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 slows
> down, even if top shows that the CPU is 99% idle.
>
> The main question is: does anybody know why that crash happens now? I would
> 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 <<
[prev in list] [next in list] [prev in thread] [next in thread] 

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