Crash in eeschema when opening place symbol dialog with footprint previews enabled

Bug #1764196 reported by Aleksandr Sh
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KiCad
Fix Released
Critical
Jeff Young

Bug Description

Once I enabled Footprint previews in eeschema, I started getting crashes when pressing 'A' key to place a component. I was able to attach mingw64 gdb and get some backtraces.

Observed crashes:
1. version 5.0.0-rc2-dev-347-g62c5a706d-dirty (no backtrace): Happened after I pulled latest footprint and symbol updates and readded that to footprint and symbol tables, then pressed 'A' in schematic editor, symbol dialog popped up and KiCad crashed.
2. version 5.0.0-rc2-dev-347-g62c5a706d-dirty (backtrace available): Happened while working with schematic regularly and pressing 'A', then 'R'. Upon pressing 'A', symbol dialog popped up and froze, then KiCad crashed.
3. version 5.0.0-rc2-dev-442-g8fcdc4f6 (backtrace available): Happened while working with schematic regularly and pressing 'A', then 'C'. Upon pressing 'A', symbol dialog popped up and froze, then KiCad crashed.
4. version 5.0.0-rc2-dev-442-g8fcdc4f6 (backtrace available): Happened while working with schematic regularly. Upon pressing 'A', KiCad crashed.

It may not be important, but footprint editor was open when all of the crashes happened.
KiCad was built using MSYS2 on Windows 10 1709.

Steps to reproduce:
1. Enable footprint previews in symbol chooser
2. Open footprint Editor. (This may not be necessary, but it was open when crashes happened)
3. Work on a schematic
4. If you're unlucky, upon pressing 'A', eeschema will crash.

Looks like it crashed every time on
m_threads.clear();
in pcbnew/footprint_info_impl.cpp

Application: kicad
Version: (5.0.0-rc2-dev-442-g8fcdc4f6c), debug build
Libraries:
    wxWidgets 3.0.3
    libcurl/7.59.0 OpenSSL/1.0.2o (WinSSL) zlib/1.2.11 brotli/1.0.3 libidn2/2.0.4 nghttp2/1.31.0
Platform: Windows 8 (build 9200), 64-bit edition, 64 bit, Little endian, wxMSW
Build Info:
    wxWidgets: 3.0.3 (wchar_t,wx containers,compatible with 2.8)
    Boost: 1.66.0
    Curl: 7.59.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=ON
    KICAD_SCRIPTING_ACTION_MENU=OFF
    BUILD_GITHUB_PLUGIN=ON
    KICAD_USE_OCE=ON
    KICAD_SPICE=ON

Tags: eeschema
Revision history for this message
Aleksandr Sh (dsa-t) wrote :
Revision history for this message
Aleksandr Sh (dsa-t) wrote :
Revision history for this message
Aleksandr Sh (dsa-t) wrote :
Revision history for this message
Jeff Young (jeyjey) wrote :

Nice one. We're re-entering a re-entrancy control block. That was never going to end well....

Changed in kicad:
importance: Undecided → Critical
assignee: nobody → Jeff Young (jeyjey)
Revision history for this message
Jeff Young (jeyjey) wrote :

BTW, I can't reproduce this on a Mac, so the stack traces were *invaluable* in tracking it down. Thanks for posting a very complete bug report!

Revision history for this message
Aleksandr Sh (dsa-t) wrote :

Happened again. Eeschema was open for a couple of hours doing nothing. Then I switched to eeschema window and pressed 'A'. This time the footprint editor wasn't open.

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

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

Changed in kicad:
status: New → Fix Committed
Revision history for this message
Jeff Young (jeyjey) wrote :

@Aleksandr, while I was never able to reproduce this, I pushed a change which will hopefully fix it. I'm not sure if it will go into the nightly tonight or not, but if you could grab a new version in the next day or two and test it that would be great.

Revision history for this message
Wayne Stambaugh (stambaughw) wrote :

@Jeff, I just finished testing this on w10 with both 32 and 64 bit builds without any issues so I would say this issue is resolved. Thanks.

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.