Mac Eeschema segfaults when closing missing library window

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

Bug Description

Open a schematic that needs to be re-mapped but doesn't have all symbol libraries available and eeschema will segfault when closing the HTMLMessageBox that notifies you of the missing libraries. This does not happen under Linux.

Steps:
1) git clone Alexis' motherboard files `git clone https://github.com/c4puter/motherboard`
2) checkout a pre-5 revision `git checkout 86ec50a`
3) Open Kicad and load motherboard.pro
4) Start Eeschema. The libraries try to load, you see the message about missing libraries and crash.

Application: kicad
Version: (6.0.0-rc1-dev-475-g5b4928f93), debug build
Libraries:
    wxWidgets 3.0.4
    libcurl/7.54.0 LibreSSL/2.0.20 zlib/1.2.11 nghttp2/1.24.0
Platform: Mac OS X (Darwin 17.6.0 x86_64), 64 bit, Little endian, wxMac
Build Info:
    wxWidgets: 3.0.4 (UTF-8,STL containers,compatible with 2.8)
    Boost: 1.66.0
    OpenCASCADE Community Edition: 6.9.1
    Curl: 7.54.0
    Compiler: Clang 9.0.0 with C++ ABI 1002

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

Tags: macos osx
Adam Wolf (adamwolf)
tags: added: macos
tags: added: osx
Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Seth, by "pre-5" do you mean this bug effects the current 5.0 branch? If so, we need to fix this for 5.0.1. I'm assuming this is a macos only bug.

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

I meant the the schematic was in version 4 format. Opens fine using KiCad release 5 so I think it is a MacOS, 5.1 bug

Revision history for this message
Jeff Young (jeyjey) wrote :

We have these somewhat ironic lines in PROJECT::SchLibs():

    wxWindow* parent = 0; // Pgm().App().GetTopWindow();

    // parent of this dialog cannot be NULL since that breaks the Kiway() chain.
    HTML_MESSAGE_BOX dlg( parent, _( "Not Found" ) );

Well, yes, and it also can't be NULL because it segfaults on OSX.

I followed the git history, but all of this was added in a single commit with a slew of other stuff, so there's no data about why setting parent was commented out.

I replaced it, and at least it doesn't crash now.

Changed in kicad:
assignee: nobody → Jeff Young (jeyjey)
status: New → In Progress
milestone: none → 5.1.0
importance: Undecided → Critical
Revision history for this message
KiCad Janitor (kicad-janitor) wrote :

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

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

Hi Jeff-

Looks like this was biting v5 as well, so I cherry-picked this one back.

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.