Bug 93547 - detect OpenGL crashes and disable it
Summary: detect OpenGL crashes and disable it
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
5.0.0.0.beta1
Hardware: Other All
: medium normal
Assignee: Michael Meeks
URL:
Whiteboard: target:5.1.0 target:5.0.2
Keywords:
Depends on:
Blocks: VCL-OpenGL 93546
  Show dependency treegraph
 
Reported: 2015-08-20 15:32 UTC by Michael Meeks
Modified: 2016-10-25 19:24 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Meeks 2015-08-20 15:32:12 UTC
We need a way to detect if a crash occurs during an OpenGL operation, or particularly a setup operation - and if so, disable OpenGL.
Comment 1 Michael Meeks 2015-08-20 18:43:31 UTC
Patch pushed to gerrit: https://gerrit.libreoffice.org/17881 for CI, and then to -5-0 ... hopefully should help reduce QA load.
Comment 2 Regina Henschel 2015-08-20 19:28:07 UTC
Hi Michael, can you please explain your patch? You have introduced a lot of lines

   OpenGLZone aZone

but inside the methods the variable aZone is nowhere used. For professional developers it might be clear, but for people like me it is not clear.
Comment 3 Michael Meeks 2015-08-21 06:44:12 UTC
Hi Regina =) sure - if you look at the implementation of the class - that objects survives for the scope of the method and is destructed at the end, the constructor increments a count and the destructor decrements it - should be all in-lined and reasonably efficient - there is no threading concern in these methods. It's essentially the same idea as our solar mutex guard class wrappers.
HTH.
Comment 4 Commit Notification 2015-08-21 06:44:59 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d20e7e38641868bf14041f090b3668e0148904c7

tdf#93547 - Disable OpenGL if we have a SEGV on windows in that code.

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2015-08-21 08:19:01 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=81a49f68d61f984503b89e0766bea81ee4733d9c

tdf#93547 - add basic lock-down support for OpenGL settings.

It will be available in 5.1.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2015-08-21 08:48:15 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a1e77b96a6ec93be07e23ab13585bec5a953b950&h=libreoffice-5-0

tdf#93547: Add basic lock-down support for OpenGL settings

It will be available in 5.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2015-08-21 08:51:39 UTC
Michael Meeks committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bf8a43a9037d65f38db6115d4d8133499f86cebe&h=libreoffice-5-0

tdf#93547 - Disable OpenGL if we have a SEGV on windows in that code.

It will be available in 5.0.2.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Regina Henschel 2015-08-23 21:20:57 UTC
I have checked "Use OpenGL for all rendering" and "Allow use of OpenCL". Then I open file "media_embedding.odp" from sd/qa/unit/data. When I start presentation, LibreOffice hangs so totally, that the whole PC does not react and I have to kill the process. I know, that my graphic card does not support OpenGL in the needed way, but isn't this patch to prevent such reaction?

I have used Windows 7, 32 bit, with an own debug-build Version: 5.1.0.0.alpha1+
Build ID: 7d92b27aff3b4d1c59aef9866003f4d001c0fc25 Locale: de-DE (de_DE) and a normal build Version: 5.1.0.0.alpha1+ Build ID: 3230c8cf1cf2dc486f038d369e7f4f44ffd6b0a7 Locale: de-DE (de_DE)
Comment 9 Regina Henschel 2015-08-23 22:08:06 UTC
Same with Version: 5.1.0.0.alpha1+
Build ID: fdafa5302df26df4f147b0d2efb6064389a1330c
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-08-22_23:42:26
Locale: de-DE (de_DE)
Comment 10 Michael Meeks 2015-08-24 07:56:49 UTC
> I have checked "Use OpenGL for all rendering" and "Allow use of OpenCL".
> Then I open file "media_embedding.odp" from sd/qa/unit/data. When I start
> presentation, LibreOffice hangs so totally, that the whole PC does not react
> and I have to kill the process. I know, that my graphic card does not
> support OpenGL in the needed way, but isn't this patch to prevent
> such reaction?

How interesting. So - did you re-start LibreOffice after selecting "Use OpenGL for all rendering" ? can you disable "use hardware acceleration" for the presentation (it may be some horrible DirectX / OpenGL mis-interaction).

And no - the patch essentially is not a watchdog for hangs; it only catches crashes. On the other hand - we could potentially create a watchdog for hangs too if that would help. I'll file another bug.

Thanks for testing.