Bug 401940

Summary: More than one Assistant Tool causes black rectangle to appear
Product: [Applications] krita Reporter: weavermarquez0
Component: Tool/AssistantsAssignee: sh_zam <shzam>
Status: RESOLVED FIXED    
Severity: normal CC: alvin, crazyjerick, dan.hetherington, ghevan, griffinvalley, Gvgeo, haddipehalwan, halla, info, jitterfactor, lonsspammail, nate, pinknalu, scottpetrovic, shzam, taekwondosteph, tamtamy.tymona, tysontan
Priority: NOR    
Version: 4.4.3-beta1   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Attachments: Video of the Black Rectangle in Krita
Overlapping assistants visual glitch under Windows (OpenGL)

Description weavermarquez0 2018-12-10 01:37:12 UTC
SUMMARY

Placing multiple assistants makes a black rectangle appear across the canvas near where they are placed. This bug is major as it severely limits the usability of the assistants tool.

STEPS TO REPRODUCE
1. Place an area covering assistant tool
2. Place another area covering assistant tool
3. A black bar will flicker or cover the canvas at various zooms.

OBSERVED RESULT

A large black rectangle appears at various zooms.

 https://i.imgur.com/vZlxqks.jpg

There seems to be a "safe range" of zooms, between 54% and 100% inclusive, where there is no black rectangle and everything appears normally. When I go aboce 100% to about 140%, there are only a few locations on the screen where the black rectangle does not cover the screen, typically looking a safe distance away from the assistant tools.

This applies to the vanishing point, rectangle, concentric ellipse, plane, perspective, and fish eye assistants. I have not tried the others.


EXPECTED RESULT
I expect to be able to use multiple assistant tools to display without causing black rectangles to show up.

Thank you very much for your time and effort on Krita.

ADDITIONAL INFORMATION
Krita
  Version: 4.1.5

Qt
  Version (compiled): 5.9.3
  Version (loaded): 5.9.3

OS Information
  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.17134
  Pretty Productname: Windows 10 (10.0)
  Product Type: windows
  Product Version: 10

OpenGL Info
  **OpenGL not initialized**
Comment 1 weavermarquez0 2018-12-21 07:07:18 UTC
This may be helpful: 

This bug seems to not occur at any zoom level when I disable Canvas Graphics Acceleration in Settings -> Configure Krita -> Display. However, if I enable Canvas Graphics Acceleration at all, regardless of OpenGL or Direct3D 11 via ANGLE, regardless of scaling mode, and regardless of if texture buffer is enabled, this bug continues to occur.

Thank you for your patience.
Comment 2 Halla Rempt 2018-12-24 15:20:38 UTC
This happens with some graphics drivers: it's a bug in the way those drivers handle textures, and there isn't anything we can do :-(
Comment 3 gvgeo 2019-03-05 10:02:31 UTC
I have the same problem on two windows pc.
Desktop -> Windows 10 version 1809 (OS Build 17763.316). Radeon RX 470 or intel HD Graphics 4600. (Tested multiple driver versions on rx470)
Laptop ->Windows 10 version 1607 (OS Build 14393.2068). Intel HD Graphics 5500
Tried 3.3.3, 4.1.7.101(release), 4.1.7.101 (git 55a1810) and even v4.2.0-prealpha-334-g7b4550bd46 krita versions
Laptop on linux works fine.
I can test and an older nvidia card, but at this point I'm pretty sure is not a graphics driver issue.

The black box takes the dimensions from the the assistants lines you control with points(but not the ones of the preview that follow the cursor), so when you move the third point in an impossible position the box disappears with the assistant's lines together. But even if you disable both "Show Painting Assistants" and "Show Assistants Previews" the box still remains, till you remove the assistant(or change size/move).
The black box is on the second or rest assistants, even if you resize the first one(first assistant will always render correctly).
The problem is obvious when zooming and panning, but it mainly depends with the size of the assistants(ellipses and fish eye only) that overlap on 'viewport'.Generally when the area  is less than about a quarter of the size of the viewport both on x and y the problem will not occur. If it covers the whole dimension on x or y will always occur. And Between quarter and full coverage will randomly appear on certain sizes.
OpenGL, Direct3D11 or texture buffer make no difference.

==================================
Krita
  Version: 3.3.3

OS Information
  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.17763
  Pretty Productname: Windows 10 (10.0)
  Product Type: windows
  Product Version: 10

OpenGL Info 
  Vendor:  ATI Technologies Inc. 
  Renderer:  "Radeon (TM) RX 470 Graphics" 
  Version:  "3.0.13544 Compatibility Profile Context 25.20.15011.1004" 
  Shading language:  4.60 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, profile  QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile)) 
  Current format:    QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) 
     Version: 3.0
     Supports deprecated functions true 
     is OpenGL ES: false 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsAngleD3D11: true 
  isQtPreferAngle: false 
  overridePreferAngle: false 
