Segfault in PCBnew while copying plane - KDE

Bug #1800648 reported by Sebastian
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Seth Hillbrand

Bug Description

Unfortunately I cannot share my PCB.

Segfault is reproducible in my case:

1) Mark plane
2) Strg+C
3) Click two times in the area
-> crash

I will append a strace.
I will also try if it works in the nightly and report it here.

Application: kicad
Version: 5.0.1-33cea8e~68~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-38-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

---------------------------

write(2, "The program 'kicad' received an "..., 563The program 'kicad' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 89910 error_code 3 request_code 18 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
) = 563
munmap(0x7fa65b64f000, 360448) = 0
munmap(0x7fa66000a000, 901120) = 0
getpid() = 15464
openat(AT_FDCWD, "/home/sebastian/.config/kicad/pcbnew943DiM", O_RDWR|O_CREAT|O_EXCL, 0600) = 9
stat("/home/sebastian/.config/kicad/pcbnew", {st_mode=S_IFREG|0664, st_size=19731, ...}) = 0
chmod("/home/sebastian/.config/kicad/pcbnew943DiM", 0100664) = 0
write(9, "Color4DPCBLayer_F.Cu=rgb(132, 0,"..., 19731) = 19731
close(9) = 0
stat("/home/sebastian/.config/kicad/pcbnew", {st_mode=S_IFREG|0664, st_size=19731, ...}) = 0
unlink("/home/sebastian/.config/kicad/pcbnew") = 0
rename("/home/sebastian/.config/kicad/pcbnew943DiM", "/home/sebastian/.config/kicad/pcbnew") = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x5647c079f0a0} ---
+++ killed by SIGSEGV (core dumped) +++
[1] 15462 segmentation fault (core dumped) strace kicad

---------------------------

Running it with the suggested sync parameter:
It did not crash as described in the initial report, but after I Strg+V it.

recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=8, events=POLLIN|POLLPRI}], 3, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\3\2\0\33\n\0\10", iov_len=8}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 8
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\1\213\33\0\0\0\0n\1\0\0\0\0\0\0\324\n)\2T\3\f\2\20\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="+\3\1\0", iov_len=4}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 4
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\2\214\33\0\0\0\0\34\n\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="(\3\4\0\33\n\0\10n\1\0\0$\0k\0", iov_len=16}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 16
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\1\215\33\0\0\0\0\364.\204\2\244\7\210\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="+\3\1\0", iov_len=4}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 4
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\2\216\33\0\0\0\0\34\n\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="(\3\4\0\33\n\0\10n\1\0\0$\0k\0", iov_len=16}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 16
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\1\217\33\0\0\0\0\364.\204\2\244\7\210\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="+\3\1\0", iov_len=4}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 4
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\2\220\33\0\0\0\0\34\n\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="&\3\2\0\33\n\0\10", iov_len=8}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 8
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\1\221\33\0\0\0\0n\1\0\0\0\0\0\0\324\n)\2T\3\f\2\20\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="+\3\1\0", iov_len=4}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 4
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\2\222\33\0\0\0\0\34\n\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvmsg(3, {msg_namelen=0}, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}, {fd=8, events=POLLIN|POLLPRI}], 3, 0) = 0 (Timeout)
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLOUT}])
writev(3, [{iov_base="\22\0\0\0\7\0\1\0\r\0\200\3L\1\0\0\210\1\0\0\10\6\1\0\0\0\4\0", iov_len=28}, {iov_base="(kicad_pcb (version 20171130) (h"..., iov_len=262144}, {iov_base="", iov_len=0}], 3) = 262172
poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, revents=POLLIN|POLLOUT}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\0\3\223\33\r\0\200\3\0\0\22\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
writev(3, [{iov_base="+\0\1\0", iov_len=4}, {iov_base=NULL, iov_len=0}, {iov_base="", iov_len=0}], 3) = 4
poll([{fd=3, events=POLLIN}], 1, -1) = 1 ([{fd=3, revents=POLLIN}])
recvmsg(3, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="\1\2\224\33\0\0\0\0\34\n\0\10\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", iov_len=4096}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 32
openat(AT_FDCWD, "/usr/share/X11/XErrorDB", O_RDONLY) = 9
fstat(9, {st_mode=S_IFREG|0644, st_size=42077, ...}) = 0
read(9, "!\n! Copyright 1993, 1995, 1998 "..., 42077) = 42077
close(9) = 0
write(2, "The program 'kicad' received an "..., 564The program 'kicad' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadWindow (invalid Window parameter)'.
  (Details: serial 203667 error_code 3 request_code 18 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
) = 564
munmap(0x7f200804a000, 360448) = 0
munmap(0x7f20080a2000, 901120) = 0
getpid() = 15717
openat(AT_FDCWD, "/home/sebastian/.config/kicad/pcbnewNAkqXb", O_RDWR|O_CREAT|O_EXCL, 0600) = 9
stat("/home/sebastian/.config/kicad/pcbnew", {st_mode=S_IFREG|0664, st_size=19731, ...}) = 0
chmod("/home/sebastian/.config/kicad/pcbnewNAkqXb", 0100664) = 0
write(9, "Color4DPCBLayer_F.Cu=rgb(132, 0,"..., 19731) = 19731
close(9) = 0
stat("/home/sebastian/.config/kicad/pcbnew", {st_mode=S_IFREG|0664, st_size=19731, ...}) = 0
unlink("/home/sebastian/.config/kicad/pcbnew") = 0
rename("/home/sebastian/.config/kicad/pcbnewNAkqXb", "/home/sebastian/.config/kicad/pcbnew") = 0
--- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_ACCERR, si_addr=0x55810b3bc0a0} ---
+++ killed by SIGSEGV (core dumped) +++
[1] 15715 segmentation fault (core dumped) strace kicad --sync

