Bug 315226 - KGet Crashes When Resuming Download
Summary: KGet Crashes When Resuming Download
Status: RESOLVED NOT A BUG
Alias: None
Product: kget
Classification: Applications
Component: general (show other bugs)
Version: 2.10.0
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: KGet authors
URL:
Keywords:
: 322090 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-02-15 18:05 UTC by Rewarp
Modified: 2014-05-04 20:57 UTC (History)
2 users (show)

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 Rewarp 2013-02-15 18:05:56 UTC
Application: kget (2.10.0)
KDE Platform Version: 4.10.00
Qt Version: 4.8.2
Operating System: Linux 3.2.0-37-generic x86_64
Distribution: Ubuntu 12.04.2 LTS

-- Information about the crash:
Click resume download, KGet crashes. Behaviour only started today.

The crash can be reproduced every time.

-- Backtrace:
Application: KGet (kget), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f9f110e3780 (LWP 5917))]

Thread 2 (Thread 0x7f9ef3abc700 (LWP 5933)):
#0  0x00007f9f0ed99d2d in read () at ../sysdeps/unix/syscall-template.S:82
#1  0x00007f9f0836c8cf in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f9f08331ba4 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f9f08331fd6 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f9f08332164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f9f0dd7d906 in QEventDispatcherGlib::processEvents (this=0x7f9eec0008c0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007f9f0dd4ce42 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007f9f0dd4d097 in QEventLoop::exec (this=0x7f9ef3abbdd0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007f9f0dc4c057 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#9  0x00007f9f0dd2cb4f in QInotifyFileSystemWatcherEngine::run (this=0x229d8e0) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x00007f9f0dc4f07b in QThreadPrivate::start (arg=0x229d8e0) at thread/qthread_unix.cpp:307
#11 0x00007f9f0ed92e9a in start_thread (arg=0x7f9ef3abc700) at pthread_create.c:308
#12 0x00007f9f0c426cbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f9f110e3780 (LWP 5917)):
[KCrash Handler]
#6  ref (this=0x30000000000000) at ../../include/QtCore/../../src/corelib/arch/qatomic_x86_64.h:121
#7  QString (other=..., this=0x7fff010991e0) at ../../include/QtCore/../../src/corelib/tools/qstring.h:726
#8  QUrl::scheme (this=0x226bc20) at io/qurl.cpp:4497
#9  0x00007f9f0e44af1b in KUrl::prettyUrl (this=0x226bc20, trailing=KUrl::LeaveTrailingSlash) at ../../kdecore/io/kurl.cpp:1096
#10 0x00007f9f0ff5da37 in KGetKJobAdapter::slotUpdateDescription (this=0x226b7d0) at ../../kget/core/kgetkjobadapter.cpp:47
#11 0x00007f9ef4b0ea0a in TransferMultiSegKio::slotDataSourceFactoryChange (this=0x226bbc0, change=3) at ../../../../kget/transfer-plugins/multisegmentkio/transfermultisegkio.cpp:230
#12 0x00007f9ef4b0f39b in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=<optimized out>, _c=<optimized out>) at ./transfermultisegkio.moc:75
#13 TransferMultiSegKio::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./transfermultisegkio.moc:62
#14 0x00007f9f0dd62761 in QMetaObject::activate (sender=0x226be30, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff010995e0) at kernel/qobject.cpp:3547
#15 0x00007f9f0ff54ab1 in DataSourceFactory::dataSourceFactoryChange (this=<optimized out>, _t1=3) at ./datasourcefactory.moc:187
#16 0x00007f9f0ff56a62 in DataSourceFactory::slotUrlChanged (this=0x226be30, old=..., newUrl=...) at ../../kget/core/datasourcefactory.cpp:500
#17 0x00007f9f0dd62761 in QMetaObject::activate (sender=0x226b480, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff01099780) at kernel/qobject.cpp:3547
#18 0x00007f9f0ff52a7a in TransferDataSource::urlChanged (this=<optimized out>, _t1=..., _t2=...) at ./transferdatasource.moc:239
#19 0x00007f9ef4b0bb0e in MultiSegKioDataSource::slotUrlChanged (this=0x226b480, url=...) at ../../../../kget/transfer-plugins/multisegmentkio/multisegkiodatasource.cpp:93
#20 0x00007f9ef4b0d111 in qt_static_metacall (_a=<optimized out>, _id=<optimized out>, _o=<optimized out>, _c=<optimized out>) at ./multisegkiodatasource.moc:74
#21 MultiSegKioDataSource::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at ./multisegkiodatasource.moc:60
#22 0x00007f9f0dd62761 in QMetaObject::activate (sender=0x227bd30, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff01099910) at kernel/qobject.cpp:3547
#23 0x00007f9ef4b0b5a5 in Segment::urlChanged (this=<optimized out>, _t1=...) at ./segment.moc:213
#24 0x00007f9f0dd62761 in QMetaObject::activate (sender=0x2209fd0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff01099a60) at kernel/qobject.cpp:3547
#25 0x00007f9f104f5067 in KIO::TransferJob::redirection (this=<optimized out>, _t1=0x2209fd0, _t2=...) at ./jobclasses.moc:461
#26 0x00007f9f104f9de2 in KIO::TransferJob::slotRedirection (this=0x2209fd0, url=...) at ../../kio/kio/job.cpp:1016
#27 0x00007f9f0dd62761 in QMetaObject::activate (sender=0x22f9290, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff01099db0) at kernel/qobject.cpp:3547
#28 0x00007f9f1059c305 in KIO::SlaveInterface::redirection (this=<optimized out>, _t1=...) at ./slaveinterface.moc:260
#29 0x00007f9f1059ed77 in KIO::SlaveInterface::dispatch (this=<optimized out>, _cmd=20, rawdata=...) at ../../kio/kio/slaveinterface.cpp:262
#30 0x00007f9f1059b8d5 in KIO::SlaveInterface::dispatch (this=<optimized out>) at ../../kio/kio/slaveinterface.cpp:88
#31 0x00007f9f1058ec7e in KIO::Slave::gotInput (this=0x22f9290) at ../../kio/kio/slave.cpp:344
#32 0x00007f9f0dd62761 in QMetaObject::activate (sender=0x22f36a0, m=<optimized out>, local_signal_index=<optimized out>, argv=0x0) at kernel/qobject.cpp:3547
#33 0x00007f9f104c1617 in dequeue (this=<optimized out>) at ../../kio/kio/connection.cpp:82
#34 KIO::ConnectionPrivate::dequeue (this=0x231d440) at ../../kio/kio/connection.cpp:71
#35 0x00007f9f0dd67926 in QObject::event (this=0x22f36a0, e=<optimized out>) at kernel/qobject.cpp:1195
#36 0x00007f9f0d0cf7b4 in notify_helper (e=0x23028d0, receiver=0x22f36a0, this=0x1fac720) at kernel/qapplication.cpp:4556
#37 QApplicationPrivate::notify_helper (this=0x1fac720, receiver=0x22f36a0, e=0x23028d0) at kernel/qapplication.cpp:4528
#38 0x00007f9f0d0d4583 in QApplication::notify (this=0x7fff0109abd0, receiver=0x22f36a0, e=0x23028d0) at kernel/qapplication.cpp:4417
#39 0x00007f9f10af0b76 in KApplication::notify (this=0x7fff0109abd0, receiver=0x22f36a0, event=0x23028d0) at ../../kdeui/kernel/kapplication.cpp:311
#40 0x00007f9f0dd4e30c in QCoreApplication::notifyInternal (this=0x7fff0109abd0, receiver=0x22f36a0, event=0x23028d0) at kernel/qcoreapplication.cpp:915
#41 0x00007f9f0dd520ea in sendEvent (event=0x23028d0, receiver=0x22f36a0) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#42 QCoreApplicationPrivate::sendPostedEvents (receiver=0x0, event_type=0, data=0x1f301c0) at kernel/qcoreapplication.cpp:1539
#43 0x00007f9f0dd7d473 in sendPostedEvents () at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:236
#44 postEventSourceDispatch (s=<optimized out>) at kernel/qeventdispatcher_glib.cpp:279
#45 0x00007f9f08331d53 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007f9f083320a0 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007f9f08332164 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007f9f0dd7d89f in QEventDispatcherGlib::processEvents (this=0x1f31af0, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#49 0x00007f9f0d177cde in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#50 0x00007f9f0dd4ce42 in QEventLoop::processEvents (this=<optimized out>, flags=...) at kernel/qeventloop.cpp:149
#51 0x00007f9f0dd4d097 in QEventLoop::exec (this=0x7fff0109ab50, flags=...) at kernel/qeventloop.cpp:204
#52 0x00007f9f0dd523e7 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#53 0x0000000000429e9b in main (argc=5, argv=0x7fff0109b238) at ../../kget/main.cpp:149