== log ==
 createPlatformOpenGLContext QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, profile  QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile))
Basic wglCreateContext gives version 4.6
OpenGL 2.0 entry points available
GPU features: QSet()
supportedRenderers GpuDescription(vendorId=0x1002, deviceId=0x67df, subSysId=0x34111462, revision=207, driver: "aticfx64.dll", version=25.20.15011.1004, "Radeon (TM) RX 470 Graphics") renderer:  QFlags(0x1|0x2|0x4|0x8|0x20)
Qt: Using WGL and OpenGL from "opengl32.dll"
create OpenGL: "ATI Technologies Inc.","Radeon (TM) RX 470 Graphics" default ContextFormat: v4.6 profile: QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile) options: QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions),SampleBuffers, Extension-API present
Extensions: 298
"choosePixelFormat  Attributes:  0x2003 , 0x2027 , 0x2010 , 0x1 , 0x2001 , 0x1 , 0x2014 , 0x18 , 0x2011 , 0x1 , 0x2022 , 0x18 , 0x2013 , 0x202b , 0x201b , 0x8 , 0x2023 , 0x8 , 0x2041 , 0x0 , \n    obtained px # 21  of  80 \n     PIXELFORMATDESCRIPTOR dwFlags=0x8025 PFD_DRAW_TO_WINDOW PFD_SUPPORT_OPENGL PFD_SUPPORT_COMPOSITION PFD_DOUBLEBUFFER iPixelType=0 cColorBits=32 cRedBits=8 cRedShift=16 cGreenBits=8 cGreenShift=8 cBlueBits=8 cBlueShift=0 cDepthBits=24 cStencilBits=8 cAuxBuffers=4 iLayerType=0 cAlphaBits=8 cAlphaShift=24 "
createContext Creating context version 3 . 0 3 attributes
QWindowsGLContext 0x2beef70 ARB  requested:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, profile  QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile)) 
    obtained # 21 ARB QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) 
     PIXELFORMATDESCRIPTOR dwFlags=0x8025 PFD_DRAW_TO_WINDOW PFD_SUPPORT_OPENGL PFD_SUPPORT_COMPOSITION PFD_DOUBLEBUFFER iPixelType=0 cColorBits=32 cRedBits=8 cRedShift=16 cGreenBits=8 cGreenShift=8 cBlueBits=8 cBlueShift=0 cDepthBits=24 cStencilBits=8 cAuxBuffers=4 iLayerType=0 cAlphaBits=8 cAlphaShift=24  swap interval:  0 
    default:  ContextFormat: v4.6 profile: QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile) options: QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions) 
    HGLRC= 0x30000
