Kicad crash when double-clicking a project library on tree view
Description
Kicad stop working when a library is openned using double-click in the tree view.
Steps to reproduce
- Clone repository
https://gitlab.com/dgirault/resplit66
- Open
resplit66.pro
with Kicad - Double click
resplit66.lib
on tree view on the left - Loading windows show up but Kicad is deadlocked!
KiCad Version
Application: KiCad
Version: 5.1.8-db9833491~88~ubuntu20.04.1, release build
Libraries:
wxWidgets 3.0.4
libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Platform: Linux 5.9.8-050908-lowlatency x86_64, 64 bit, Little endian, wxGTK
Build Info:
wxWidgets: 3.0.4 (wchar_t,wx containers,compatible with 2.8) GTK+ 3.24
Boost: 1.71.0
OpenCASCADE Community Edition: 6.9.1
Curl: 7.68.0
Compiler: GCC 9.3.0 with C++ ABI 1013
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
Debugging information using GDB
Stopping kicad by Ctrl+C
in GDB:
^C
Thread 1 "kicad" received signal SIGINT, Interrupt.
__lll_lock_wait (futex=futex@entry=0x5555558b0e60, private=0) at lowlevellock.c:52
Thread information:
(gdb) info threads
Id Target Id Frame
* 1 Thread 0x7ffff39b3cc0 (LWP 172255) "kicad" __lll_lock_wait (futex=futex@entry=0x5555558b0e60, private=0) at lowlevellock.c:52
2 Thread 0x7ffff30a8700 (LWP 172259) "gmain" 0x00007ffff6dabaff in __GI___poll (fds=0x5555558d3980, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
3 Thread 0x7ffff28a7700 (LWP 172260) "gdbus" 0x00007ffff6dabaff in __GI___poll (fds=0x5555558e6be0, nfds=2, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
4 Thread 0x7ffff1d12700 (LWP 172261) "pool-kicad" syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
6 Thread 0x7ffff130c700 (LWP 172267) "kicad:cs0" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x555556489388) at ../sysdeps/nptl/futex-internal.h:183
7 Thread 0x7fffe0acc700 (LWP 172268) "kicad:disk$0" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55555615c8f8) at ../sysdeps/nptl/futex-internal.h:183
8 Thread 0x7fffd22ed700 (LWP 172269) "kicad:disk$1" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55555615c8f8) at ../sysdeps/nptl/futex-internal.h:183
9 Thread 0x7fffd62ed700 (LWP 172270) "kicad:disk$2" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55555615c8f8) at ../sysdeps/nptl/futex-internal.h:183
10 Thread 0x7fffd5aec700 (LWP 172271) "kicad:disk$3" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55555615c8f8) at ../sysdeps/nptl/futex-internal.h:183
11 Thread 0x7fffd52eb700 (LWP 172272) "kicad:sh0" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55555648a590) at ../sysdeps/nptl/futex-internal.h:183
12 Thread 0x7fffd4aea700 (LWP 172273) "kicad:sh1" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55555648a590) at ../sysdeps/nptl/futex-internal.h:183
13 Thread 0x7fffd42e9700 (LWP 172274) "kicad:sh2" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55555648a590) at ../sysdeps/nptl/futex-internal.h:183
14 Thread 0x7fffd3ae8700 (LWP 172275) "kicad:shlo0" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55555648ac98) at ../sysdeps/nptl/futex-internal.h:183
15 Thread 0x7fffd32e7700 (LWP 172276) "kicad:shlo1" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x55555648ac98) at ../sysdeps/nptl/futex-internal.h:183
16 Thread 0x7fffd1aec700 (LWP 172277) "kicad:gdrv0" futex_wait_cancelable (private=<optimized out>, expected=0, futex_word=0x555556555158) at ../sysdeps/nptl/futex-internal.h:183
Backtrace:
(gdb) bt
#0 __lll_lock_wait (futex=futex@entry=0x5555558b0e60, private=0) at lowlevellock.c:52
#1 0x00007ffff6e940a3 in __GI___pthread_mutex_lock (mutex=0x5555558b0e60) at ../nptl/pthread_mutex_lock.c:80
#2 0x00005555556006a6 in __gthread_mutex_lock (__mutex=0x5555558b0e60) at /usr/include/x86_64-linux-gnu/c++/9/bits/gthr-default.h:749
#3 std::mutex::lock() (this=0x5555558b0e60) at /usr/include/c++/9/bits/std_mutex.h:100
#4 std::lock_guard<std::mutex>::lock_guard(std::mutex&) (__m=..., this=<synthetic pointer>) at /usr/include/c++/9/bits/std_mutex.h:159
#5 KICAD_MANAGER_FRAME::OnRunSchLibEditor(wxCommandEvent&) (this=this@entry=0x5555558b0780, event=...) at ./kicad/kicad/mainframe.cpp:368
#6 0x000055555562898b in TREEPROJECT_ITEM::Activate(TREE_PROJECT_FRAME*) (this=0x555555d864a0, aTreePrjFrame=aTreePrjFrame@entry=0x555555b73850) at ./kicad/kicad/treeproject_item.cpp:266
#7 0x000055555561ca7c in TREE_PROJECT_FRAME::OnIdle(wxIdleEvent&) (this=0x555555b73850, aEvent=...) at ./kicad/kicad/tree_project_frame.cpp:839
#8 0x00007ffff7494641 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#9 0x00007ffff7494743 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#10 0x00007ffff7494aa0 in wxEvtHandler::TryHereOnly(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#11 0x00007ffff7494b2b in wxEvtHandler::ProcessEventLocally(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#12 0x00007ffff7494bd1 in wxEvtHandler::ProcessEvent(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#13 0x00007ffff749495b in wxEvtHandler::SafelyProcessEvent(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#14 0x00007ffff7a1351f in wxWindowBase::SendIdleEvents(wxIdleEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#15 0x00007ffff7a134f0 in wxWindowBase::SendIdleEvents(wxIdleEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#16 0x00007ffff78a3683 in wxFrame::SendIdleEvents(wxIdleEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#17 0x00007ffff78e4f8d in wxAppBase::ProcessIdle() () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#18 0x00007ffff782d6f9 in wxGUIEventLoop::YieldFor(long) () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#19 0x00007ffff7a69685 in wxGenericProgressDialog::DoBeforeUpdate(bool*) () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#20 0x00007ffff7a6aff8 in wxGenericProgressDialog::Update(int, wxString const&, bool*) () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#21 0x00007fffe1825d9f in LIB_EDIT_FRAME::<lambda(int, int, const wxString&)>::operator() (__closure=<optimized out>, max=<optimized out>, libName=..., progress=<optimized out>) at /usr/include/wx-3.0/wx/strvararg.h:225
#22 std::_Function_handler<void(int, int, const wxString&), LIB_EDIT_FRAME::SyncLibraries(bool)::<lambda(int, int, const wxString&)> >::_M_invoke(const std::_Any_data &, int &&, int &&, const wxString &) (__functor=..., __args#0=<optimized out>, __args#1=<optimized out>, __args#2=...) at /usr/include/c++/9/bits/std_function.h:300
#23 0x00007fffe19c537e in std::function<void (int, int, wxString const&)>::operator()(int, int, wxString const&) const (__args#2=..., __args#1=<optimized out>, __args#0=<optimized out>, this=0x7fffffffc730) at /usr/include/c++/9/bits/std_function.h:683
#24 SYMBOL_TREE_SYNCHRONIZING_ADAPTER::Sync(bool, std::function<void (int, int, wxString const&)>) (this=this@entry=0x555555bd1400, aForce=aForce@entry=true, aProgressCallback=...) at ./kicad/eeschema/symbol_tree_synchronizing_adapter.cpp:107
#25 0x00007fffe184c15e in LIB_MANAGER::Sync(bool, std::function<void (int, int, wxString const&)>) (this=0x55555661eba0, aForce=aForce@entry=true, aProgressCallback=...) at /usr/include/c++/9/bits/std_function.h:564
#26 0x00007fffe1826c9b in LIB_EDIT_FRAME::SyncLibraries(bool) (this=0x55555612d020, aShowProgress=<optimized out>) at /usr/include/c++/9/new:174
#27 0x00007fffe182822d in LIB_EDIT_FRAME::LIB_EDIT_FRAME(KIWAY*, wxWindow*) (this=0x55555612d020, aKiway=<optimized out>, aParent=<optimized out>) at ./kicad/eeschema/libedit/lib_edit_frame.cpp:253
#28 0x00007fffe189a83b in SCH::IFACE::CreateWindow(wxWindow*, int, KIWAY*, int) (this=<optimized out>, aParent=0x0, aClassId=1, aKiway=0x555555774760 <Kiway>, aCtlBits=<optimized out>) at ./kicad/eeschema/eeschema.cpp:95
#29 0x000055555567634d in KIWAY::Player(FRAME_T, bool, wxTopLevelWindow*) (this=0x555555774760 <Kiway>, aFrameType=FRAME_SCH_LIB_EDITOR, doCreate=<optimized out>, aParent=0x0) at ./kicad/common/kiway.cpp:356
#30 0x00005555556006de in KICAD_MANAGER_FRAME::OnRunSchLibEditor(wxCommandEvent&) (this=this@entry=0x5555558b0780, event=...) at ./kicad/include/kiway_player.h:64
#31 0x000055555562898b in TREEPROJECT_ITEM::Activate(TREE_PROJECT_FRAME*) (this=0x555555d864a0, aTreePrjFrame=aTreePrjFrame@entry=0x555555b73850) at ./kicad/kicad/treeproject_item.cpp:266
#32 0x000055555561ca7c in TREE_PROJECT_FRAME::OnIdle(wxIdleEvent&) (this=0x555555b73850, aEvent=...) at ./kicad/kicad/tree_project_frame.cpp:839
#33 0x00007ffff7494641 in wxEvtHandler::ProcessEventIfMatchesId(wxEventTableEntryBase const&, wxEvtHandler*, wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#34 0x00007ffff7494743 in wxEventHashTable::HandleEvent(wxEvent&, wxEvtHandler*) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#35 0x00007ffff7494aa0 in wxEvtHandler::TryHereOnly(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#36 0x00007ffff7494b2b in wxEvtHandler::ProcessEventLocally(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#37 0x00007ffff7494bd1 in wxEvtHandler::ProcessEvent(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#38 0x00007ffff749495b in wxEvtHandler::SafelyProcessEvent(wxEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#39 0x00007ffff7a1351f in wxWindowBase::SendIdleEvents(wxIdleEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#40 0x00007ffff7a134f0 in wxWindowBase::SendIdleEvents(wxIdleEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#41 0x00007ffff78a3683 in wxFrame::SendIdleEvents(wxIdleEvent&) () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#42 0x00007ffff78e4f8d in wxAppBase::ProcessIdle() () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#43 0x00007ffff780f6a5 in wxApp::DoIdle() () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#44 0x00007ffff780f7a7 in () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#45 0x00007ffff610ae8e in g_main_context_dispatch () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007ffff610b240 in () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#47 0x00007ffff610b533 in g_main_loop_run () at /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#48 0x00007ffff673137d in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#49 0x00007ffff782d575 in wxGUIEventLoop::DoRun() () at /usr/lib/x86_64-linux-gnu/libwx_gtk3u_core-3.0.so.0
#50 0x00007ffff7348d41 in wxEventLoopBase::Run() () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#51 0x00007ffff73103da in wxAppConsoleBase::MainLoop() () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#52 0x00005555555fec7d in APP_KICAD::OnRun() (this=<optimized out>) at ./kicad/kicad/kicad.cpp:271
#53 0x00007ffff739c73d in wxEntry(int&, wchar_t**) () at /usr/lib/x86_64-linux-gnu/libwx_baseu-3.0.so.0
#54 0x00005555555e2f1c in main(int, char**) (argc=<optimized out>, argv=<optimized out>) at ./kicad/kicad/kicad.cpp:302
Edited by David Girault