I have no idea if the strace part is enough.
Please let me know if you need more informations.

Seth Hillbrand (sethh)
Changed in kicad:
milestone: none → 5.0.2
importance: Undecided → Critical
Revision history for this message
Seth Hillbrand (sethh) wrote :

Could you recreate this running kicad from within gbd to get a backtrace?

gdb /usr/bin/kicad

I've not been able to reproduce here. We can also exchange board files offline or with a confidentiality agreement if your company requires.

Revision history for this message
Sebastian (herostrat) wrote :

I could reproduce the segfault in the current nightly, although it did not immediately crash but did not respond over 10 minutes until I killed it.

Application: kicad
Version: 6.0.0-rc1-unknown-eabae68~84~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-38-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
Sebastian (herostrat) wrote :
Download full text (4.3 KiB)

I will check if I can share, but honestly I do not think it will work out.

GDB output on the 5.0.1

gdb /usr/bin/kicad
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/kicad...(no debugging symbols found)...done.
(gdb) run
Starting program: /usr/bin/kicad
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

(kicad:16312): Gtk-WARNING **: 14:06:52.323: Unable to locate theme engine in module_path: "adwaita",

(kicad:16312): Gtk-WARNING **: 14:06:52.328: Unable to locate theme engine in module_path: "adwaita",
[New Thread 0x7fffe743c700 (LWP 16316)]
[New Thread 0x7fffe6c3b700 (LWP 16317)]
[New Thread 0x7fffd6be6700 (LWP 16318)]
[Thread 0x7fffd6be6700 (LWP 16318) exited]
[New Thread 0x7fffd6be6700 (LWP 16319)]
[New Thread 0x7fffd6be6700 (LWP 16320)]
[Thread 0x7fffd6be6700 (LWP 16319) exited]
[Thread 0x7fffd6be6700 (LWP 16320) exited]
[New Thread 0x7fffd63e5700 (LWP 16321)]
[Thread 0x7fffd63e5700 (LWP 16321) exited]
[New Thread 0x7fffd63e5700 (LWP 16322)]
[New Thread 0x7fffd6be6700 (LWP 16323)]
[Thread 0x7fffd63e5700 (LWP 16322) exited]
[New Thread 0x7fffd63e5700 (LWP 16324)]
[Thread 0x7fffd6be6700 (LWP 16323) exited]
[New Thread 0x7fffd6be6700 (LWP 16325)]
[Thread 0x7fffd63e5700 (LWP 16324) exited]
[Thread 0x7fffd6be6700 (LWP 16325) exited]
[New Thread 0x7fffd6be6700 (LWP 16326)]
[New Thread 0x7fffd63e5700 (LWP 16327)]
[New Thread 0x7fffdd4df700 (LWP 16328)]
[New Thread 0x7fffdccde700 (LWP 16329)]
[Thread 0x7fffd6be6700 (LWP 16326) exited]
[Thread 0x7fffdd4df700 (LWP 16328) exited]
[Thread 0x7fffd63e5700 (LWP 16327) exited]
[Thread 0x7fffdccde700 (LWP 16329) exited]
[New Thread 0x7fffdccde700 (LWP 16330)]
[New Thread 0x7fffd63e5700 (LWP 16331)]
[New Thread 0x7fffdd4df700 (LWP 16332)]
[New Thread 0x7fffd6be6700 (LWP 16333)]
[Thread 0x7fffd6be6700 (LWP 16333) exited]
[Thread 0x7fffdd4df700 (LWP 16332) exited]
[Thread 0x7fffd63e5700 (LWP 16331) exited]
[Thread 0x7fffdccde700 (LWP 16330) exited]
[New Thread 0x7fffdccde700 (LWP 16334)]
[New Thread 0x7fffd63e5700 (LWP 16335)]
[New Thread 0x7fffdd4df700 (LWP 16336)]
[New Thread 0x7fffd6be6700 (LWP 16337)]
[Thread 0x7fffd6be6700 (LWP 16337) exited]
[Thread 0x7fffdd4df700 (LWP 16336) exited]
[Thread 0x7fffd63e5700 (LWP 16335) exited]
[Thread 0x7fffdccde700 (LWP 16334) exited]