createPlatformOpenGLContext QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, profile  QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile))
"choosePixelFormat  Attributes:  0x2003 , 0x2027 , 0x2010 , 0x1 , 0x2001 , 0x1 , 0x2014 , 0x18 , 0x2011 , 0x1 , 0x2022 , 0x18 , 0x2013 , 0x202b , 0x201b , 0x8 , 0x2023 , 0x8 , 0x2041 , 0x0 , \n    obtained px # 21  of  80 \n     PIXELFORMATDESCRIPTOR dwFlags=0x8025 PFD_DRAW_TO_WINDOW PFD_SUPPORT_OPENGL PFD_SUPPORT_COMPOSITION PFD_DOUBLEBUFFER iPixelType=0 cColorBits=32 cRedBits=8 cRedShift=16 cGreenBits=8 cGreenShift=8 cBlueBits=8 cBlueShift=0 cDepthBits=24 cStencilBits=8 cAuxBuffers=4 iLayerType=0 cAlphaBits=8 cAlphaShift=24 "
createContext Creating context version 3 . 0 3 attributes
QWindowsGLContext 0x122ef10 ARB  requested:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 0, profile  QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile)) 
    obtained # 21 ARB QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile)) 
     PIXELFORMATDESCRIPTOR dwFlags=0x8025 PFD_DRAW_TO_WINDOW PFD_SUPPORT_OPENGL PFD_SUPPORT_COMPOSITION PFD_DOUBLEBUFFER iPixelType=0 cColorBits=32 cRedBits=8 cRedShift=16 cGreenBits=8 cGreenShift=8 cBlueBits=8 cBlueShift=0 cDepthBits=24 cStencilBits=8 cAuxBuffers=4 iLayerType=0 cAlphaBits=8 cAlphaShift=24  swap interval:  0 
    default:  ContextFormat: v4.6 profile: QSurfaceFormat::OpenGLContextProfile(CompatibilityProfile) options: QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions) 
    HGLRC= 0x10001 
== end log == 



================================================================================
SESSION: 05 Mar 2019 08:38:49 +0200

Krita

  Version: 4.2.0-pre-alpha (git 7b4550b)

Qt

  Version (compiled): 5.12.1
  Version (loaded): 5.12.1

OS Information

  Build ABI: x86_64-little_endian-llp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: winnt
  Kernel Version: 10.0.14393
  Pretty Productname: Windows 10 (10.0)
  Product Type: windows
  Product Version: 10

OpenGL Info
 
  Vendor:  "Google Inc." 
  Renderer:  "ANGLE (Intel(R) HD Graphics 5500 Direct3D11 vs_5_0 ps_5_0)" 
  Version:  "OpenGL ES 3.0 (ANGLE 2.1.0.57ea533f79a7)" 
  Shading language:  "OpenGL ES GLSL ES 3.00 (ANGLE 2.1.0.57ea533f79a7)" 
  Requested format:  QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
  Current format:    QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::NoProfile) 
     Version: 3.0
     Supports deprecated functions false 
     is OpenGL ES: true 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsAngleD3D11: true 
  isQtPreferAngle: false 
== log ==
 Supported renderers: QFlags(0x2|0x4) 
Surface format preference list: 
* QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
    QSurfaceFormat::OpenGLES 
* QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
    QSurfaceFormat::OpenGL 
* QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 16, greenBufferSize 16, blueBufferSize 16, alphaBufferSize 16, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::scRGBColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
    QSurfaceFormat::OpenGLES 
* QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 10, greenBufferSize 10, blueBufferSize 10, alphaBufferSize 2, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::bt2020PQColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
    QSurfaceFormat::OpenGLES 
* QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 16, greenBufferSize 16, blueBufferSize 16, alphaBufferSize 16, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::scRGBColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
    QSurfaceFormat::OpenGL 
* QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 10, greenBufferSize 10, blueBufferSize 10, alphaBufferSize 2, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::bt2020PQColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
    QSurfaceFormat::OpenGL 
Probing format... QSurfaceFormat::DefaultColorSpace QSurfaceFormat::OpenGLES 
Found format: QSurfaceFormat(version 3.0, options QFlags<QSurfaceFormat::FormatOption>(DeprecatedFunctions), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CompatibilityProfile) 
    QSurfaceFormat::OpenGLES 
 
== end log == 

Hardware Information

  GPU Acceleration: auto
  Memory: 4010 Mb
  Number of Cores: 4
  Swap Location: C:/Users/Name/AppData/Local/Temp

05 Mar 2019 08:39:09 +0200: Created image "Unnamed", 1600 * 1200 pixels, 300 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 2
Comment 4 gvgeo 2019-03-05 13:40:06 UTC
Tested and a Windows 7 system with an Intel HD Graphics 530, has the same problem.
The only common that these 3 computers have is windows installation and CPU from intel (I tested the radeon GPU, with the integrated GPU disabled).
Comment 5 Scott Petrovic 2019-04-05 14:43:00 UTC
The original reporter says it is caused by the graphics card "This bug seems to not occur at any zoom level when I *disable Canvas Graphics Acceleration*". 

