Mac Eeschema segfaults when closing missing library window

Bug #1791561 reported by Seth Hillbrand on 2018-09-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
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.

1) git clone Alexis' motherboard files `git clone`
2) checkout a pre-5 revision `git checkout 86ec50a`
3) Open Kicad and load
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
    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:

Adam Wolf (adamwolf) on 2018-09-10
tags: added: macos
tags: added: osx
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.

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

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
KiCad Janitor (kicad-janitor) wrote :

Fixed in revision 3f23e9ac46ebccc99b521efde1da457a5437da64

Changed in kicad:
status: In Progress → Fix Committed
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  Edit
Everyone can see this information.

Other bug subscribers