Bug 275023 - ktorrent crash on exit
Summary: ktorrent crash on exit
Status: RESOLVED WORKSFORME
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-06 03:08 UTC by jenna
Modified: 2011-06-23 18:12 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jenna 2011-06-06 03:08:10 UTC
Application: ktorrent (4.1.1)
KDE Platform Version: 4.6.2 (4.6.2)
Qt Version: 4.7.2
Operating System: Linux 2.6.38-8-generic x86_64
Distribution: Ubuntu 11.04

-- Information about the crash:
- What I was doing when the application crashed:
ktorrent is installed from package manager in kubuntu. i have ktorrent running and it has an icon in my taskbar ( a blue arrow ).  i right click the blue arrow and select the option to close the program.    The program crashes and I get this window to submit a crash report.

If you need any more information, let me know.

The crash can be reproduced every time.

-- Backtrace:
Application: KTorrent (ktorrent), signal: Segmentation fault
[Current thread is 1 (Thread 0x7f3936c97780 (LWP 8618))]

Thread 3 (Thread 0x7f3921930700 (LWP 8623)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:162
#1  0x00007f391ed61832 in ?? () from /usr/lib/libQtWebKit.so.4
#2  0x00007f392f2f1d8c in start_thread (arg=0x7f3921930700) at pthread_create.c:304
#3  0x00007f3931fba04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#4  0x0000000000000000 in ?? ()

Thread 2 (Thread 0x7f3914fc6700 (LWP 8633)):
#0  0x00007f392d896094 in g_main_context_prepare () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#1  0x00007f392d896f9d in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f392d897639 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f3933aa3446 in QEventDispatcherGlib::processEvents (this=0x283e3e0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:424
#4  0x00007f3933a77882 in QEventLoop::processEvents (this=<value optimized out>, flags=...) at kernel/qeventloop.cpp:149
#5  0x00007f3933a77abc in QEventLoop::exec (this=0x7f3914fc5dd0, flags=...) at kernel/qeventloop.cpp:201
#6  0x00007f393398e924 in QThread::exec (this=<value optimized out>) at thread/qthread.cpp:492
#7  0x00007f3933a59c2f in QInotifyFileSystemWatcherEngine::run (this=0x21997f0) at io/qfilesystemwatcher_inotify.cpp:248
#8  0x00007f3933991175 in QThreadPrivate::start (arg=0x21997f0) at thread/qthread_unix.cpp:320
#9  0x00007f392f2f1d8c in start_thread (arg=0x7f3914fc6700) at pthread_create.c:304
#10 0x00007f3931fba04d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#11 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f3936c97780 (LWP 8618)):
[KCrash Handler]
#6  0x00007f393679a96d in net::SocketMonitor::Private::shutdown (this=0x23cce10) at /home/j/c/libktorrent-1.1.1/src/net/socketmonitor.cpp:76
#7  0x000000000042d563 in kt::Core::onExit (this=0x1ecbe80) at /home/j/c/ktorrent-4.1.1/ktorrent/core.cpp:903
#8  0x0000000000437ae6 in kt::GUI::queryExit (this=0x1e7f7a0) at /home/j/c/ktorrent-4.1.1/ktorrent/gui.cpp:568
#9  0x00007f3934ac58e4 in KMainWindowPrivate::_k_shuttingDown (this=<value optimized out>) at ../../kdeui/widgets/kmainwindow.cpp:1142
#10 0x00007f3934ac82a9 in KMainWindow::qt_metacall (this=0x1e7f7a0, _c=QMetaObject::InvokeMetaMethod, _id=7, _a=0x7fff76893f20) at ./kmainwindow.moc:102
#11 0x00007f3934afe335 in KXmlGuiWindow::qt_metacall (this=0x1e7f7a0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff76893f20) at ./kxmlguiwindow.moc:102
#12 0x00007f3935f8de20 in KParts::MainWindow::qt_metacall (this=0x1e7f7a0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff76893f20) at ./mainwindow.moc:75
#13 0x000000000043a140 in kt::GUI::qt_metacall (this=0x1e7f7a0, _c=QMetaObject::InvokeMetaMethod, _id=<value optimized out>, _a=0x7fff76893f20) at /home/j/c/ktorrent-4.1.1/build/ktorrent/gui.moc:102
#14 0x00007f3933a8d5f8 in QMetaObject::activate (sender=0x7fff76893fe0, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0x0) at kernel/qobject.cpp:3287
#15 0x00007f3933a7bef3 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1013
#16 0x0000000000429bdf in main (argc=6, argv=0x7fff76894e58) at /home/j/c/ktorrent-4.1.1/ktorrent/main.cpp:177

Reported using DrKonqi
Comment 1 Joris Guisson 2011-06-11 11:26:14 UTC
Could you run it under valgrind ?

valgrind --log-file=vg.log /usr/bin/ktorrent --nofork

Post the generated vg.log file here, this would be very helpful, in analyzing what is going wrong.
Comment 2 jenna 2011-06-12 06:23:10 UTC
here is the vg.log:

==9526== Memcheck, a memory error detector
==9526== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==9526== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
==9526== Command: /usr/bin/ktorrent --nofork
==9526== Parent PID: 4446
==9526== 
==9526== Conditional jump or move depends on uninitialised value(s)
==9526==    at 0xC617510: inflateReset2 (in /lib/x86_64-linux-gnu/libz.so.1.2.3.4)
==9526==    by 0xC617605: inflateInit2_ (in /lib/x86_64-linux-gnu/libz.so.1.2.3.4)
==9526==    by 0xE7481B0: png_create_read_struct_2 (in /lib/x86_64-linux-gnu/libpng12.so.0.44.0)
==9526==    by 0xE748356: png_create_read_struct (in /lib/x86_64-linux-gnu/libpng12.so.0.44.0)
==9526==    by 0x85044F6: QPngHandlerPrivate::readPngHeader() (qpnghandler.cpp:368)
==9526==    by 0x8505224: QPngHandlerPrivate::readPngImage(QImage*) (qpnghandler.cpp:439)
==9526==    by 0x84D5577: QImageReader::read(QImage*) (qimagereader.cpp:1205)
==9526==    by 0x84D5BC6: QImageReader::read() (qimagereader.cpp:1155)
==9526==    by 0x84CAE11: operator>>(QDataStream&, QImage&) (qimage.cpp:5204)
==9526==    by 0x84E5705: operator>>(QDataStream&, QPixmap&) (qpixmap.cpp:1329)
==9526==    by 0x6CC2F5E: KIconLoaderPrivate::findCachedPixmapWithPath(QString const&, QPixmap&, QString&) (kiconloader.cpp:884)
==9526==    by 0x6CC5D38: KIconLoader::loadIcon(QString const&, KIconLoader::Group, int, int, QStringList const&, QString*, bool) const (kiconloader.cpp:1231)
==9526== 
==9526== Conditional jump or move depends on uninitialised value(s)
==9526==    at 0x4EA796B: net::SocketMonitor::Private::shutdown() (socketmonitor.cpp:76)
==9526==    by 0x42D562: kt::Core::onExit() (core.cpp:903)
==9526==    by 0x437AE5: kt::GUI::queryExit() (gui.cpp:568)
==9526==    by 0x6DD58E3: KMainWindowPrivate::_k_shuttingDown() (kmainwindow.cpp:1142)
==9526==    by 0x6DD82A8: KMainWindow::qt_metacall(QMetaObject::Call, int, void**) (kmainwindow.moc:102)
==9526==    by 0x6E0E334: KXmlGuiWindow::qt_metacall(QMetaObject::Call, int, void**) (kxmlguiwindow.moc:102)
==9526==    by 0x5772E1F: KParts::MainWindow::qt_metacall(QMetaObject::Call, int, void**) (mainwindow.moc:75)
==9526==    by 0x43A13F: kt::GUI::qt_metacall(QMetaObject::Call, int, void**) (gui.moc:102)
==9526==    by 0x7CBB5F7: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3287)
==9526==    by 0x7CA9EF2: QCoreApplication::exec() (qcoreapplication.cpp:1013)
==9526==    by 0x429BDE: main (main.cpp:177)
==9526== 
==9526== Use of uninitialised value of size 8
==9526==    at 0x4EA796D: net::SocketMonitor::Private::shutdown() (socketmonitor.cpp:76)
==9526==    by 0x42D562: kt::Core::onExit() (core.cpp:903)
==9526==    by 0x437AE5: kt::GUI::queryExit() (gui.cpp:568)
==9526==    by 0x6DD58E3: KMainWindowPrivate::_k_shuttingDown() (kmainwindow.cpp:1142)
==9526==    by 0x6DD82A8: KMainWindow::qt_metacall(QMetaObject::Call, int, void**) (kmainwindow.moc:102)
==9526==    by 0x6E0E334: KXmlGuiWindow::qt_metacall(QMetaObject::Call, int, void**) (kxmlguiwindow.moc:102)
==9526==    by 0x5772E1F: KParts::MainWindow::qt_metacall(QMetaObject::Call, int, void**) (mainwindow.moc:75)
==9526==    by 0x43A13F: kt::GUI::qt_metacall(QMetaObject::Call, int, void**) (gui.moc:102)
==9526==    by 0x7CBB5F7: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3287)
==9526==    by 0x7CA9EF2: QCoreApplication::exec() (qcoreapplication.cpp:1013)
==9526==    by 0x429BDE: main (main.cpp:177)
==9526== 
==9526== Invalid read of size 1
==9526==    at 0x4EA796D: net::SocketMonitor::Private::shutdown() (socketmonitor.cpp:76)
==9526==    by 0x42D562: kt::Core::onExit() (core.cpp:903)
==9526==    by 0x437AE5: kt::GUI::queryExit() (gui.cpp:568)
==9526==    by 0x6DD58E3: KMainWindowPrivate::_k_shuttingDown() (kmainwindow.cpp:1142)
==9526==    by 0x6DD82A8: KMainWindow::qt_metacall(QMetaObject::Call, int, void**) (kmainwindow.moc:102)
==9526==    by 0x6E0E334: KXmlGuiWindow::qt_metacall(QMetaObject::Call, int, void**) (kxmlguiwindow.moc:102)
==9526==    by 0x5772E1F: KParts::MainWindow::qt_metacall(QMetaObject::Call, int, void**) (mainwindow.moc:75)
==9526==    by 0x43A13F: kt::GUI::qt_metacall(QMetaObject::Call, int, void**) (gui.moc:102)
==9526==    by 0x7CBB5F7: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (qobject.cpp:3287)
==9526==    by 0x7CA9EF2: QCoreApplication::exec() (qcoreapplication.cpp:1013)
==9526==    by 0x429BDE: main (main.cpp:177)
==9526==  Address 0x731c3a5a00000070 is not stack'd, malloc'd or (recently) free'd
==9526== 
==9526== 
==9526== HEAP SUMMARY:
==9526==     in use at exit: 11,912,906 bytes in 142,945 blocks
==9526==   total heap usage: 661,234 allocs, 518,289 frees, 112,181,514 bytes allocated
==9526== 
==9526== LEAK SUMMARY:
==9526==    definitely lost: 7,849 bytes in 23 blocks
==9526==    indirectly lost: 30,982 bytes in 910 blocks
==9526==      possibly lost: 1,326,682 bytes in 22,189 blocks
==9526==    still reachable: 10,547,393 bytes in 119,823 blocks
==9526==         suppressed: 0 bytes in 0 blocks
==9526== Rerun with --leak-check=full to see details of leaked memory
==9526== 
==9526== For counts of detected and suppressed errors, rerun with: -v
==9526== Use --track-origins=yes to see where uninitialised values come from
==9526== ERROR SUMMARY: 44 errors from 4 contexts (suppressed: 8 from 8)


