Bug 401035 - libktorrent linking KF5::Crash but not forcing it
Summary: libktorrent linking KF5::Crash but not forcing it
Status: RESOLVED FIXED
Alias: None
Product: ktorrent
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Joris Guisson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-14 15:31 UTC by Harald Sitter
Modified: 2019-11-29 07:38 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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