kio_help: Fix crash in QCoreApplication when accessing help://
ClosedPublic

Authored by mpyne on Oct 13 2018, 11:20 PM.

Details

Summary

A recent commit d428fc8e6447ede81f1e1911d0b66b39265672f3 removed old custom crash handling code in favor of KCrash. But this actually adds a dependency on there being a valid QCoreApplication object (since KCrash uses it in its own init).

I had thought this was done in kdeinit5 (which launches the kioslave) but that does not appear to be the case, when I looked at the sibling kio_file code, it initialized its own QCoreApplication.

I took from that example to simply create the QCoreApplication here.

BUG: 399709

If this works I'd like to commit shortly to avoid landing a new bug in 5.51.0 :)

Test Plan

I tried running KHelpCenter as discussed in the original bug report, and kdeinit5 did not crash.

I also tried kioclient5 cat help:konsole directly and still no crash.

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mpyne created this revision.Oct 13 2018, 11:20 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptOct 13 2018, 11:20 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
mpyne requested review of this revision.Oct 13 2018, 11:20 PM
ngraham edited the summary of this revision. (Show Details)Oct 14 2018, 5:06 AM
This revision is now accepted and ready to land.Oct 14 2018, 9:27 AM
broulik accepted this revision.Oct 14 2018, 11:33 AM
broulik added a subscriber: broulik.

Funny, I just noticed the same thing yesterday and was just about to make a patch but then saw this

This revision was automatically updated to reflect the committed changes.
albertvaka added a subscriber: albertvaka.EditedNov 5 2018, 11:25 PM

As I commented in this similar patch (https://phabricator.kde.org/D16692 ) I think this is a regression that should be fixed in KIO. Opinions?

It was fixed in that it doesn't crash anymore. Due to crash handling now going through kcrash you still want to have a coreapp in every slave though.

Old apps that didn't have a QApplication are broken by this version of KIO. Definitely a regression to me :/