This statement means it IS the graphics card that is causing it. 

The other reporter (gvgo) didn't seem to test it with their graphics card turned off. Canvas Graphics Acceleration has to be turned completely off to test this. Intel HD cards are graphics cards. 

Krita can't really fix the graphics card drivers. I would recommend trying to update the graphics card drivers if you want a better chance to use them with Krita.
Comment 6 gvgeo 2019-04-05 16:46:01 UTC
I reopen the bug, cause it seems to be closed on false assumption. Although the reason might be true.

First, yes, I was reporting about Canvas Graphics Acceleration ON.
The report had already the information that without works, I tried to give you more information. Probably should said that from start, although I included the options that don't help.

But if you read my report you can see that my main GPU is an amd Radeon RX 470.
And the last thing I said is, that I made sure that it was the only one running. (Wanted to make sure that the intel,that I use concurrently in the system for other reasons, was not used for krita)

On top of that I tested 3 intel GPUs, trying to find out a common cause.

About updates:
I specifically said that I tried multiple drivers for Radeon.
But for the intel only my main system runs on latest driver(not beta). The others probably are older.

============
NEW INFO

I tested and an nvidia 750ti, it appears to behave differently, and would not notice if you were not aware of.
The error is more difficult to reproduce and will fix soon after couple frames.
It appears about twice in every ten tries, and in worse case, will go away the moment you stop zooming(continuous zoom).

===========

Even if it is the GPU drivers. On the most popular platform, with the 2 of the 3 GPU makers having the issue, and the third also showing signs of it, shouldn't you try to change the problem?

Of course I understand that with only 2 people reporting the problem, would not want to waste your time on this problem. But It seems wrong to me, saying that you resolved the bug, when there is obviously a problem.
Comment 7 Scott Petrovic 2019-04-05 17:17:26 UTC
I think the issue is that we don't know what to do about this. We don't have this hardware...and we don't have access to the source code to see what is going on with the graphics card drivers. 

We also aren't getting many reports at all about this. It doesn't appear to be a common issue with graphics cards. 

Have you tried contacting one of these companies to see if they can help you? Do they even care about this issue?
Comment 8 gvgeo 2019-04-05 19:45:46 UTC
I don't know what exactly more info you would need at this point.
I can give now the answer, without even asking.
"We are very sorry you having this problem, be sure that we will look into your issue. You are valuable customer for us. Your best experience with our products, is our priority."
As for you other question, for a small program, without any money, and no big names using it, I'm pretty sure you know the answer already.

Beside jokes. 
Despite waiting that answer, I started searching more into that problem to complete the report for AMD. Only to find out that intel had it too.
Nvidia test didn't convinced me, that there is not a problem in the program.

As for contacting the companies, I'm not gonna lie to any report. I will also have to include this bug report that I clearly state that is a problem in all the GPUs.
Despite this, if you wish, for me to sent a report as an individual, will do. If this would be, a way to help you.

As for the no reports, it drove me crazy till today. Although I can see how most people would continue with one assistant, it breaks curverlinear perspective. But now, with nvidia behavior, knowing that most power users have nvidia, I can at least partially explain it. Coupled with the good possibility that they move to an other program and don't bother.

Personally I'm not an artist, only recently picked it as a hobby, and just now move on from paper. For now I turn off acceleration, also preparing for dual boot anyway.

I didn't report the issue to solve my problem. But merely to help you guys have a complete picture of the problems. I don't expect to solve the issue, as nvidia shows that driver plays a role. The best I was expecting was that you could found a workaround.

Not having the hardware is a little difficult, I guess nobody uses windows... (Not sure how that would work). Close source is a problem, but I would never suggest to dig into drivers too.

In the end, knowing how difficult this problem is to solve. Me too, would agree, is better to focus on more important bugs, and issues. But closing it, feels wrong.
Comment 9 Bug Janitor Service 2019-04-20 04:33:09 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 10 gvgeo 2019-04-20 05:02:03 UTC
With only 2 people reporting, it looks like, this bug will remain unfixed.