(kicad:16312): Gdk-CRITICAL **: 14:07:13.856: IA__gdk_window_get_events: assertion 'GDK_IS_WINDOW (window)' failed

(kicad:16312): Gdk-CRITICAL **: 14:07:...

Read more...

Revision history for this message
Seth Hillbrand (sethh) wrote :

Thank you for the update. When you get a segfault in gdb, can you type bt to get a back trace? That will help us greatly.

Revision history for this message
Sebastian (herostrat) wrote :
Download full text (3.2 KiB)

Oh man sorry, I forgot to append it.
Here you go:

(gdb) bt
#0 0x00005555558f50a0 in ()
#1 0x00007ffff66adf4c in wxMBConv::FromWChar(char*, unsigned long, wchar_t const*, unsigned long) const ()
    at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#2 0x00007ffff66bad18 in wxString::AsChar(wxMBConv const&) const () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#3 0x00007ffff6672796 in () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#4 0x00007ffff6674352 in wxFileName::CreateTempFileName(wxString const&, wxFile*) ()
    at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#5 0x00007ffff6646117 in wxTempFile::Open(wxString const&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#6 0x00007ffff66473e4 in wxTempFile::wxTempFile(wxString const&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#7 0x00007ffff664aed8 in wxFileConfig::Flush(bool) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#8 0x00007ffff664b5fe in wxFileConfig::~wxFileConfig() () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#9 0x00007ffff664b7ae in wxFileConfig::~wxFileConfig() () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#10 0x00005555555fe515 in ()
#11 0x00005555555c78e6 in ()
#12 0x00007ffff57a5041 in __run_exit_handlers (status=1, listp=0x7ffff5b4d718 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, run_dtors=run_dtors@entry=true) at exit.c:108
#13 0x00007ffff57a513a in __GI_exit (status=<optimized out>) at exit.c:139
#14 0x00007ffff4ecd512 in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#15 0x00007ffff41988ba in _XError () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#16 0x00007ffff41957eb in () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#17 0x00007ffff4195895 in () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#18 0x00007ffff41961c5 in _XEventsQueued () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#19 0x00007ffff4187d3d in XPending () at /usr/lib/x86_64-linux-gnu/libX11.so.6
#20 0x00007ffff4ec30ee in () at /usr/lib/x86_64-linux-gnu/libgdk-x11-2.0.so.0
#21 0x00007ffff44db998 in g_main_context_prepare () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#22 0x00007ffff44dc36b in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#23 0x00007ffff44dc7d2 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff524fa37 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-x11-2.0.so.0
#25 0x00007ffff6ec2b05 in wxGUIEventLoop::DoRun() () at /usr/lib/x86_64-linux-gnu/libwx_gtk2u_core-3.0.so.0
#26 0x00007ffff6631a93 in wxEventLoopBase::Run() () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#27 0x00007ffff65f90a6 in wxAppConsoleBase::MainLoop() () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#28 0x00005555555c7ff9 in ()
#29 0x00007ffff6683ae9 in wxEntry(int&, wchar_t**) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#30 0x00005555555ae5d8 in ()
#31 0x00007ffff5783b97 in __libc_start_main (main=
    0x5555555ae5b0, argc=1, argv=0x7fffffffde88, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffde78) at ../csu/libc-start.c:310
