Bug 409471 - [DrKonqi] crash on exit: message handler race condition
Summary: [DrKonqi] crash on exit: message handler race condition
Status: RESOLVED FIXED
Alias: None
Product: drkonqi
Classification: Applications
Component: general (show other bugs)
Version: 5.16.2
Platform: Compiled Sources All
: NOR crash
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-03 17:40 UTC by RJVB
Modified: 2019-07-04 08:41 UTC (History)
1 user (show)

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


Attachments
backtrace (4.17 KB, text/plain)
2019-07-03 17:40 UTC, RJVB
Details
simple fix (1.08 KB, text/plain)
2019-07-03 17:41 UTC, RJVB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description RJVB 2019-07-03 17:40:52 UTC
Created attachment 121310 [details]
backtrace

SUMMARY
After a recent commit, DrKonqi installs a message handler of its own using qInstallMessageHandler(). It does not uninstall that handler when it is being deleted. As a result any debug/warning/logging messages generated later on during the global destruction phase can cause the crash shown in the attached backtrace.


STEPS TO REPRODUCE
1. install (say) a development Qt version that prints very late debug output during application exit
2. trigger DrKonqi
3. quit DrKonqi

OBSERVED RESULT
A crash; DrKonqi probably triggers on itself

EXPECTED RESULT
No crash.


ADDITIONAL INFORMATION
Comment 1 RJVB 2019-07-03 17:41:30 UTC
Created attachment 121311 [details]
simple fix