Reported using DrKonqi
Comment 1 David E. Narvaez 2013-02-21 05:00:19 UTC
Are you able to provide the particular URL that is giving you trouble? Checking that backtrace, I think I can reproduce the scenario using a configuration that I've never seen in real life so I may be confused.
Comment 2 Rewarp 2013-02-21 05:39:06 UTC
Here's the URL.
http://traffic.libsyn.com/gardnermuseum/theconcert160.mp3

I changed to Light-DM from KDM before restarting the computer and weirdly enough, KGet is working again.
Comment 3 David E. Narvaez 2013-02-21 11:12:37 UTC
So you were saying that, when you paused that download and you later started it again, KGet always crashed? I can't reproduce that here.
Comment 4 Rewarp 2013-02-21 11:19:09 UTC
Yes. I had a few concurrent downloads organised into the groups in KGet when I paused the download to continue surfing at the time. When I resumed download for the file linked above, it would crash with a segfault every single time on the same login session.

KGet has been behaving so far. Any ideas for further testing?
Comment 5 Rewarp 2013-03-26 13:51:51 UTC
It happened again. This time I checked the folder to see what was happening to the files being affected. 

I had one file called Citizen_Radio_03-26-13.mp3 that would cause KGet to crash when I tried to resume its download. What appeared in the destination folder[1] was a file named "5526688". The next time I restarted KGet after rebooting, I right-clicked on the file in KGet and chose "Redownload Selected". The file then appeared to download correctly[2]. Upon checking the folder, I could not find the file named "Citizen_Radio_03-26-13.mp3", instead it was "5526688" that had the same filesize as that stated in KGet, and though identified as an mp3 file, would not play in Amarok.

