Bug 469288

Summary: ktorrent hangs on exit
Product: [Applications] ktorrent Reporter: dtm_001
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 22.04.3   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description dtm_001 2023-05-02 20:06:21 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Start Ktorrent
2. Use for any amount of time
3. Attempt to exit by Ctrl+q or File > Exit

OBSERVED RESULT
Ktorrent hangs requiring 'kill -9 <process_id>' to remove from memory.

EXPECTED RESULT
Clean exit, saving settings changes made during session.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  Kubuntu 22.04
KDE Plasma Version: 5.24.7
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Tailing the /var/log/syslog and ~/.local/share/ktorrent/log around moment of executing ctrl+q both logs yield:

Qt Warning: 0x556091cbe800 deleted without having been removed from the factory first. This will leak standalone popupmenus and could lead to crashes.

The ~/.local/share/ktorrent/log appears to write any updates for open torrents before the above Qt warning.  Settings such as whether the software was in a Suspend Torrents state nor other settings such as a group visible in a tab do not get saved.  Logging halts with the above Qt warning.

Upon restarting ktorrent sometimes receive a kdialog box warning ktorrent not accepting network connections.  Click ok and ktorrent starts.