and here is the output the shows up in the terminal:

j@laptop:~$ valgrind --log-file=vg.log /usr/bin/ktorrent --nofork
KGlobal::locale::Warning your global KLocale is being recreated with a valid main component instead of a fake component, this usually means you tried to call i18n related functions before your main component was created. You should not do that since it most likely will not work 
Warning: QWidget::insertAction: Attempt to insert null action
Warning: QWidget::insertAction: Attempt to insert null action
Warning: QWidget::insertAction: Attempt to insert null action
KCrash: Application 'ktorrent' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
sock_file=/home/j/.kde/socket-laptop/kdeinit4__0

[1]+  Stopped                 valgrind --log-file=vg.log /usr/bin/ktorrent --nofork
j@laptop:~$
Comment 3 Joris Guisson 2011-06-15 19:47:05 UTC
How did you install ktorrent ?
Comment 4 jenna 2011-06-19 08:02:53 UTC
I installed it via synaptic package manager.  After I tried it and it crashed on me a couple times, I went to the official site and grabbed the source and built it from source and installed it.  I was still getting the crash.

I have since installed it again via the package manager.  This last install seems to have reset my settings along with installing the program and now the crash is not happening :/ .
Comment 5 Joris Guisson 2011-06-23 18:12:31 UTC
It's probably caused by loading plugins of an older version which links to a different version of libktorrent