Bug 403086

Summary: OpenGL Function call without setting up proper context results in crash on (some?) AMD drivers
Product: [Applications] krita Reporter: genosimple
Component: OpenGL CanvasAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED WORKSFORME    
Severity: crash CC: halla
Priority: NOR Keywords: release_blocker
Version: 4.1.7   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: crashlog.txt

Description genosimple 2019-01-10 22:51:47 UTC
Created attachment 117392 [details]
crashlog.txt

This is a translation of a bug reported on krita's vk.com page

(https://vk.com/topic-38024296_28204669?offset=1120)

A user reports that krita crashes on his system immediately after he tries to open the popup palette with mouse right click. The log of the crash is attached to this report.

Cursory lookup suggests that the only possible culprit is the function call k_glGetSynciv(...) file kis_opengl_canvas2_p.h line 109. Exploring context of this call, we also quickly arrive at kis_canvas2.cpp, where a warning comment is placed

void KisCanvas2::slotDoCanvasUpdate()
{
    /**
     * WARNING: in isBusy() we access openGL functions without making the painting
     * context current. We hope that currently active context will be Qt's one,
     * which is shared with our own.
     */
    if (m_d->canvasWidget->isBusy()) {
        // just restarting the timer
        updateCanvasWidgetImpl(m_d->savedUpdateRect);
        return;
    }
...

Apparently, AMD drivers don't understand the virtues of hope.
Comment 1 Dmitry Kazakov 2019-05-10 18:49:09 UTC
Hi, Genosimple!

Could you please check if this build would fix the problem on the broken machine? I'm a bit of hesitant to adding this patch to the released version, because it can cause a slowdown, so I would prefer to get your input first:

https://yadi.sk/d/jUHg3R7JPVOfkA

I need the results of the testing for two cases:

1) Graphical Acceleration is set to "OpenGL"
2) Graphical Acceleration is set to "ANGLE (DirectX)"
Comment 2 Bug Janitor Service 2019-05-25 04:33:11 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 3 Bug Janitor Service 2019-06-09 04:33:12 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!