With all the info provided, and no more specific info asked,
instead of changing to REPORTED again, will change the status from
NEEDSINFO - WAITINGFORINFO to
NEEDSINFO - BACKTRACE.
Comment 11 Halla Rempt 2019-04-20 07:06:08 UTC
No, it should be in the reported state. I don't know how to fix the issue, and the problem probably is in the way Qt paints QImage's using opengl.
Comment 12 vanyossi 2019-09-25 17:24:16 UTC
Just for the record. I can reproduce this issue easily on an intel graphics card Apple laptop.

latest master(9894a2026969) Qt 5.12.3, mojave 10.14.6
Comment 13 wolthera 2019-10-07 15:46:02 UTC
If ivan can reproduce it, we should set it to confirmed.
Comment 14 Nate 2019-10-24 18:51:17 UTC
I just ran into this after watching a video on the Assistant tool. I decided to try out the tool by setting up guides for isometric drawing but the screen kept going black on zoom it. It appears to happen with the ends of assistants are all out of view and you are zooming in between them. I had assistants drawn over the entire canvas so if I zoomed in more than 50% it would all go black. After testing a much smaller assistants you can tell it is only if you are zooming in between endpoints.
Comment 15 Tiar 2020-03-21 13:08:54 UTC
*** Bug 419068 has been marked as a duplicate of this bug. ***
Comment 16 Tiar 2020-05-28 11:01:53 UTC
*** Bug 422157 has been marked as a duplicate of this bug. ***
Comment 17 Tiar 2020-08-30 17:29:15 UTC
*** Bug 379746 has been marked as a duplicate of this bug. ***
Comment 18 Tiar 2020-08-30 17:43:09 UTC
*** Bug 425998 has been marked as a duplicate of this bug. ***
Comment 19 schlag 2020-10-28 19:31:00 UTC
I just wanted to confirm that I too experience this bug. It's quite an unpleasant one as I cannot zoom past 100% when working on perspective drawings utilizing the vanishing point and fish-eye point assistants. My experience is exactly as described by the original poster for this bug.

I have the latest drivers installed for my graphics card: AMD Radeon HD 7800 (2GB RAM) - driver date: 9/9/20 (vers.20.9.1); Win 10; Wacom Intuos 3 (model PTZ-630).
Comment 20 Ralek Kolemios 2020-10-30 04:17:03 UTC
I've never experienced this with the vanishing point ruler, but I've intermittently experienced it with small parallel rulers, and very often with fisheye perspective rulers
Comment 21 Dan Hetherington 2020-11-01 16:43:21 UTC
I also have the same experience, using an NVIDIA GeForce GTX 950 on Windows 10 (10.0.19041 Build 19041), graphics driver version 27.21.14.5638.
Comment 22 LaTor 2021-01-23 19:32:58 UTC
Created attachment 135110 [details]
Video of the Black Rectangle in Krita

I have been using the assistant tool in Krita 4.4.2. and the video show that on a .kra with only one layer, the screen behaves as normal; however, once assistants are placed, the screen immediately turns black or a black rectangle appears.
Comment 23 Tyson Tan 2021-03-07 13:43:36 UTC
When using ANGLE as the renderer, overlapping Concentric Ellipse Assistants cause black rectangle to appear when zoom-in. Tested under Windows 10 X64 (20H2).

How to trigger:
1. Make sure the renderer is ANGLE (DX11)
2. Create a new document
3. Choose Assistant Tool, create 2 Concentric Ellipse Assistant, put one of them inside another so they are overlapping.
4. Zoom in (in my case, 565.7%)

I was unable to reproduce this bug under OpenGL, so I guess it is ANGLE specific.
Comment 24 Tyson Tan 2021-03-07 13:44:37 UTC
Tested with Krita 4.4.3 beta 1

