Bug 401035

Summary: libktorrent linking KF5::Crash but not forcing it
Product: [Applications] ktorrent Reporter: Harald Sitter <sitter>
Component: generalAssignee: Joris Guisson <joris.guisson>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Harald Sitter 2018-11-14 15:31:19 UTC
src/CMakeLists.txt:    KF5::Crash

The general assumption is that simply linking the library is not sufficient, you also need to call KCrash::initialize() in your code. Without the call the library may not actually get linked as it is not needed and result in KCrash not actually getting enabled/used.

In libktorrent's case I'd think you want ktorrent to link KF5::Crash and then call initialize in the applications main() instead of the library. There is hardly a reason why the library would need to pull in KCrash.

For some background see this thread:
https://markmail.org/thread/zv5pheijaze72bzs
and
https://api.kde.org/frameworks/kcrash/html/namespaceKCrash.html
Comment 1 Harald Sitter 2019-11-29 07:38:39 UTC
fixed in e7c4847d9bbdc5d7c7435039aa5088d276ca5bce