This forum has been archived. All content is frozen. Please use KDE Discuss instead.

crash with kde4, r837230

Tags: None
(comma "," separated)
agforsyth
Registered Member
Posts
133
Karma
0

crash with kde4, r837230

Mon Jul 28, 2008 12:05 am
I've had this crash three times since I recompiled today. Using KDE 4.1RC1 from Ubuntu Intrepid Ibex, and ktorrent svn r837230. Happens when right clicking on a torrent in the main torrent list. Not sure exactly what the pattern is; it doesn't happen every time.

Code: Select all
Application: KTorrent (ktorrent), signal SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb5969700 (LWP 7585)]
[New Thread 0xb24e6b90 (LWP 7609)]
[New Thread 0xb3696b90 (LWP 7608)]
[New Thread 0xb426eb90 (LWP 7588)]
[KCrash handler]
#6  0xb68e84f3 in QMenu::popup () from /usr/lib/libQtGui.so.4
#7  0x0808704d in kt::ViewManager::showViewMenu (this=0x8e47408, v=0x92436e0,
    pos=@0xbf826d28)
    at /home/adam/sources/ktorrent/ktorrent/viewmanager.cpp:640
#8  0x08087427 in kt::ViewManager::qt_metacall (this=0x8e47408,
    _c=QMetaObject::InvokeMetaMethod, _id=29, _a=0xbf826cfc)
    at /home/adam/sources/ktorrent/build/ktorrent/viewmanager.moc:145
#9  0xb6f6eff0 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#10 0xb6f6fd72 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#11 0x0807d2ab in kt::View::showMenu (this=0x92436e0, _t1=0x92436e0,
    _t2=@0xbf826d28) at /home/adam/sources/ktorrent/build/ktorrent/view.moc:194
#12 0x0807d7b8 in kt::View::showMenu (this=0x92436e0, pos=@0xbf8276b0)
    at /home/adam/sources/ktorrent/ktorrent/view.cpp:438
#13 0x08081ad2 in kt::View::qt_metacall (this=0x92436e0,
    _c=QMetaObject::InvokeMetaMethod, _id=26, _a=0xbf826e2c)
    at /home/adam/sources/ktorrent/build/ktorrent/view.moc:144
#14 0xb6f6eff0 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#15 0xb6f6fd72 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#16 0xb6562413 in QWidget::customContextMenuRequested ()
   from /usr/lib/libQtGui.so.4
#17 0xb6572a39 in QWidget::event () from /usr/lib/libQtGui.so.4
#18 0xb68a39d3 in QFrame::event () from /usr/lib/libQtGui.so.4
#19 0xb6939b6f in QAbstractScrollArea::viewportEvent ()
   from /usr/lib/libQtGui.so.4
#20 0xb69e43df in QAbstractItemView::viewportEvent ()
   from /usr/lib/libQtGui.so.4
#21 0xb6a1b234 in QTreeView::viewportEvent () from /usr/lib/libQtGui.so.4
#22 0xb693c115 in ?? () from /usr/lib/libQtGui.so.4
#23 0xb6f5958a in QCoreApplicationPrivate::sendThroughObjectEventFilters ()
   from /usr/lib/libQtCore.so.4
#24 0xb651a79a in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#25 0xb6522ab5 in QApplication::notify () from /usr/lib/libQtGui.so.4
#26 0xb75e0b1d in KApplication::notify () from /usr/lib/libkdeui.so.5
#27 0xb6f5a3a1 in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#28 0xb65256ee in QCoreApplication::sendSpontaneousEvent ()
   from /usr/lib/libQtGui.so.4
#29 0xb658c6cf in ?? () from /usr/lib/libQtGui.so.4
#30 0xb658b285 in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#31 0xb65b4ecc in ?? () from /usr/lib/libQtGui.so.4
#32 0xb5b6f7a1 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#33 0xb5b72e43 in ?? () from /usr/lib/libglib-2.0.so.0
#34 0xb5b73001 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#35 0xb6f84ab8 in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#36 0xb65b4595 in ?? () from /usr/lib/libQtGui.so.4
#37 0xb6f58a8a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#38 0xb6f58c4a in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#39 0xb6f5b2f5 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#40 0xb651a637 in QApplication::exec () from /usr/lib/libQtGui.so.4
#41 0x080665eb in main (argc=1, argv=0xbf828294)
    at /home/adam/sources/ktorrent/ktorrent/main.cpp:165