(In reply to Tyson Tan from comment #23)
> When using ANGLE as the renderer, overlapping Concentric Ellipse Assistants
> cause black rectangle to appear when zoom-in. Tested under Windows 10 X64
> (20H2).
> 
> How to trigger:
> 1. Make sure the renderer is ANGLE (DX11)
> 2. Create a new document
> 3. Choose Assistant Tool, create 2 Concentric Ellipse Assistant, put one of
> them inside another so they are overlapping.
> 4. Zoom in (in my case, 565.7%)
> 
> I was unable to reproduce this bug under OpenGL, so I guess it is ANGLE
> specific.
Comment 25 Bug Janitor Service 2021-04-28 17:02:40 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/826
Comment 26 sh_zam 2021-04-28 18:25:47 UTC
Git commit 6d0b2be469d062f5a7077da8849bb4dcfbeda165 by Sharaf Zaman.
Committed on 28/04/2021 at 16:59.
Pushed by rempt into branch 'master'.

Bugfix: Artifact with more than one active assitant

Problem: With more than one assitants active on canvas, often on devices
with high resolution the Pixmap cache would fill up immediately. This
would internally trigger glDeleteTexture right after the first pixmap is
rendered and when turn for second pixmap is due, it would get assigned
the same name as the previously generated (which is a correct behavior!
but it only seems to happen with some drivers). With same name as
previous one Qt doesn't render it (see
QOpenGL2PaintEngineExPrivate::updateTexture).

Workaround: Because of this name clash, we workaround this Qt bug by
increasing the cache size, so the new textures don't immediately delete
the previous ones and take their names. Ideally, this should be fixed
inside Qt.

Devices with this problem:
+ Android
+ ChromeOS (mesa)
+ Windows (ANGLE)

M  +7    -4    libs/ui/opengl/kis_opengl.cpp

https://invent.kde.org/graphics/krita/commit/6d0b2be469d062f5a7077da8849bb4dcfbeda165
Comment 27 Tyson Tan 2021-04-29 03:32:17 UTC
Thank you, Sharaf! :D
Comment 28 sh_zam 2021-06-08 07:21:49 UTC
Git commit b57713c24454c78d1a54e3f8fa0526484ba819d3 by Sharaf Zaman.
Committed on 08/06/2021 at 07:21.
Pushed by szaman into branch 'krita/4.3'.

Bugfix: Artifact with more than one active assitant

Problem: With more than one assitants active on canvas, often on devices
with high resolution the Pixmap cache would fill up immediately. This
would internally trigger glDeleteTexture right after the first pixmap is
rendered and when turn for second pixmap is due, it would get assigned
the same name as the previously generated (which is a correct behavior!
but it only seems to happen with some drivers). With same name as
previous one Qt doesn't render it (see
QOpenGL2PaintEngineExPrivate::updateTexture).

Workaround: Because of this name clash, we workaround this Qt bug by
increasing the cache size, so the new textures don't immediately delete
the previous ones and take their names. Ideally, this should be fixed
inside Qt.

Devices with this problem:
+ Android
+ ChromeOS (mesa)
+ Windows (ANGLE)

M  +7    -4    libs/ui/opengl/kis_opengl.cpp

https://invent.kde.org/graphics/krita/commit/b57713c24454c78d1a54e3f8fa0526484ba819d3
Comment 29 sh_zam 2021-06-08 07:28:31 UTC
Git commit 01514224cc4558d94c67eb2b8e9feeabec8ab89c by Sharaf Zaman.
Committed on 08/06/2021 at 07:26.
Pushed by szaman into branch 'krita/4.4.5'.

Bugfix: Artifact with more than one active assitant

Problem: With more than one assitants active on canvas, often on devices
with high resolution the Pixmap cache would fill up immediately. This
would internally trigger glDeleteTexture right after the first pixmap is
rendered and when turn for second pixmap is due, it would get assigned
the same name as the previously generated (which is a correct behavior!
but it only seems to happen with some drivers). With same name as
previous one Qt doesn't render it (see
QOpenGL2PaintEngineExPrivate::updateTexture).

Workaround: Because of this name clash, we workaround this Qt bug by
increasing the cache size, so the new textures don't immediately delete
the previous ones and take their names. Ideally, this should be fixed
inside Qt.

Devices with this problem:
+ Android
+ ChromeOS (mesa)
+ Windows (ANGLE)

