Bug 81612 - kget crashes when saving transfer list
Summary: kget crashes when saving transfer list
Status: RESOLVED FIXED
Alias: None
Product: kget
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: KGet authors
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-15 00:12 UTC by Jens Zurheide
Modified: 2004-08-09 20:17 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 Jens Zurheide 2004-05-15 00:12:42 UTC
Version:            (using KDE Devel)
Installed from:    Compiled sources
Compiler:          gcc-3.3 gcc version 3.3 20030226 (prerelease) (SuSE Linux)
OS:                Linux

It seems that the implementation of TransferList::writeTransfers(const QString&) or more precisely Transfer::write(KSimpleConfig*, int) has a problem which leads to a signal 11. The console output is:

kget: [void Slave::slotInfoMessage(KIO::Job*, const QString&)] |--TH_ID ( 16384 )--| >>>>Entering MSG=Retrieving 1,8 MB from www.sei.cmu.edu...
kget: [void Slave::InfoMessage(const QString&)] |--TH_ID ( 16384 )--| Infor Msg:_msg = Retrieving 1,8 MB from www.sei.cmu.edu...
kget: [void Slave::slotInfoMessage(KIO::Job*, const QString&)] |--TH_ID ( 16384 )--| >>>>Leaving
kget: [void Transfer::logMessage(const QString&)] |--( GUI )--| >>>>Entering Retrieving 1,8 MB from www.sei.cmu.edu...
kget: [void Transfer::logMessage(const QString&)] |--( GUI )--| >>>>Leaving
kio (KIOJob): SlaveInterface::sendResumeAnswer ok for resuming :true
kget: slotValueChanged(): Fre Mai 14 00:00:00 2004
kget: slotValueChanged(): Fre Mai 14 00:00:00 2004
kdecore (KStartupInfo): sending remove:  ID="machine;1084567202;969162;2193"
kget: [void KMainWidget::checkQueue()] |--( GUI )--| Found 1 Running Jobs
kget: [void Settings::save()] |--( GUI )--| Saving settings
kget: [void KMainWidget::checkQueue()] |--( GUI )--| Found 1 Running Jobs
kget: [void Settings::save()] |--( GUI )--| Saving settings
kget: [void TransferList::writeTransfers(const QString&)] |--( GUI )--| >>>>Entering with file =/home/jens/.kde/share/apps/kget/transfers.kgt
kget: [void Transfer::write(KSimpleConfig*, int)] |--( GUI )--| >>>>Entering
*** KGet got signal 11

Thanks for looking into this.
Comment 1 Thomas McGuire 2004-07-25 12:14:15 UTC
Same problem here, it makes KGet useless for me since I can not continue downloading a file after a reboot.

Please fix this bug for KDE 3.3 !
Comment 2 Mike Peacock 2004-08-04 18:26:52 UTC
Hi,  I am using kde cvs compilied on aug 4, 2004 and I too am experencing this bug.  When kget crashes it doesn't pop up the usual kde crash dialog, it just quietly crashes?

I started kget from the console and it gives this output:
kget: [void KMainWidget::checkQueue()] |--( GUI )--| Found 1 Running Jobs
kget: [void Transfer::slotUpdateActions()] |--( GUI )--| >>>>Entering the item Status is =1offline=false
kget: [void Transfer::slotUpdateActions()] |--( GUI )--| >>>>Leaving
kget: [void Transfer::slotExecConnected()] |--( GUI )--| >>>>Leaving
kget: [void Slave::slotInfoMessage(KIO::Job*, const QString&)] |--TH_ID ( 16384 )--| >>>>Entering MSG=Retrieving 77.4 MB from zip.members.easynews.com...
kget: [void Slave::InfoMessage(const QString&)] |--TH_ID ( 16384 )--| Infor Msg:_msg = Retrieving 77.4 MB from zip.members.easynews.com...
kget: [void Slave::slotInfoMessage(KIO::Job*, const QString&)] |--TH_ID ( 16384 )--| >>>>Leaving
kget: [void Transfer::logMessage(const QString&)] |--( GUI )--| >>>>Entering Retrieving 77.4 MB from zip.members.easynews.com...
kget: [void Transfer::logMessage(const QString&)] |--( GUI )--| >>>>Leaving
kget: [void TransferList::writeTransfers(const QString&)] |--( GUI )--| >>>>Entering withfile =/home/mikecvs/.kde/share/apps/kget/transfers.kgt
kget: [void Transfer::write(KSimpleConfig*, int)] |--( GUI )--| >>>>Entering
*** KGet got signal 11
kio (KDirWatch): KDirWatch deleted (FAM closed)
kio (KDirListerCache): -KDirListerCache

This is with saving the transfer list every 1 minute, if I set it to longer like the default 10 minutes than kget will crash every 10 minutes.  This is a really annoying bug since it effectivly makes kget useless to download with  :(

If I can provide anymore information to help get this fixed just let me know.
Comment 3 Tobias Koenig 2004-08-09 20:17:02 UTC
CVS commit by tokoe: 

Fixed the crash mentioned in #81612 and changed the load/store method to
use the correct KConfig::(read|write)Entry.

CCMAIL:81612-done@bugs.kde.org


  M +5 -5      transfer.cpp   1.58


--- kdenetwork/kget/transfer.cpp  #1.57:1.58
@@ -755,6 +755,6 @@ bool Transfer::read(KSimpleConfig * conf
     startTime = config->readDateTimeEntry("ScheduledTime");
     canResume = config->readBoolEntry("CanResume", true);
-    totalSize = config->readNumEntry("TotalSize", 0);
-    processedSize = config->readNumEntry("ProcessedSize", 0);
+    totalSize = config->readUnsignedNum64Entry("TotalSize", 0);
+    processedSize = config->readUnsignedNum64Entry("ProcessedSize", 0);
 
     if (status != ST_FINISHED && totalSize != 0) {
@@ -782,6 +782,6 @@ void Transfer::write(KSimpleConfig * con
     config->writeEntry("Status", status);
     config->writeEntry("CanResume", canResume);
-    config->writeEntry("TotalSize", ( QVariant & )totalSize);
-    config->writeEntry("ProcessedSize", processedSize);
+    config->writeEntry("TotalSize", totalSize );
+    config->writeEntry("ProcessedSize", processedSize );
     config->writeEntry("ScheduledTime", startTime);
     sDebugOut << endl;