#32 0x00005555555b29ca in _start ()

Also:
I played around a bit and it seems that only specific planes seem to trigger this behavior....

Read more...

Revision history for this message
Seth Hillbrand (sethh) wrote :

Hi Sebastian-

Could you save a copy of you kicad_pcb board, remove the proprietary data and see if copying the zone still triggers the fault? If so, perhaps you could post the truncated file here?

Unfortunately, the backtrace shows a fault after the program is already exiting from the primary problem.

Changed in kicad:
status: New → Incomplete
Revision history for this message
Seth Hillbrand (sethh) wrote :

I received the test board. This issue should be addressed in recent nighties. Sebastian, can you verify?

Revision history for this message
Sebastian (herostrat) wrote :

Hey Seth,

yes I sent you a reduced and anonymized board, were I could recreate the crash.
Thanks for your help!

I tested the current nightly build on ubuntu :

Application: kicad
Version: 6.0.0-rc1-unknown-be0935b~84~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-38-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

The crash still occurs.
Can you point me to a specific commit so that I can compile it myself (or wait until it gets delivered in the PPA)?

Revision history for this message
Sebastian (herostrat) wrote :

I just updated to

Application: kicad
Version: 6.0.0-rc1-unknown-15fa8f8~84~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-38-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

I can still reproduce the crash every time.

Revision history for this message
Seth Hillbrand (sethh) wrote :

Thank you for the update. I have not been able to reproduce the crash you are seeing with the example board, but a similar issue was recently found so I had hoped it was related.

Perhaps you can post screen capture showing the steps you use to trigger this crash?

Changed in kicad:
status: Incomplete → Triaged
assignee: nobody → Seth Hillbrand (sethh)
Revision history for this message
Sebastian (herostrat) wrote :

Hello Seth, I updated to

Application: kicad
Version: 6.0.0-rc1-unknown-589e1f6~84~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-38-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_PYTHON3=OFF
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_WXPYTHON_PHOENIX=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

and reported my screen while reproducing the error.

Note: It seems it (now?) only works on this area with this net.
It crashes also when I rename the net to something "sensible" like GND
After copying I click left again to deselect the area and then it crashes

Thanks for your help!

Revision history for this message
Seth Hillbrand (sethh) wrote :

Unfortunately, neither action (Strg-C + click to deselect or rename the net to GND) causes a crash or other issue for me using the ppa version (mine pasted below) you originally reported and Ubuntu 18.04 with the board you provided.

So, our issue must exist is another difference. Can you provide more information about your setup?

1) Which window manager are you using?
2) Does the issue happen when you perform the action using Legacy Toolset (F9)?
3) Does the issue happen when you perform the action using Modern Toolset - Fallback (F12)?
4) Are any crash files created in /var/crash?

Application: kicad
Version: 5.0.1-33cea8e~68~ubuntu18.04.1, release build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.58.0 OpenSSL/1.1.0g zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Platform: Linux 4.15.0-33-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 2.24
    Boost: 1.65.1
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.58.0
    Compiler: GCC 7.3.0 with C++ ABI 1011