M  +7    -4    libs/ui/opengl/kis_opengl.cpp

https://invent.kde.org/graphics/krita/commit/01514224cc4558d94c67eb2b8e9feeabec8ab89c
Comment 30 vanyossi 2021-09-25 05:45:57 UTC
Im getting this bug on macOS M1. Removing the if for NVIDIA and openGLES (from comment 29 patch) fixes the bug for this chip, however may I ask if this can be applied to all opengl aware devices we support?
Comment 31 sh_zam 2021-09-27 17:28:29 UTC
> --- Comment #30 from vanyossi <ghevan@gmail.com> ---
> Im getting this bug on macOS M1. Removing the if for NVIDIA and openGLES (from
> comment 29 patch) fixes the bug for this chip, however may I ask if this can be
> applied to all opengl aware devices we support?

Hello!

I think it should be safe enough to apply this to all OpenGL devices,
even though DesktopGL (seems like only Linux now) isn't a victim to the
bug.

I did some rudimentary testing on Linux and everything seems fine.
Comment 32 Tiar 2022-05-23 16:22:10 UTC
Does it still happen on any system? Can anyone confirm?

I tried to use two overlapping concentric ellipses, switched to Freehand brush, zoomed in, but no black rectangles appear (I tested on Linux Mint with OpenGL on).
Comment 33 Tyson Tan 2022-05-24 02:03:17 UTC
Created attachment 149150 [details]
Overlapping assistants visual glitch under Windows (OpenGL)

I tested it against the issues reported in bug 422157.
It still happens, but only when I set the canvas acceralation mode to OpenGL.
D3D11 ANGLE mode works fine.

Tested under Windows 10 21H2, AMD FirePro W5100 + latest Adrenalin driver. An ICC profile is assisned to the screen on system and in Krita.
Comment 34 Alvin Wong 2022-05-24 16:46:51 UTC
Yes, I can reproduce on Windows + Intel OpenGL driver too.
Comment 35 Bug Janitor Service 2022-08-05 14:35:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/1537
Comment 36 Dmitry Kazakov 2022-09-05 14:54:44 UTC
Git commit 5b52e54952280f49d89476d2711a746005a67462 by Dmitry Kazakov, on behalf of Sharaf Zaman.
Committed on 05/09/2022 at 14:54.
Pushed by dkazakov into branch 'master'.

Make the OpenGL workaround available for all platforms

M  +10   -0    libs/ui/dialogs/kis_dlg_preferences.cc
M  +65   -49   libs/ui/forms/wdgdisplaysettings.ui
M  +3    -5    libs/ui/opengl/kis_opengl.cpp

https://invent.kde.org/graphics/krita/commit/5b52e54952280f49d89476d2711a746005a67462
Comment 37 sh_zam 2022-09-05 17:27:55 UTC
Git commit 3d605d4ff24fc994cc605873f11bec43e6506a0a by Sharaf Zaman.
Committed on 05/09/2022 at 17:26.
Pushed by szaman into branch 'krita/5.1'.

Make the OpenGL workaround available for all platforms

(cherry picked from commit 5b52e54952280f49d89476d2711a746005a67462)

M  +10   -0    libs/ui/dialogs/kis_dlg_preferences.cc
M  +17   -1    libs/ui/forms/wdgdisplaysettings.ui
M  +3    -5    libs/ui/opengl/kis_opengl.cpp

https://invent.kde.org/graphics/krita/commit/3d605d4ff24fc994cc605873f11bec43e6506a0a
Comment 38 Dmitry Kazakov 2022-09-20 08:37:43 UTC
Git commit f63892259d518eadf436aa1c88d7adef45daa003 by Dmitry Kazakov.
Committed on 20/09/2022 at 08:37.
Pushed by dkazakov into branch 'krita/5.1'.

Make the OpenGL workaround available for all platforms

M  +1    -1    libs/image/kis_paint_device.cc
M  +15   -4    plugins/dockers/layerdocker/LayerBox.cpp
M  +5    -1    plugins/dockers/layerdocker/LayerBox.h

https://invent.kde.org/graphics/krita/commit/f63892259d518eadf436aa1c88d7adef45daa003