tobiasdeiminger created this revision.
Herald added a project: Okular.
Herald added a subscriber: okular-devel.
tobiasdeiminger requested review of this revision.

REVISION SUMMARY
  Do all access to the passed KConfigGroup really synchronous to 
KMainWindow::readProperties, then we're safe.
  
  Currently kxmlgui can't guarantee that the passed KConfigGroup is still valid 
after our call to Shell::openUrl(). This is because inside Shell::openUrl, 
QDialog::exec may get called. The stacked event loop processes all kinds of 
asynchronous events, and litterally *anything* can happen. E.g. incoming ICE 
and DBus messages may be processed. In bug 395765 it happened that XSMP 
SafeYourself was processed, which calls KConfigGui::setSessionConfig, which 
leaves the KConfig pointer inside KConfigGroup dangling.
  
  BUGS: 395765

TEST PLAN
  - get recent Qt5 and KF5
  - manually save desktop session while a document is open in okular
  - modify ~/.config/session/okular_<sessionid> so that Urls points to non 
existing file
  - manually restore session with okular -session <session_id>, dialog will 
open and warn about non existent file
  - okular shall not crash after closing that dialog

REPOSITORY
  R223 Okular

BRANCH
  avoid_crash_session_restore

REVISION DETAIL
  https://phabricator.kde.org/D16457

AFFECTED FILES
  shell/shell.cpp

To: tobiasdeiminger
Cc: okular-devel, ngraham, aacid

Reply via email to