#0  0xb800e424 in __kernel_vsyscall ()
George
Moderator
Posts
5421
Karma
1

Mon Jul 28, 2008 11:15 am
I can't reproduce it

I will try some more.
agforsyth
Registered Member
Posts
133
Karma
0

Mon Jul 28, 2008 6:06 pm
Yeah, I can't reproduce it reliably, but I did have it twice more after that post.

I also had two more crashes, both just after adding a fairly large multi-file torrent. I seem to have lost the crash report, but after adding the torrent, it didn't show up in the list right away, and I tried to do something else (5-10 seconds after adding the new torrent), and that resulted in a crash.

Also, removing a multi-file torrent and its data seems to lock up KTorrent for as long as it takes to do, which on my computer can be more than a minute. Any way to remove it from the list right away and then remove its data in the background?
stoeptegel
Registered Member
Posts
1075
Karma
0

Mon Jul 28, 2008 6:55 pm
phantom042 wrote:
Also, removing a multi-file torrent and its data seems to lock up KTorrent for as long as it takes to do, which on my computer can be more than a minute. Any way to remove it from the list right away and then remove its data in the background?


Same happens when you fully reserve diskspace.
George
Moderator
Posts
5421
Karma
1

Tue Jul 29, 2008 11:00 am
phantom042 wrote:Yeah, I can't reproduce it reliably, but I did have it twice more after that post.


Haven't reproduced it yet, judging at the place it crashes. I'm thinking it is a KDE bug causing the menu not to be created. So I have just added a check for this. So if you can try latest SVN, if it happens no menu will be shown and this message should be logged :

Failed to create ViewMenu

I also had two more crashes, both just after adding a fairly large multi-file torrent. I seem to have lost the crash report, but after adding the torrent, it didn't show up in the list right away, and I tried to do something else (5-10 seconds after adding the new torrent), and that resulted in a crash.


Send me those torrents so I can try to reproduce it.

Also, removing a multi-file torrent and its data seems to lock up KTorrent for as long as it takes to do, which on my computer can be more than a minute. Any way to remove it from the list right away and then remove its data in the background?


It's going to be moved to a background job
agforsyth
Registered Member
Posts
133
Karma
0

Tue Jul 29, 2008 2:32 pm
The multi-file torrent problem should be reproducible with any large (4gig) many file (1000) torrent on a slow computer (p3-600 laptop w/256 megs of ram, slow HD). It was a private torrent so I can't share it. I will try to reproduce so I can at least get you a crash report.

Might as well list another silly problem I'm having here. The width of the "name" column and width of the "status" column reset sometimes to the width of the longest torrent name / width of "download completed" when minimizing KTorrent to the system tray.

In addition, the locked setting of toolbar, text setting of toolbar, and icon setting of the toolbar always reset when closing and reopening KTorrent, and sometimes when minimizing to the system tray.

Last edited by agforsyth on Tue Jul 29, 2008 3:02 pm, edited 1 time in total.
agforsyth
Registered Member
Posts
133
Karma
0

Tue Jul 29, 2008 2:43 pm
Here's a quick patch to improve log readability. The grab chunk function should only write out a log when it does something, it doesn't need to write out a log every time it's called when a chunk is already in memory, which seems to be about 99% of the times it's called.

Code: Select all
Index: libbtcore/diskio/chunkmanager.cpp
===================================================================
--- libbtcore/diskio/chunkmanager.cpp   (revision 839216)
+++ libbtcore/diskio/chunkmanager.cpp   (working copy)
@@ -338,10 +338,10 @@
          {
             recheck_counter++;
          }
+         loaded.insert(i,bt::GetCurrentTime());
+         Out(SYS_DIO|LOG_DEBUG) << QString("Grab chunk %1 (%2 in memory)").arg(i).arg(loaded.count()) << endl;
       }
       
-      loaded.insert(i,bt::GetCurrentTime());
-      Out(SYS_DIO|LOG_DEBUG) << QString("Grab chunk %1 (%2 in memory)").arg(i).arg(loaded.count()) << endl;
       return c;
    }
       

Last edited by agforsyth on Tue Jul 29, 2008 3:04 pm, edited 1 time in total.
agforsyth
Registered Member
Posts
133
Karma
0

Tue Jul 29, 2008 2:49 pm
Sorry to span replies here, but one more thing for the moment. When I build, make links the shared libraries. Recently, when I then install, I get lines like this as well:

