Summary: | crash after trying to delete on list old download that not exist | ||
---|---|---|---|
Product: | [Applications] kget | Reporter: | Michał Kudła <m1k0> |
Component: | general | Assignee: | KGet authors <kget> |
Status: | RESOLVED FIXED | ||
Severity: | crash | CC: | joris.guisson, koucou_2005 |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Michał Kudła
2010-02-27 20:54:05 UTC
It should may by fixed inside btcore right? Lukas This can only happen if the init function of the TorrentControl has not been called. Which should always be called when a torrent is loaded or created. Well init() is only called when I start the torrent in KGet... so it could happen if you add a torrent which has the initial state Stopped... It doesn't crash for me though... that's what I worry about... Lukas Edit: Well no, stupid me... then the torrent control pointer would be 0 as we create the torrent control short before initializing it... So I'm back at having no clue :) Lukas Could be a dangling pointer to an already destroyed TorrentControl mayby this bug linked to https://bugs.kde.org/show_bug.cgi?id=228877 Mmh Joris, this seems impossible to me as the TorrentControl is only deleted on the destructor and Transfer::deinit() is only called before deleting a transfer... Lukas Another possibility is that it could happen if something fails in TorrentControl::init and an exception is thrown before the ChunkManager is created. The most likely way is that loading the actual torrent file fails. What does KGet do if init fails ? It sets the variable m_ready to false... I could add a check for this var before deleting the data... Is this the only other way this could happen? :) Lukas Yeah, the ChunkManager is made when init is called, and deleted when the TorrentControl is destroyed. I will add a check in deleteDataFiles, that will also prevent the crash from happening. But as a rule of thumb if init of a TorrentControl fails, just delete it and don't do anything with it. SVN commit 1098024 by guisson: - Make it possible to change the ChunkSelector at runtime - Check for cman being 0 in deleteDataFiles (should prevent 228804) CCBUG: 228804 M +1 -0 ChangeLog M +14 -6 libbtcore/download/downloader.cpp M +4 -4 libbtcore/download/downloader.h M +4 -0 libbtcore/interfaces/torrentinterface.h M +19 -1 libbtcore/torrent/torrentcontrol.cpp M +1 -0 libbtcore/torrent/torrentcontrol.h WebSVN link: http://websvn.kde.org/?view=rev&revision=1098024 Ok great! I will do that tomorrow... Lukas *** Bug 238783 has been marked as a duplicate of this bug. *** |