Review Request 121944: Krita - Fix crash when switching off OpenGL

Stefano Bonicatti smjert at gmail.com
Mon Jan 12 12:42:15 GMT 2015



> On Jan. 12, 2015, 12:01 p.m., René J.V. Bertin wrote:
> > What are the steps to trigger the crash? I haven't rebuilt Krita from 2.9ß since a bit before the holidays, and switching OpenGL off and back on with an image loaded in the editor works fine for me on OS X 10.9.5 with Intel HD3000 graphics.
> 
> Stefano Bonicatti wrote:
>     The crash is known to happend on AMD cards and proprietary drivers (if on linux) only.
>     The crash should either happen when switching off OpenGL or changing scaling mode.
> 
> René J.V. Bertin wrote:
>     OK. Is there any reason to expect that your patch introduces a regression on other OSes (esp. OS X)? I won't have time to sync and rebuild Calligra for about a week.

Unfortunately i don't know for sure, when dealing with video drivers anything can happen.
With my patch i enforced the correct usage of the contexts, but for instance this issue should've happened on ALL drivers, because creating shaders in one context and deleting them from another is clearly wrong. 
So either they have some check for this and fix it in some way internally, or hide the problem, or the context was the correct one when deleting.


- Stefano


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121944/#review73838
-----------------------------------------------------------


On Jan. 12, 2015, 10:59 a.m., Stefano Bonicatti wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121944/
> -----------------------------------------------------------
> 
> (Updated Jan. 12, 2015, 10:59 a.m.)
> 
> 
> Review request for Calligra.
> 
> 
> Repository: calligra
> 
> 
> Description
> -------
> 
> The wrong context was active when shaders were deleted.
> This also fix the crash when switching scaling mode or anything that deletes a KisOpenGLCanvas2.
>     
> Changed the KisOpenGL API that deal with contexts a bit, now is possible to choose between switching on the shared context or a widget one.
>     
> To avoid overhead switching on a context that is already current, i've added a check to see if the context we are trying to switch to is already current or not (the check doesn't use any gpu command).
> 
> 
> This should make everything still work on all others cards and drivers, though it is better to be tested, so i put it here.
> 
> This patch is now present on branch origin/krita-testing-bonicatti.
> 
> 
> Diffs
> -----
> 
>   krita/plugins/extensions/dockers/lut/ocio_display_filter.cpp 4c3b9c7 
>   krita/ui/canvas/kis_canvas2.cpp 22dd4b3 
>   krita/ui/opengl/kis_opengl.h 7f68f6b 
>   krita/ui/opengl/kis_opengl.cpp 1c49f37 
>   krita/ui/opengl/kis_opengl_canvas2.cpp 154ab4f 
>   krita/ui/opengl/kis_opengl_image_textures.cpp 47eaf55 
> 
> Diff: https://git.reviewboard.kde.org/r/121944/diff/
> 
> 
> Testing
> -------
> 
> Tested on Linux on ATI Radeon HD5850 1GB with proprietary drivers (where the issue was present). OpenGL version string: 4.4.12968 Compatibility Profile Context 14.201.1006.1002
> 
> 
> Thanks,
> 
> Stefano Bonicatti
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20150112/3db884fb/attachment.htm>


More information about the calligra-devel mailing list