Artifacts when moving schematic symbols in eeschema

I understand Kicad does some kind of xor drawing when moving components around in eeschema. Unfortunately, on my computer (Ubuntu 15.04, latest nightly build of Kicad) the system is very glitchy, leaving artifacts for simple components and refusing to draw complicated ones (micros, custom symbols) while moving them.

I assume this is a well known problem since I’ve experienced it before on an older version, an I’m wondering if it is likely to be fixed in the near future. I have read somewhere that there is going to be an opengl overhaul for schema like there was for pcbnew, does anyone know what kind of timescale this will be on? Is there any motivation for me to try to fix it myself, or are the graphics likely to change soon anyway?

(I know I can use f3 repeatedly for redrawing but it’s annoying)

Hi Joe- Do you also have a black box in the top left of your schematic? (Shown in the attachment)

I am running Debian Jessie (also nightly build). Happens with and without wxGraphicsContext enabled. The white crosses here are the artifacts remaining after my cursor passed over the block. Moving a component seems to only draw the new position, not erase the old one.

Is this the same problem you are seeing?

It looks similar, but I think it is slightly different.

I did track down my original problem in the source code. Are you familiar with the xoring method of drawing things like sprites, mouse pointers, etc? It’s a kind of bit blitting that you can read about on wiki. KiCad does a simplified version of this (using only the sprite and no mask, because it has a plain background a mask is unnecessary) However there is a bug in the code. Instead of blitting a sprite, each individual line and piece of text in the picture is xored on to the background one at a time. This means that overlapping segments of the same colour will cancel each other out (red XOR red XOR blue = 0 xXOR blue = blue) causing lots of artifacts in text and symbols. (May be visible as small circles when zoomed in on text)

It tried to fix this in the code by drawing each symbol as a stamp into memory without xor, and then xoring the final stamp. Unfortunately too many things were happening in weird places in the code that I couldn’t track down, and I only created a different set of artifacts.

I just couldn’t be bothered fixing it completely, and my understanding is that the eeschema ui will be upgraded just like pcb’s was anyway.

Quick update on this issue:

I recently changed my X11 video driver from AMD Catalyst 15.7 closed-source fglrx to the open source radeon (version 7.7.0). Both the re-draw issue as well as the black rectangle were resolved by this change.

3 Likes

Fglrx is removed from Ubuntu 16.04 anyway, you have to use radeon if you have an AMD Radeon graphics card now