https://bugs.kde.org/show_bug.cgi?id=443741

--- Comment #3 from Dmitry Kazakov <dimul...@gmail.com> ---
Hi, Tiar!

I looked into the backtrace and it looks like the transform tool in not
actually the cause of the error. The error comes from the Intel's openGL
driver. The sequence of events is like that:

1) We ask for a GLSync object in GUI thread:

#60 0x00007ffff79e1277 in Sync::getSync() () at
/home/tymon/kritadev/krita/libs/ui/opengl/KisOpenGLSync.cpp:72

2) Intel openGL driver panics and calls GI_exit, which starts destruction of
all the static objects including KisPart (and all the documents)

3) KisPart tries to open a busy wait dialog to wit until the transformation is
finished:

#45 0x00007ffff7824bdd in KisDelayedSaveDialog::blockIfImageIsBusy()
(this=0x7fffffffacd0) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qflags.h:120
#46 0x00007ffff7c88166 in (anonymous
namespace)::busyWaitWithFeedback(KisSharedPtr<KisImage>) (image=...) at
/home/tymon/kritadev/krita/libs/ui/KisPart.cpp:126

4) The dialog opens and asks Intel driver to draw the window :)

#11 0x00007ffff558b2ac in __run_exit_handlers (status=1, listp=0x7ffff5728718
<__exit_funcs>, run_list_atexit=run_list_atexit@entry=true,
run_dtors=run_dtors@entry=true) at exit.c:108
#12 0x00007ffff558b3da in __GI_exit (status=<optimized out>) at exit.c:139
#13 0x00007fffe2353fa3 in  () at /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#14 0x00007fffe2333434 in  () at /usr/lib/x86_64-linux-gnu/dri/i965_dri.so
#15 0x00007ffff65b4223 in  () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff6581ca5 in QWidgetPrivate::sendComposeStatus(QWidget*, bool) ()
at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5

5) The driver freaks out (it has declared itself as dead long before) and calls
GI_exit once again, which starts the second round of freeing all the static
objects (some of them has already been free'd obviously). It corrupts the
memory, making the transform worker fail on trivial thing.

So, I believe, this bug is either not In Krita or in the way how Krita uses
GLSync. Can you debug what happens inside KisOpenGLSync and whether there is
something suspicious happens?

Basically, it would be interesting to know if these functions behave in an
expected way:

k_glFenceSync  = (kis_glFenceSync)ctx->getProcAddress("glFenceSync");
k_glGetSynciv  = (kis_glGetSynciv)ctx->getProcAddress("glGetSynciv");
k_glClientWaitSync =
(kis_glClientWaitSync)ctx->getProcAddress("glClientWaitSync")

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to