| Summary: | KTorrent crashes on start | ||
|---|---|---|---|
| Product: | [Applications] ktorrent | Reporter: | Christoph Feck <cfeck> |
| Component: | general | Assignee: | Joris Guisson <joris.guisson> |
| Status: | RESOLVED FIXED | ||
| Severity: | crash | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Compiled Sources | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: |
"faulty" ktorrentrc
Log from "valgrind tool=--memcheck" |
||
|
Description
Christoph Feck
2011-10-21 16:52:26 UTC
Created attachment 64765 [details]
"faulty" ktorrentrc
By reverting to the default settings, you probably disabled DHT, the crash is in the DHT code. Not quite clear yet why this is happening. Okey, I tested a bit.
First, the crash is indeed related to enabling DHT. When I remove all configuration, and start KTorrent, it opens correctly (note that I have active torrents in share/apps/ktorrent). When I go to Settings dialog, and enable the DHT option, it crashes as soon as I hit OK in the settings dialog.
Second, I found the faulty commit by bisecting in libktorrent.
Good: e3f22c5a9a9fc0a71ef4be21da4a0b293d95123f
Bad: 441025c20d6e62b660b6a418ed0ba4258e5ebaf3
Third, when renaming the apps/ktorrent folder, I get no crash, so it is actually the existing torrent data that causes it, not the configuration itself. So what you would probably have to test is:
- go back to Good revision
- enable DHT, start a torrent
- exit before it is completed
- now run Bad version, and see it crash (hopefully :)
It was pretty clear to me that the bug was introduced by 441025c20d6e62b660b6a418ed0ba4258e5ebaf3. But I have been unable to reproduce it. I have downloaded several torrents with DHT enabled, no crash, nothing. And looking at the code, I don't understand how this is possible. Could you try to reproduce it when running under valgrind ? valgrind --tool=memcheck --log-file=vg.log /usr/bin/ktorrent --nofork Created attachment 64949 [details]
Log from "valgrind tool=--memcheck"
Because of the slow speed when running under valgrind, I could see that it actually starts seeding, then crashes.
Git commit 7873891cb53a1b2865f0fd21ceed9015935804db by Joris Guisson. Committed on 28/10/2011 at 19:14. Pushed by guisson into branch 'master'. Fix crash in DHT packet receive code BUG: 284627 M +1 -0 ChangeLog M +36 -29 src/bcodec/bdecoder.cpp M +19 -7 src/bcodec/bdecoder.h M +1 -1 src/dht/rpcserver.cpp http://commits.kde.org/libktorrent/7873891cb53a1b2865f0fd21ceed9015935804db Confirmed. Thanks! |