Linking CXX shared library CMakeFiles/CMakeRelink.dir/libbtcore.so

The two files
build/lib/libbtcore.so.7.0.0
made during "make" and
build/libbtcore/CMakeFiles/CMakeRelink.dir/libbtcore.so.7.0.0
made during "make install"

are identical, as are all of the other shared libraries in the two places, so time is being wasted relinking. I'm sure this doesn't matter on a fast computer, but it's a pain on mine since compiling is quite slow.
George
Moderator
Posts
5421
Karma
1

Wed Jul 30, 2008 4:48 pm
phantom042 wrote:Here's a quick patch to improve log readability. The grab chunk function should only write out a log when it does something, it doesn't need to write out a log every time it's called when a chunk is already in memory, which seems to be about 99% of the times it's called.

Code: Select all
Index: libbtcore/diskio/chunkmanager.cpp
===================================================================
--- libbtcore/diskio/chunkmanager.cpp   (revision 839216)
+++ libbtcore/diskio/chunkmanager.cpp   (working copy)
@@ -338,10 +338,10 @@
          {
             recheck_counter++;
          }
+         loaded.insert(i,bt::GetCurrentTime());
+         Out(SYS_DIO|LOG_DEBUG) << QString("Grab chunk %1 (%2 in memory)").arg(i).arg(loaded.count()) << endl;
       }
       
-      loaded.insert(i,bt::GetCurrentTime());
-      Out(SYS_DIO|LOG_DEBUG) << QString("Grab chunk %1 (%2 in memory)").arg(i).arg(loaded.count()) << endl;
       return c;
    }
       


Not a bad idea
George
Moderator
Posts
5421
Karma
1

Wed Jul 30, 2008 4:50 pm
phantom042 wrote:Sorry to span replies here, but one more thing for the moment. When I build, make links the shared libraries. Recently, when I then install, I get lines like this as well:

Linking CXX shared library CMakeFiles/CMakeRelink.dir/libbtcore.so

The two files
build/lib/libbtcore.so.7.0.0
made during "make" and
build/libbtcore/CMakeFiles/CMakeRelink.dir/libbtcore.so.7.0.0
made during "make install"

are identical, as are all of the other shared libraries in the two places, so time is being wasted relinking. I'm sure this doesn't matter on a fast computer, but it's a pain on mine since compiling is quite slow.


This is how cmake does it, to avoid it you can always do make install without the make, everything will be built before the install, and things will only be linked once.

Downside ofcourse is that all the build files are created by root if you install to a system directory.
agforsyth
Registered Member
Posts
133
Karma
0

Tue Aug 05, 2008 1:22 pm
Same right click crash happened three more times. Once I didn't get a backtrace, the stack was corrupt or something, and the other two times it was like this again:
Code: Select all
Application: KTorrent (ktorrent), signal SIGSEGV
[Thread debugging using libthread_db enabled]
[New Thread 0xb58be700 (LWP 11520)]
[New Thread 0xb2dbeb90 (LWP 11528)]
[New Thread 0xb4249b90 (LWP 11527)]
[KCrash handler]
#6  0xb684524d in QMenu::popup () from /usr/lib/libQtGui.so.4
#7  0x08087e09 in kt::ViewManager::showViewMenu (this=0x89bda58, v=0x8eeb5c8,
    pos=@0xbf98dd78)
    at /home/adam/sources/ktorrent/ktorrent/viewmanager.cpp:714
#8  0x08088237 in kt::ViewManager::qt_metacall (this=0x89bda58,
    _c=QMetaObject::InvokeMetaMethod, _id=34, _a=0xbf98dd4c)
    at /home/adam/sources/ktorrent/build/ktorrent/viewmanager.moc:157
#9  0xb6ecd7e0 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#10 0xb6ece562 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#11 0x0807d39b in kt::View::showMenu (this=0x8eeb5c8, _t1=0x8eeb5c8,
    _t2=@0xbf98dd78)
    at /home/adam/sources/ktorrent/build/ktorrent/view.moc:206
#12 0x0807d6d8 in kt::View::showMenu (this=0x8eeb5c8, pos=@0xbf98e6f0)
    at /home/adam/sources/ktorrent/ktorrent/view.cpp:513
#13 0x08082655 in kt::View::qt_metacall (this=0x8eeb5c8,
    _c=QMetaObject::InvokeMetaMethod, _id=31, _a=0xbf98de7c)
    at /home/adam/sources/ktorrent/build/ktorrent/view.moc:156