Build settings:
    USE_WX_GRAPHICS_CONTEXT=OFF
    USE_WX_OVERLAY=OFF
    KICAD_SCRIPTING=ON
    KICAD_SCRIPTING_MODULES=ON
    KICAD_SCRIPTING_WXPYTHON=OFF
    KICAD_SCRIPTING_ACTION_MENU=ON
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
Sebastian (herostrat) wrote :

Damn, that's a pity.
At least I can reproduce the crash everytime so I can give you all answers you could ever need :D

Ok for your questions:
1) kwin 5.12.6
2) and 3) it seems I use F12 (modern toolset fallback) as a standart
F11 (modern toolset) produces the crash, too.
With F9 (legacy toolset) I could _not_ reproduce the crash.
This is all the same with the stable PPA if js-reynaud and the dev nightly of him.
4) Yes, there are multiple:
Insgesamt 162M
-rw-r----- 1 sebastian whoopsie 87M Okt 29 17:08 _usr_bin_kicad.1000.crash
-rw-r----- 1 sebastian whoopsie 21M Okt 30 20:38 _usr_bin_pcbnew.1000.crash
-rw-r----- 1 sebastian whoopsie 154K Okt 30 13:26 _usr_bin_strace.1000.crash
-rw-r----- 1 sebastian whoopsie 55M Okt 30 13:38 _usr_lib_kicad-nightly_bin_kicad.1000.crash
Do you want me to send them to you?

Revision history for this message
Seth Hillbrand (sethh) wrote :

That did it. I just got the crash using KDE.

summary: - Segfault in PCBnew while copying plane
+ Segfault in PCBnew while copying plane - KDE
Changed in kicad:
status: Triaged → In Progress
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 964d6ebc0686838b942f644baf6f827fa2d4b460
https://git.launchpad.net/kicad/patch/?id=964d6ebc0686838b942f644baf6f827fa2d4b460

Changed in kicad:
status: In Progress → Fix Committed
Revision history for this message
Seth Hillbrand (sethh) wrote :

I think that this is fixed. At least I can no longer recreate it with many attempts in the same scenario that crashes KDE without the patch. However, as it was intermittent, I am not 100% certain.

@Sebastian- please let me know if you encounter it again.

Revision history for this message
jean-pierre charras (jp-charras) wrote :

@Seth,
Your fix creates a new issue in countries using a comma as separator in floats
This is due to a missing LOCALE_IO is source.
Saving and pasting a footprint works, but saving a block and pasting it does not work
The reason some floating numbers are incorrectly saved (saved using a comma) to the clipboard.

Attached a patch that fix it.
Please test.

Changed in kicad:
status: Fix Committed → Incomplete
Revision history for this message
Seth Hillbrand (sethh) wrote :

@JP- Thanks for finding that. For my reference, which call was using floating points? I thought I had checked the routines for that but clearly I missed one.

Re-enabling the locale there caused issues again with Klipper (it's a fidgety piece of work). But I think that they are addressed again by the second part of localizing and round-tripping the clipboard calls.

Let me know if you see any issues.

Revision history for this message
jean-pierre charras (jp-charras) wrote :

@Seth,

this is formatNetInformation() that write netclass settings. Some settings uses floats.

Changed in kicad:
status: Incomplete → Fix Committed
Revision history for this message
Sebastian (herostrat) wrote :

Hey Seth,

thanks a lot for the hard work resolving this issue.
I will test it as soon as I can (I guess it should be in the nightlies shortly - thanks a lot to jean-pierre!).

Just to be sure (and so that I do not missunderstand): was this an error in KiCad or in Klipper?
If Klipper is to blame I will gladly report it upstream and try to get it fixed.

Revision history for this message
Seth Hillbrand (sethh) wrote :

Hi Sebastian-

Thanks for helping us improve KiCad with a useful bug report. Because this one was unfortunately timing specific, I am not 100% certain that your crash is completely resolved. Just that I can no longer recreate it. If you do see it again/still please let me know.

The issue is may be with Klipper (or Plasma's implementation of Klipper) See the following reports for related issues that others have with this software:

https://bugzilla.redhat.com/show_bug.cgi?id=1255860
https://github.com/vim/vim/issues/1822

It seems to be triggered by how Klipper requests incremental portions of large clipboards from wxWidgets' clipboard.

Changed in kicad:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.