A second file called "5523184" was somehow also generated. This file was a duplicate of another file called "Citizen_Radio_03-25-13.mp3" and was logged in Amarok as duplicates[3]. Unlike "5526688"/"Citizen_Radio_03-26-13.mp3", file "5523184" could be played in Amarok, while its duplicate /"Citizen_Radio_03-25-13.mp3" could not be loaded.

All files could be played correctly in another music player, Audacious.

For further clarity, the following screenshots are included.
1. http://ubuntuone.com/60ngXO3wZcAsExRf3ZBWo1
2. http://ubuntuone.com/7YXsEt17l7DeaGFpfDb3MJ
3. http://ubuntuone.com/4j0WD6UP9h2r4oLh19But6
Comment 6 David E. Narvaez 2013-03-28 05:28:56 UTC
I kind of understand what's going on with your transfer but cannot reproduce the crash here. Let me ask a couple more questions so I know I'm doing exactly what you are doing:

- You add your transfer directly through KGet's "New Download..." button, right? Or do you use a client like Rekonq or Konqueror to start the download?
- Is there any button in your UI called "Resume"? All I have is a Pause and a Start button, so I'm assuming you click the Start button, am I right?
- Do you have any special configuration for your Multisegment KIO Plugin? If you don't understand the question, then you don't
- How long does your transfer stays paused? Hours? This happens all in one session or do you reboot/suspend/hibernate and then resume?
Comment 7 Rewarp 2013-03-28 06:13:08 UTC
I downloaded the files via the FlashGot plugin in Firefox.

There is only a pause and start button, so yes, you are correct.

Nope, I don't understand the Multisegment KIO Plugin question.

Because the files were rather big, and I wanted to surf at maximum speed, I paused the downloads. I resumed them after a day I think. I may have rebooted in the interim.
Comment 8 David E. Narvaez 2013-03-31 02:31:40 UTC
I now tried installing Flashgot and using groups and I'm still unable to reproduce your issue. I'm now thinking this may all be caused by a Qt bug, because the 5523184 you mention in Comment 5 is actually part of the redirected URL for the download, but QUrl should still be able to parse the name correctly.

Would it be too much of a problem for you to update to Qt 4.8.4?
Comment 9 Rewarp 2013-03-31 11:57:21 UTC
No problem at all for me. I am just unsure which method to take to upgrade it from 4.8.2 to 4.8.4 safely as I am using Precise Pangolin and the PPA doesn't appear to go beyond 4.8.1, and the one installed is from the kubuntu-backports PPA. What's the best way to go about it without breaking anything?
Comment 10 Rewarp 2013-04-09 13:11:23 UTC
No crashes yet, and I am not sure if this is a related issue. Sometimes my downloads in KGet fail to parse the filenames correctly. For instance this link:
http://feeds.soundcloud.com/stream/87082855-radiofreemalaysia-coming-soon-the-real.mp3
 Is turned into a file called "wlRDYSQEH9OV"

If I were to download it via Firefox or the DownThemAll plugin in Firefox, the file is correctly changed to "TXRFM.09.04.2013x.mp3"

If this isn't a clue to the error, I shall file a separate bug report.
Comment 11 David E. Narvaez 2013-04-09 20:19:49 UTC
Yes, the outermost issue of this report is that the URL is parsed incorrectly, but I still wonder how does that happen. I haven't been able  to find a way to update to Qt 4.8 in Ubuntu PP, btw, but I'm not entirely sure that's the reason.
Comment 12 Christoph Feck 2013-07-08 00:47:56 UTC
*** Bug 322090 has been marked as a duplicate of this bug. ***
Comment 13 Rewarp 2014-05-04 20:57:22 UTC
I have moved on to Kubuntu 14.04 and am not using Kget at present. I will reopen this issue if there are problems arising from me retrying kget. Until then, it appears we can put this issue to rest.