#14 0xb6ecd7e0 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#15 0xb6ece562 in QMetaObject::activate () from /usr/lib/libQtCore.so.4
#16 0xb64b96f3 in QWidget::customContextMenuRequested ()
   from /usr/lib/libQtGui.so.4
#17 0xb64c9c09 in QWidget::event () from /usr/lib/libQtGui.so.4
#18 0xb68003f3 in QFrame::event () from /usr/lib/libQtGui.so.4
#19 0xb68965ff in QAbstractScrollArea::viewportEvent ()
   from /usr/lib/libQtGui.so.4
#20 0xb694179f in QAbstractItemView::viewportEvent ()
   from /usr/lib/libQtGui.so.4
#21 0xb6979464 in QTreeView::viewportEvent () from /usr/lib/libQtGui.so.4
#22 0xb6898ba5 in ?? () from /usr/lib/libQtGui.so.4
#23 0xb6eb7daa in QCoreApplicationPrivate::sendThroughObjectEventFilters ()
   from /usr/lib/libQtCore.so.4
#24 0xb6471bda in QApplicationPrivate::notify_helper ()
   from /usr/lib/libQtGui.so.4
#25 0xb6479f6f in QApplication::notify () from /usr/lib/libQtGui.so.4
#26 0xb7538cbd in KApplication::notify () from /usr/lib/libkdeui.so.5
#27 0xb6eb8bbf in QCoreApplication::notifyInternal ()
   from /usr/lib/libQtCore.so.4
#28 0xb647cb7e in QCoreApplication::sendSpontaneousEvent ()
   from /usr/lib/libQtGui.so.4
#29 0xb64e3d5f in ?? () from /usr/lib/libQtGui.so.4
#30 0xb64e290d in QApplication::x11ProcessEvent () from /usr/lib/libQtGui.so.4
#31 0xb650c47a in ?? () from /usr/lib/libQtGui.so.4
#32 0xb5ac47a1 in g_main_context_dispatch () from /usr/lib/libglib-2.0.so.0
#33 0xb5ac7e43 in ?? () from /usr/lib/libglib-2.0.so.0
#34 0xb5ac8001 in g_main_context_iteration () from /usr/lib/libglib-2.0.so.0
#35 0xb6ee3208 in QEventDispatcherGlib::processEvents ()
   from /usr/lib/libQtCore.so.4
#36 0xb650bb75 in ?? () from /usr/lib/libQtGui.so.4
#37 0xb6eb728a in QEventLoop::processEvents () from /usr/lib/libQtCore.so.4
#38 0xb6eb744a in QEventLoop::exec () from /usr/lib/libQtCore.so.4
#39 0xb6eb9b05 in QCoreApplication::exec () from /usr/lib/libQtCore.so.4
#40 0xb6471a77 in QApplication::exec () from /usr/lib/libQtGui.so.4
#41 0x0806641b in main (argc=1, argv=0xbf98f2e4)
    at /home/adam/sources/ktorrent/ktorrent/main.cpp:165
#0  0xb7f74424 in __kernel_vsyscall ()
George
Moderator
Posts
5421
Karma
1

Tue Aug 05, 2008 4:54 pm
I haven't yet reproduced this crash, it has got to happen when that menu is constructed, and something weird is returned which is not a proper menu.
laxd
Registered Member
Posts
1
Karma
0

Wed Aug 06, 2008 11:59 pm
I built ktorrent from source and installed it to my home dir:

cmake -DCMAKE_INSTALL_PREFIX=~/ktorrent ./
make install

ktorrentui.rc will be installed to ~/ktorrent/share/apps/ktorrent, where it is not found at runtime.
Ktorrent will in this case crash on right click because MainWindow::container() returns null.

I guess this is a pebcac installation error, which would cause reproducable crashes, unlike the one described
in this thread. And also a lot widgets would be missing from the gui.
Im just mentioning, maybe someone will google their way here and not waste the amount of time I did. :)

Several ways to fix, I choose to copy $installdir/share/apps/ktorrent to ~/home/.kde4/share/apps/ktorrent

This was ktorrent-3.1.2
George
Moderator
Posts
5421
Karma
1

Thu Aug 07, 2008 4:31 pm
Latest SVN now checks for a 0 pointer, so it should not crash anymore


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]