KiCad crashing when adding a symbol to schematic

I’m running KiCad 6.0.2-1 on Manjaro Linux and cannot use the software at all now. Every time I select a symbol to be added to the schematic the whole of KiCad crashes on me. This happens with existing projects and newly created ones, I’ve even tried a couple of different symbols.

I ran KiCad from the terminal to figure out what was going on, the first time I got this error:

corrupted size vs. prev_size zsh: IOT instruction (core dumped)

After that I received this error every time:

zsh: segmentation fault (core dumped) kicad

Now after trying to add a power symbol to a blank project I got this error:
zsh: segmentation fault (core dumped) kicad

i965: Failed to submit batchbuffer: No such file or directory zsh: IOT instruction (core dumped) kicad

Help would be greatly appreciated!

First:
Start by upgrading KiCad to V6.0.4. There have been some bug fixes in between.
(Or better, because you have trouble now:

  1. Uninstall KiCad.
  2. Delete / rename the configuration files.
  3. Install KiCad V6.0.4.

Second:
When you have problems, always post the full KiCad verstion from: Help / About KiCad / Copy Version Info. It’s some 15+ lines with info over various parts of KiCad.

Third: I can’t help much with this, maybe you can find a hint with the search below:

https://html.duckduckgo.com/html?q=i965%3A+Failed+to+submit+batchbuffer

I’d rather get KiCad from the official repo’s but for now I could try that to get it working.

As for the version, here it is:

Application: KiCad
Version: (6.0.2), release build
Libraries:
wxWidgets 3.0.5
libcurl/7.82.0 OpenSSL/1.1.1m zlib/1.2.12 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.10.0 nghttp2/1.47.0
Platform: Linux 4.14.93-rt53-MANJARO x86_64, 64 bit, Little endian, wxGTK, i3, x11
Build Info:
Date: Feb 12 2022 00:50:45
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.78.0
OCC: 7.5.3
Curl: 7.81.0
ngspice: 36
Compiler: GCC 11.1.0 with C++ ABI 1016
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON

If I understood correctly, you can still open KiCad and change Preferences. Try Display Options → Fallback Graphics.

I say this because searches point to a possibility of some graphics (driver) related issue.

In any case they are related to memory management which would be very serious if it would be caused by KiCad itself. But I suspect this is a problem with some external library.

The link below is also related to KiCad (V4.0.7, so quite old) and it also suggests a problem with the graphics.

KiCad V6.0.4 has been released 3 weeks ago, I don’t now quick Manjaro is with these things.

That is correct, I can also add footprints in the PCB editor just fine. When I change display options to Fallback Graphics in eeschema, kicad crashes as well. So yeah a graphics driver might be the issue here. I get the following error again:

i965: Failed to submit batchbuffer: No such file or directory zsh: IOT instruction (core dumped) kicad

Also: in the PCB editor graphics are already set to Fallback

Then it looks like it’s not a graphics driver issue.

I feel I might not have said it concisely enough. Once I set the option to “Fallback Graphics” and press Ok to apply the setting it crashes immediately.

The link I posted suggest to force software rendering via the terminal.

Does that work?

I will check it out now. I did just install the kicad-nightly build:

Application: KiCad
Version: (6.99.0-1594-g5bf163de80-dirty), release build
Libraries:
wxWidgets 3.0.5
FreeType 2.11.1
HarfBuzz 4.2.0
FontConfig 2.14.0
libcurl/7.82.0 OpenSSL/1.1.1m zlib/1.2.12 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.10.0 nghttp2/1.47.0
Platform: Linux 4.14.93-rt53-MANJARO x86_64, 64 bit, Little endian, wxGTK, i3, x11
Build Info:
Date: Apr 9 2022 04:11:32
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.78.0
OCC: 7.5.3
Curl: 7.82.0
ngspice: 36
Compiler: GCC 11.2.0 with C++ ABI 1016
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON

And it’s exhibiting the same behaviour. I did also get a bunch of these errors in the terminal:
*** BUG *** In pixman_region32_init_rect: Invalid rectangle passed Set a breakpoint on '_pixman_log_error' to debug

Yes running LIBGL_ALWAYS_SOFTWARE=1 kicad does indeed fix the error/crash!

Ah, OK. Then it could be that.

You can try changing it manually in the config file ~/.config/kicad/6.0/eeschema.json

  "graphics": {
    "canvas_type": 1,

where accelerated should is 1 and fallback is 2. Do this when KiCad is not running, then start KiCad.

I tried this already, but it seems like it doesn’t do anything. The crashes still happen and when I open Preferences the Rendering Engine option is still set to “Accelerated”.

Beware of the nightlies (Any KiCad version ending in 99)

Many changes are being made currently, and it’s not a good option if you’re seeking for stability.

Projects saved in V6.99 probably can not be opened anymore in KiCad V6.0

KiCad-nightly V5.99 was quite stable at the end of last year, but V6.99 is a completely differnt sort of cookie.

Yeah I realize that, I was just checking to see if maybe a more recent version would correct the issue. If the bug persists in the nightly it will probably still be in 6.0.4 as well right?

I am not sure how fresh that Nightly is, 6.99 started with 6.0.0 release

That’s fair, I will use the force LIBGL workaround for now. 6.0.4 is in the Arch repositories already so I think it’ll be available on Manjaro pretty soon as well. If the issue persists I should probably submit a bug report somewhere I think…

1 Like

Do that if it is not fixed, only issues filed in GitLab are tracked. Few developers spend much time on this forum

To be honest I don’t think this is related to KiCad, it’s because of “rolling release” nature of Manjaro which necessarily causes binary or other incompatibilities between packages every now and then. Recompiling the whole distro might help :slight_smile:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.