pcbnew crashes on start

Bug #1822877 reported by bobo87
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
bobo87

Bug Description

Pcbnew crashes just at start, so currently it is unusable for me. It doesn't matter, if invoked from KiCad to open pcb of some project, or starting blank from command line standalone. Before showing main pcbnew window, it blinks "Enable Graphics Acceleration" dialog briefly (I recognized that window after desktop recording). I'm using Ubuntu Mate 18.04.

Running from command line:
Gtk-Message: 22:18:59.214: GtkDialog mapped without a transient parent. This is discouraged.
Segmentation fault (core dumped)

Running from gdb:
(gdb) run
Starting program: /usr/bin/pcbnew
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe9265700 (LWP 26252)]
[New Thread 0x7fffe8a64700 (LWP 26253)]
[New Thread 0x7fffe3fff700 (LWP 26254)]
[New Thread 0x7fffe35c1700 (LWP 26255)]
Gtk-Message: 22:19:49.662: GtkDialog mapped without a transient parent. This is discouraged.

Thread 1 "pcbnew" received signal SIGSEGV, Segmentation fault.
0x00007fffe17cf520 in ?? () from /usr/bin/_pcbnew.kiface
(gdb) bt
#0 0x00007fffe17cf520 in () at /usr/bin/_pcbnew.kiface
#1 0x00007ffff678d4be in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) ()
    at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#2 0x00007ffff678d5c3 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#3 0x00007ffff678d98b in wxEvtHandler::TryHereOnly(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#4 0x00007fffe1a3040b in () at /usr/bin/_pcbnew.kiface
#5 0x00007ffff678d783 in wxEvtHandler::DoTryChain(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#6 0x00007ffff678da75 in wxEvtHandler::ProcessEvent(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#7 0x00007ffff7063d83 in wxMenuBase::UpdateUI(wxEvtHandler*) () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#8 0x00007ffff706403a in wxMenuBarBase::UpdateMenus() () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#9 0x00007ffff6ff8419 in wxFrameBase::OnInternalIdle() () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#10 0x00007ffff70b1dc3 in wxWindowBase::SendIdleEvents(wxIdleEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#11 0x00007ffff6f473df in wxFrame::SendIdleEvents(wxIdleEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#12 0x00007ffff6f8829d in wxAppBase::ProcessIdle() () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#13 0x00007ffff6eb96c9 in wxApp::DoIdle() () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#14 0x00007ffff6eb97c3 in () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#15 0x00007ffff3db11f5 in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#16 0x00007ffff3db15c0 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#17 0x00007ffff3db18d2 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#18 0x00007ffff4ef1da3 in gtk_dialog_run () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#19 0x00007ffff6f58c93 in wxMessageDialog::ShowModal() () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#20 0x00007fffe1431790 in () at /usr/bin/_pcbnew.kiface
#21 0x00007fffe10ecf83 in () at /usr/bin/_pcbnew.kiface
#22 0x00005555555833ab in ()
#23 0x0000555555576b2b in ()
#24 0x000055555557a3ca in ()
#25 0x00007ffff669bb3a in wxEntry(int&, wchar_t**) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#26 0x0000555555574048 in ()
#27 0x00007ffff567cb97 in __libc_start_main (main=
    0x555555574020, argc=1, argv=0x7fffffffdf68, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdf58)
    at ../csu/libc-start.c:310
#28 0x000055555557658a in _start ()

Version info:
Application: kicad
Version: 5.1.0-unknown-428e7a9~82~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.18.0-16-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
    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=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=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Changed in kicad:
importance: Undecided → Critical
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

I this the very first time you have run KiCad? If not, please try renaming your ~/.config/kicad configuration folder. If that resolves the issue, please attach a copy of the backed up config folder to this bug report. We have seen issues like this in the past but we have not been able to successfully duplicate them.

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

I reinstalling from scratch Ubuntu 14.04 to 18.04, after that I installed KiCad. During very first running, or after renaming .config directory, it just asks me, how to configure global footprint library table, and after that, it only crashes, so just creating new configuration looks like no solution.

If I'll have some spare time, I can try to build it from sources, and trace down, why that happens.

Revision history for this message
bobo87 (bobo87) wrote :

After compiling and running in debugger, crash occoured in file pcbnew/pcb_base_frame.cpp in method PCB_BASE_FRAME::OnUpdateSwitchCanvas. When iterating over menuList, it calls menuBar->FindItem, and its parameter ii.menuId is set to 6018 (dec), but this is not found, and item is set to NULL, which results in crash, when trying to do call item->Check( true );

Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

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

@bobo87- Thank you for tracking that down. The LEGACY_CANVAS option has, indeed, been removed for GTK3 builds. I'm not sure why this displays different behavior for you than for other GTK3 builds but it should be fixed now.

Changed in kicad:
milestone: none → 5.1.1
Revision history for this message
Seth Hillbrand (sethh) wrote :

I just installed KiCad in an Ubuntu Mate 18.04 VM and cannot recreate this issue. It may be related to a video card issue. @bobo87, after running and crashing, can you attach the contents of the .config/kicad directory? I'd like to know what, if anything, is created.

Also, are you able to run any of the applications? Eeschema? Gerber Viewer, etc?

Application: kicad
Version: 5.1.0-060a0da~80~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.18.0-15-generic x86_64, 64 bit, Little endian, wxGTK
Build Info:
    wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.22
    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=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=ON
    KICAD_USE_OCC=OFF
    KICAD_SPICE=ON

Revision history for this message
bobo87 (bobo87) wrote :

I've recompiled version without that bug corrected. After running it, I figured, that not only pcbnew crashes, but also gerber viewer. Other apps were running correctly. I'm attaching that config directory.

My graphics card is GeForce GT 520M (I'm working on notebook), driver is NVIDIA (nvidia-driver-390, version shown in NVIDIA X Server Settings is 390.116). Defaultly all apps are running on this dedicated card, instead of built-in Intel one.

Revision history for this message
bobo87 (bobo87) wrote :

After short debugging, that gerber view failure is on same place type, like pcbnew. Failure is at GERBVIEW_FRAME::OnUpdateSwitchCanvas.

Revision history for this message
bobo87 (bobo87) wrote :

Sorry, I badly generated patch file at first...

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

@bobo87- Thank you. I'm sorry I didn't catch this earlier. I'll be happy to push this to the dev tree if you'd like to provide an e-mail address for attribution. Alternatively, you can generate the patch using "git format-patch HEAD~"

Revision history for this message
bobo87 (bobo87) wrote :

It's ok, I also didn't catch it, I just wanted to check some pcb after reinstalling, so gerbview was also missed by me. My mail is bobo87 at centrum at sk.

Changed in kicad:
status: Fix Committed → Fix Released
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

Changed in kicad:
status: Fix Released → Fix Committed
assignee: Seth Hillbrand (sethh) → bobo87 (bobo87)
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.