eeschema/pcbnew segfault when opened graphically over SSH
Description
Opening the symbol editor, schematic editor, footprint editor, or pcb editor results in a segfault when viewed over a graphical SSH session.
However, opening the calculator tools, drawing sheet editor, image converter, or gerber viewer all work as expected.
This behaviour seems to have been happening for quite a while, though it's only recently come to my attention.
Here's the backtrace;
Thread 1 "pcbnew" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb)
(gdb)
(gdb) bt
#0 0x0000000000000000 in ()
#1 0x00007fffe80405a3 in () at /usr/lib/libGLX_mesa.so.0
#2 0x00007ffff20f68df in GL_UTILS::SetSwapInterval(int) (aVal=0) at /usr/src/pacman/kicad-git/src/kicad-git/include/gl_utils.h:74
#3 0x00007ffff28cbe8b in KIGFX::OPENGL_GAL::init() (this=0x555559a08100) at /usr/src/pacman/kicad-git/src/kicad-git/common/gal/opengl/opengl_gal.cpp:2279
#4 0x00007ffff28c1d7c in KIGFX::OPENGL_GAL::CheckFeatures(KIGFX::GAL_DISPLAY_OPTIONS&) (aOptions=...)
at /usr/src/pacman/kicad-git/src/kicad-git/common/gal/opengl/opengl_gal.cpp:351
#5 0x00007ffff28a5c58 in EDA_DRAW_PANEL_GAL::SwitchBackend(EDA_DRAW_PANEL_GAL::GAL_TYPE) (this=0x5555580d3da0, aGalType=EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL)
at /usr/src/pacman/kicad-git/src/kicad-git/common/draw_panel_gal.cpp:400
#6 0x00007ffff2354ee2 in PCB_DRAW_PANEL_GAL::SwitchBackend(EDA_DRAW_PANEL_GAL::GAL_TYPE) (this=0x5555580d3da0, aGalType=EDA_DRAW_PANEL_GAL::GAL_TYPE_OPENGL)
at /usr/src/pacman/kicad-git/src/kicad-git/pcbnew/pcb_draw_panel_gal.cpp:530
#7 0x00007ffff1bb7d55 in PCB_EDIT_FRAME::PCB_EDIT_FRAME(KIWAY*, wxWindow*) (this=0x555557e137b0, aKiway=0x555555895e80 <Kiway>, aParent=0x0)
at /usr/src/pacman/kicad-git/src/kicad-git/pcbnew/pcb_edit_frame.cpp:317
#8 0x00007ffff174f7bd in PCB::IFACE::CreateWindow(wxWindow*, int, KIWAY*, int)
(this=0x7ffff3b7d980 <PCB::kiface>, aParent=0x0, aClassId=5, aKiway=0x555555895e80 <Kiway>, aCtlBits=1)
at /usr/src/pacman/kicad-git/src/kicad-git/pcbnew/pcbnew.cpp:84
#9 0x000055555559ce4a in KIWAY::Player(FRAME_T, bool, wxTopLevelWindow*) (this=0x555555895e80 <Kiway>, aFrameType=FRAME_PCB_EDITOR, doCreate=true, aParent=0x0)
at /usr/src/pacman/kicad-git/src/kicad-git/common/kiway.cpp:409
#10 0x000055555558e644 in PGM_SINGLE_TOP::OnPgmInit() (this=0x555555895f80 <program>) at /usr/src/pacman/kicad-git/src/kicad-git/common/single_top.cpp:368
#11 0x0000555555591f09 in APP_SINGLE_TOP::OnInit() (this=0x55555592d400) at /usr/src/pacman/kicad-git/src/kicad-git/common/single_top.cpp:154
#12 0x00005555555914c3 in wxAppConsoleBase::CallOnInit() (this=0x55555592d400) at /usr/include/wx-3.0/wx/app.h:93
#13 0x00007ffff74731c2 in wxEntry(int&, wchar_t**) () at /usr/lib/libwx_baseu-3.0.so.0
#14 0x000055555558e06b in main(int, char**) (argc=1, argv=0x7fffffffe318) at /usr/src/pacman/kicad-git/src/kicad-git/common/single_top.cpp:269
Steps to reproduce
- SSH into a remote computer.
- Confirm that you can open and view the pl_editor
- Attempt to run eeschema or pcbnew
Expected
That the eeschema or pcbnew window opens and runs.
Actual
A segfault occurs.
KiCad Version
Not-working Version
Application: KiCad
Version: (5.99.0-13050-gf79cb382c4), release build
Libraries:
wxWidgets 3.0.5
libcurl/7.78.0 OpenSSL/1.1.1l zlib/1.2.11 zstd/1.5.0 libidn2/2.3.2 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.44.0
Platform: Linux 5.14.2-arch1-2 x86_64, 64 bit, Little endian, wxGTK, , tty
Build Info:
Date: Nov 1 2021 23:13:03
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.76.0
OCC: 7.5.0
Curl: 7.78.0
ngspice: 35
Compiler: GCC 11.1.0 with C++ ABI 1016
Build settings:
KICAD_USE_OCC=ON
KICAD_SPICE=ON
Working Version
Application: KiCad
Version: 5.1.9, release build
Libraries:
wxWidgets 3.0.5
libcurl/7.75.0 OpenSSL/1.1.1j zlib/1.2.11 zstd/1.4.9 libidn2/2.3.0 libpsl/0.21.1 (+libidn2/2.3.0) libssh2/1.9.0 nghttp2/1.43.0
Platform: Linux 5.11.7-arch1-1 x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.5 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.75.0
OpenCASCADE Technology: 7.5.0
Curl: 7.74.0
Compiler: GCC 10.2.0 with C++ ABI 1014
Build settings:
USE_WX_GRAPHICS_CONTEXT=OFF
USE_WX_OVERLAY=ON
KICAD_SCRIPTING=ON
KICAD_SCRIPTING_MODULES=ON
KICAD_SCRIPTING_PYTHON3=ON
KICAD_SCRIPTING_WXPYTHON=ON
KICAD_SCRIPTING_WXPYTHON_PHOENIX=ON
KICAD_SCRIPTING_ACTION_MENU=ON
BUILD_GITHUB_PLUGIN=ON
KICAD_USE_OCE=OFF
KICAD_USE_OCC=ON
KICAD_SPICE=ON
Edited by Vincent W