[okular] [Bug 395765] Crash when closing okular

2018-12-07 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=395765

Christoph Feck  changed:

   What|Removed |Added

   Version Fixed In||18.12.0

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 395765] Crash when closing okular

2018-12-07 Thread Dennis
https://bugs.kde.org/show_bug.cgi?id=395765

Dennis  changed:

   What|Removed |Added

 CC|m...@dennis-irrgang.com   |

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 395765] Crash when closing okular

2018-12-07 Thread Erik Quaeghebeur
https://bugs.kde.org/show_bug.cgi?id=395765

Erik Quaeghebeur  changed:

   What|Removed |Added

 CC||k...@equaeghe.nospammail.net

--- Comment #11 from Erik Quaeghebeur  ---
I'm constantly being hit by this in 1.5.3 (18.08.3). In what version is this
fixed?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 395765] Crash when closing okular

2018-10-30 Thread Riccardo Escher
https://bugs.kde.org/show_bug.cgi?id=395765

--- Comment #10 from Riccardo Escher  ---
Wow! Thank you very much!

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 395765] Crash when closing okular

2018-10-29 Thread Tobias Deiminger
https://bugs.kde.org/show_bug.cgi?id=395765

Tobias Deiminger  changed:

   What|Removed |Added

 Resolution|--- |FIXED
  Latest Commit||https://commits.kde.org/oku
   ||lar/d1ea28fc7338c24910faff7
   ||7c6308a3e4f32369a
 Status|CONFIRMED   |RESOLVED

--- Comment #9 from Tobias Deiminger  ---
Git commit d1ea28fc7338c24910faff77c6308a3e4f32369a by Tobias Deiminger.
Committed on 29/10/2018 at 20:44.
Pushed by tobiasdeiminger into branch 'master'.

Avoid crash during session restore

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.

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

Reviewers: aacid

Reviewed By: aacid

Subscribers: aacid, okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D16457

M  +1-1shell/shell.cpp

https://commits.kde.org/okular/d1ea28fc7338c24910faff77c6308a3e4f32369a

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 395765] Crash when closing okular

2018-10-26 Thread Tobias Deiminger
https://bugs.kde.org/show_bug.cgi?id=395765

--- Comment #8 from Tobias Deiminger  ---
Quite interesting. The crash is caused by a dangling KConfig* pointer inside
the KConfigGroup that's passed to Shell::readProperties. The KConfig was
deleted preliminary during Shell::openUrl(). There a QDialog event loop
processed a XSMP "SaveYourself" message, and the related handler code
eventually deleted a globally used KConfig instance.

It goes like this
1. KMainWindow::restore creates a KConfig *config =
KConfigGui::sessionConfig(). This KConfig is managed singleton-like, see static
KConfig *KConfigGui::s_sessionConfig.

2. KMainWindow::readPropertiesInternal constructs a KConfigGroup grp(config,
...) with that KConfig, and passes it on to Shell::readProperties (polymorphic
call from framework to application).

3. The trouble begins in openUrl(). There we can't find a document, and spawn a
QDialog for the "file not found" message. QDialog has an event loop that's
stacked onto the application event loop.

It happens that ksmserver sent us an XSMP "SaveYourself" message (that's
expected after client registration), which now gets processed by the QDialog
event loop. We handle "SaveYourself" with KMWSessionManager::saveState =>
KConfigGui::setSessionConfig and hit the code
   if (hasSessionConfig()) { delete s_sessionConfig; s_sessionConfig = nullptr;
}
Sadly, the old s_sessionConfig address is still stored in the KConfigGroup,
where the pointer is dangling now.

4. Inside group.readEntry( SESSION_TAB_KEY, 0 ) the dangling KConfig* is
accessed, resulting in segfault.

I'm not yet sure how to fix it. Shall we discuss it with some KF5 guys? It
seems a bit fragile if a framework passes some wrapped up pointer to
application code, and said pointer can become invalid for non-obvious reasons.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 395765] Crash when closing okular

2018-10-25 Thread Tobias Deiminger
https://bugs.kde.org/show_bug.cgi?id=395765

Tobias Deiminger  changed:

   What|Removed |Added

 Status|REPORTED|CONFIRMED
 Ever confirmed|0   |1
 CC||haxti...@posteo.de

--- Comment #7 from Tobias Deiminger  ---
Just reproduced this on openSUSE Tumbleweed, will have a closer look next days.
It never happened with okular master in my Ubuntu environment before. Obvious
differences are newer versions of Qt5 and kconfig in the Tumbleweed
configuration.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 395765] Crash when closing okular

2018-10-11 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=395765

Christoph Feck  changed:

   What|Removed |Added

 CC||zigzag@gmail.com

--- Comment #6 from Christoph Feck  ---
*** Bug 397737 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 395765] Crash when closing okular

2018-10-11 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=395765

Christoph Feck  changed:

   What|Removed |Added

 CC||mayeul.can...@live.fr

--- Comment #5 from Christoph Feck  ---
*** Bug 396783 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 395765] Crash when closing okular

2018-10-11 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=395765

Christoph Feck  changed:

   What|Removed |Added

 CC||m...@philipp-wagner.com

--- Comment #4 from Christoph Feck  ---
*** Bug 399207 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 395765] Crash when closing okular

2018-07-18 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=395765

Christoph Feck  changed:

   What|Removed |Added

   See Also||https://bugs.kde.org/show_b
   ||ug.cgi?id=394534

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 395765] Crash when closing okular

2018-07-18 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=395765

--- Comment #3 from Christoph Feck  ---
*** Bug 395684 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.

[okular] [Bug 395765] Crash when closing okular

2018-07-18 Thread Christoph Feck
https://bugs.kde.org/show_bug.cgi?id=395765

Christoph Feck  changed:

   What|Removed |Added

 CC||m...@dennis-irrgang.com

--- Comment #2 from Christoph Feck  ---
*** Bug 394429 has been marked as a duplicate of this bug. ***

-- 
You are receiving this mail because:
You are the assignee for the bug.